#!/usr/bin/env python # PyCPython - interpret CPython in Python # Statically compiled CPython. import sys import better_exchook import cparser import cparser.interpreter import ctypes better_exchook.install() intp = cparser.interpreter.Interpreter() intp.setupStatic() helpers = intp.helpers ctypes_wrapped = intp.ctypes_wrapped class structs: pass class _class_struct__anonymous__Py_HashSecret_t(ctypes.Structure): _fields_ = [ ('prefix', ctypes_wrapped.c_long), ('suffix', ctypes_wrapped.c_long)] structs._anonymous__Py_HashSecret_t = _class_struct__anonymous__Py_HashSecret_t del _class_struct__anonymous__Py_HashSecret_t class _class_struct__anonymous_Py_complex(ctypes.Structure): _fields_ = [ ('real', ctypes_wrapped.c_double), ('imag', ctypes_wrapped.c_double)] structs._anonymous_Py_complex = _class_struct__anonymous_Py_complex del _class_struct__anonymous_Py_complex structs._arena = ctypes_wrapped.c_int # Dummy extern declaration class _class_struct__anonymous_PyCompilerFlags(ctypes.Structure): _fields_ = [ ('cf_flags', ctypes_wrapped.c_int)] structs._anonymous_PyCompilerFlags = _class_struct__anonymous_PyCompilerFlags del _class_struct__anonymous_PyCompilerFlags structs.filedescr = ctypes_wrapped.c_int # Dummy extern declaration class _class_struct__inittab(ctypes.Structure): _fields_ = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('initfunc', ctypes.CFUNCTYPE(None))] structs._inittab = _class_struct__inittab del _class_struct__inittab class _class_struct__frozen(ctypes.Structure): _fields_ = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('code', ctypes.POINTER(ctypes_wrapped.c_ubyte)), ('size', ctypes_wrapped.c_int)] structs._frozen = _class_struct__frozen del _class_struct__frozen class _class_struct__addr_pair(ctypes.Structure): _fields_ = [ ('ap_lower', ctypes_wrapped.c_int), ('ap_upper', ctypes_wrapped.c_int)] structs._addr_pair = _class_struct__addr_pair del _class_struct__addr_pair class _class_struct__anonymous_PyFutureFeatures(ctypes.Structure): _fields_ = [ ('ff_features', ctypes_wrapped.c_int), ('ff_lineno', ctypes_wrapped.c_int)] structs._anonymous_PyFutureFeatures = _class_struct__anonymous_PyFutureFeatures del _class_struct__anonymous_PyFutureFeatures class _class_struct__anonymous_PyTryBlock(ctypes.Structure): _fields_ = [ ('b_type', ctypes_wrapped.c_int), ('b_handler', ctypes_wrapped.c_int), ('b_level', ctypes_wrapped.c_int)] structs._anonymous_PyTryBlock = _class_struct__anonymous_PyTryBlock del _class_struct__anonymous_PyTryBlock class _class_struct_memberlist(ctypes.Structure): _fields_ = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('type', ctypes_wrapped.c_int), ('offset', ctypes_wrapped.c_int), ('flags', ctypes_wrapped.c_int)] structs.memberlist = _class_struct_memberlist del _class_struct_memberlist class _class_struct_PyMemberDef(ctypes.Structure): _fields_ = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('type', ctypes_wrapped.c_int), ('offset', ctypes_wrapped.c_long), ('flags', ctypes_wrapped.c_int), ('doc', ctypes.POINTER(ctypes_wrapped.c_byte))] structs.PyMemberDef = _class_struct_PyMemberDef del _class_struct_PyMemberDef class _class_struct__anonymous_asdl_seq(ctypes.Structure): _fields_ = [ ('size', ctypes_wrapped.c_int), ('elements', ctypes_wrapped.c_void_p * 1)] structs._anonymous_asdl_seq = _class_struct__anonymous_asdl_seq del _class_struct__anonymous_asdl_seq class _class_struct__anonymous_asdl_int_seq(ctypes.Structure): _fields_ = [ ('size', ctypes_wrapped.c_int), ('elements', ctypes_wrapped.c_int * 1)] structs._anonymous_asdl_int_seq = _class_struct__anonymous_asdl_int_seq del _class_struct__anonymous_asdl_int_seq class _class_struct__anonymous_label(ctypes.Structure): _fields_ = [ ('lb_type', ctypes_wrapped.c_int), ('lb_str', ctypes.POINTER(ctypes_wrapped.c_byte))] structs._anonymous_label = _class_struct__anonymous_label del _class_struct__anonymous_label class _class_struct__anonymous_labellist(ctypes.Structure): _fields_ = [ ('ll_nlabels', ctypes_wrapped.c_int), ('ll_label', ctypes.POINTER(structs._anonymous_label))] structs._anonymous_labellist = _class_struct__anonymous_labellist del _class_struct__anonymous_labellist class _class_struct__anonymous_arc(ctypes.Structure): _fields_ = [ ('a_lbl', ctypes_wrapped.c_short), ('a_arrow', ctypes_wrapped.c_short)] structs._anonymous_arc = _class_struct__anonymous_arc del _class_struct__anonymous_arc class _class_struct__anonymous_state(ctypes.Structure): _fields_ = [ ('s_narcs', ctypes_wrapped.c_int), ('s_arc', ctypes.POINTER(structs._anonymous_arc)), ('s_lower', ctypes_wrapped.c_int), ('s_upper', ctypes_wrapped.c_int), ('s_accel', ctypes.POINTER(ctypes_wrapped.c_int)), ('s_accept', ctypes_wrapped.c_int)] structs._anonymous_state = _class_struct__anonymous_state del _class_struct__anonymous_state class _class_struct__anonymous_dfa(ctypes.Structure): _fields_ = [ ('d_type', ctypes_wrapped.c_int), ('d_name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('d_initial', ctypes_wrapped.c_int), ('d_nstates', ctypes_wrapped.c_int), ('d_state', ctypes.POINTER(structs._anonymous_state)), ('d_first', ctypes.POINTER(ctypes_wrapped.c_byte))] structs._anonymous_dfa = _class_struct__anonymous_dfa del _class_struct__anonymous_dfa class _class_struct__anonymous_grammar(ctypes.Structure): _fields_ = [ ('g_ndfas', ctypes_wrapped.c_int), ('g_dfa', ctypes.POINTER(structs._anonymous_dfa)), ('g_ll', structs._anonymous_labellist), ('g_start', ctypes_wrapped.c_int), ('g_accel', ctypes_wrapped.c_int)] structs._anonymous_grammar = _class_struct__anonymous_grammar del _class_struct__anonymous_grammar class _class_struct__anonymous_perrdetail(ctypes.Structure): _fields_ = [ ('error', ctypes_wrapped.c_int), ('filename', ctypes.POINTER(ctypes_wrapped.c_byte)), ('lineno', ctypes_wrapped.c_int), ('offset', ctypes_wrapped.c_int), ('text', ctypes.POINTER(ctypes_wrapped.c_byte)), ('token', ctypes_wrapped.c_int), ('expected', ctypes_wrapped.c_int)] structs._anonymous_perrdetail = _class_struct__anonymous_perrdetail del _class_struct__anonymous_perrdetail class _class_struct_PyStructSequence_Field(ctypes.Structure): _fields_ = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('doc', ctypes.POINTER(ctypes_wrapped.c_byte))] structs.PyStructSequence_Field = _class_struct_PyStructSequence_Field del _class_struct_PyStructSequence_Field class _class_struct_PyStructSequence_Desc(ctypes.Structure): _fields_ = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('doc', ctypes.POINTER(ctypes_wrapped.c_byte)), ('fields', ctypes.POINTER(structs.PyStructSequence_Field)), ('n_in_sequence', ctypes_wrapped.c_int)] structs.PyStructSequence_Desc = _class_struct_PyStructSequence_Desc del _class_struct_PyStructSequence_Desc class _class_struct__anonymous_GroupGenerator(ctypes.Structure): _fields_ = [ ('grouping', ctypes.POINTER(ctypes_wrapped.c_byte)), ('previous', ctypes_wrapped.c_byte), ('i', ctypes_wrapped.c_long)] structs._anonymous_GroupGenerator = _class_struct__anonymous_GroupGenerator del _class_struct__anonymous_GroupGenerator class _class_struct__anonymous_SubString(ctypes.Structure): _fields_ = [ ('ptr', ctypes.POINTER(ctypes_wrapped.c_byte)), ('end', ctypes.POINTER(ctypes_wrapped.c_byte))] structs._anonymous_SubString = _class_struct__anonymous_SubString del _class_struct__anonymous_SubString class _class_struct__anonymous_AutoNumber(ctypes.Structure): _fields_ = [ ('an_state', ctypes_wrapped.c_uint32), ('an_field_number', ctypes_wrapped.c_int)] structs._anonymous_AutoNumber = _class_struct__anonymous_AutoNumber del _class_struct__anonymous_AutoNumber class _class_struct__anonymous_FieldNameIterator(ctypes.Structure): _fields_ = [ ('str', structs._anonymous_SubString), ('ptr', ctypes.POINTER(ctypes_wrapped.c_byte))] structs._anonymous_FieldNameIterator = _class_struct__anonymous_FieldNameIterator del _class_struct__anonymous_FieldNameIterator class _class_struct__anonymous_MarkupIterator(ctypes.Structure): _fields_ = [ ('str', structs._anonymous_SubString)] structs._anonymous_MarkupIterator = _class_struct__anonymous_MarkupIterator del _class_struct__anonymous_MarkupIterator class unions: pass class _class_struct__object(ctypes.Structure): pass structs._object = _class_struct__object class _class_struct__typeobject(ctypes.Structure): pass structs._typeobject = _class_struct__typeobject class _class_struct__anonymous_PyNumberMethods(ctypes.Structure): pass structs._anonymous_PyNumberMethods = _class_struct__anonymous_PyNumberMethods _class_struct__anonymous_PyNumberMethods.fields = [ ('nb_add', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_subtract', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_multiply', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_divide', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_remainder', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_divmod', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_power', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_negative', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_positive', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_absolute', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_nonzero', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object))), ('nb_invert', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_lshift', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_rshift', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_and', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_xor', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_or', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_coerce', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(ctypes.POINTER(structs._object)), ctypes.POINTER(ctypes.POINTER(structs._object)))), ('nb_int', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_long', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_float', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_oct', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_hex', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('nb_inplace_add', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_subtract', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_multiply', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_divide', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_remainder', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_power', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_lshift', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_rshift', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_and', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_xor', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_or', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_floor_divide', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_true_divide', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_floor_divide', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_inplace_true_divide', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('nb_index', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object)))] del _class_struct__anonymous_PyNumberMethods class _class_struct__anonymous_PySequenceMethods(ctypes.Structure): pass structs._anonymous_PySequenceMethods = _class_struct__anonymous_PySequenceMethods _class_struct__anonymous_PySequenceMethods.fields = [ ('sq_length', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object))), ('sq_concat', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('sq_repeat', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes_wrapped.c_long)), ('sq_item', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes_wrapped.c_long)), ('sq_slice', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes_wrapped.c_long, ctypes_wrapped.c_long)), ('sq_ass_item', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes_wrapped.c_long, ctypes.POINTER(structs._object))), ('sq_ass_slice', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes_wrapped.c_long, ctypes_wrapped.c_long, ctypes.POINTER(structs._object))), ('sq_contains', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('sq_inplace_concat', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('sq_inplace_repeat', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes_wrapped.c_long))] del _class_struct__anonymous_PySequenceMethods class _class_struct__anonymous_PyMappingMethods(ctypes.Structure): pass structs._anonymous_PyMappingMethods = _class_struct__anonymous_PyMappingMethods _class_struct__anonymous_PyMappingMethods.fields = [ ('mp_length', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object))), ('mp_subscript', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('mp_ass_subscript', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object)))] del _class_struct__anonymous_PyMappingMethods class _class_struct__anonymous_PyBufferProcs(ctypes.Structure): pass structs._anonymous_PyBufferProcs = _class_struct__anonymous_PyBufferProcs class _class_struct_bufferinfo(ctypes.Structure): pass structs.bufferinfo = _class_struct_bufferinfo _class_struct_bufferinfo.fields = [ ('buf', ctypes_wrapped.c_void_p), ('obj', ctypes.POINTER(structs._object)), ('len', ctypes_wrapped.c_long), ('itemsize', ctypes_wrapped.c_long), ('readonly', ctypes_wrapped.c_int), ('ndim', ctypes_wrapped.c_int), ('format', ctypes.POINTER(ctypes_wrapped.c_byte)), ('shape', ctypes.POINTER(ctypes_wrapped.c_long)), ('strides', ctypes.POINTER(ctypes_wrapped.c_long)), ('suboffsets', ctypes.POINTER(ctypes_wrapped.c_long)), ('smalltable', ctypes_wrapped.c_long * 2), ('internal', ctypes_wrapped.c_void_p)] del _class_struct_bufferinfo _class_struct__anonymous_PyBufferProcs.fields = [ ('bf_getreadbuffer', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object), ctypes_wrapped.c_long, ctypes.POINTER(ctypes_wrapped.c_void_p))), ('bf_getwritebuffer', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object), ctypes_wrapped.c_long, ctypes.POINTER(ctypes_wrapped.c_void_p))), ('bf_getsegcount', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object), ctypes.POINTER(ctypes_wrapped.c_long))), ('bf_getcharbuffer', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object), ctypes_wrapped.c_long, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte)))), ('bf_getbuffer', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs.bufferinfo), ctypes_wrapped.c_int)), ('bf_releasebuffer', ctypes.CFUNCTYPE(None, ctypes.POINTER(structs._object), ctypes.POINTER(structs.bufferinfo)))] del _class_struct__anonymous_PyBufferProcs class _class_struct_PyMethodDef(ctypes.Structure): pass structs.PyMethodDef = _class_struct_PyMethodDef _class_struct_PyMethodDef.fields = [ ('ml_name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('ml_meth', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('ml_flags', ctypes_wrapped.c_int), ('ml_doc', ctypes.POINTER(ctypes_wrapped.c_byte))] del _class_struct_PyMethodDef class _class_struct_PyGetSetDef(ctypes.Structure): pass structs.PyGetSetDef = _class_struct_PyGetSetDef _class_struct_PyGetSetDef.fields = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('get', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes_wrapped.c_void_p)), ('set', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes_wrapped.c_void_p)), ('doc', ctypes.POINTER(ctypes_wrapped.c_byte)), ('closure', ctypes_wrapped.c_void_p)] del _class_struct_PyGetSetDef _class_struct__typeobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('tp_name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('tp_basicsize', ctypes_wrapped.c_long), ('tp_itemsize', ctypes_wrapped.c_long), ('tp_dealloc', ctypes.CFUNCTYPE(None, ctypes.POINTER(structs._object))), ('tp_print', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)), ('tp_getattr', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(ctypes_wrapped.c_byte))), ('tp_setattr', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(structs._object))), ('tp_compare', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_repr', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('tp_as_number', ctypes.POINTER(structs._anonymous_PyNumberMethods)), ('tp_as_sequence', ctypes.POINTER(structs._anonymous_PySequenceMethods)), ('tp_as_mapping', ctypes.POINTER(structs._anonymous_PyMappingMethods)), ('tp_hash', ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(structs._object))), ('tp_call', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_str', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('tp_getattro', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_setattro', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_as_buffer', ctypes.POINTER(structs._anonymous_PyBufferProcs)), ('tp_flags', ctypes_wrapped.c_long), ('tp_doc', ctypes.POINTER(ctypes_wrapped.c_byte)), ('tp_traverse', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes_wrapped.c_void_p), ctypes_wrapped.c_void_p)), ('tp_clear', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object))), ('tp_richcompare', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes_wrapped.c_int)), ('tp_weaklistoffset', ctypes_wrapped.c_long), ('tp_iter', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('tp_iternext', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object))), ('tp_methods', ctypes.POINTER(structs.PyMethodDef)), ('tp_members', ctypes.POINTER(structs.PyMemberDef)), ('tp_getset', ctypes.POINTER(structs.PyGetSetDef)), ('tp_base', ctypes.POINTER(structs._typeobject)), ('tp_dict', ctypes.POINTER(structs._object)), ('tp_descr_get', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_descr_set', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_dictoffset', ctypes_wrapped.c_long), ('tp_init', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_alloc', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._typeobject), ctypes_wrapped.c_long)), ('tp_new', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._typeobject), ctypes.POINTER(structs._object), ctypes.POINTER(structs._object))), ('tp_free', ctypes.CFUNCTYPE(None, ctypes_wrapped.c_void_p)), ('tp_is_gc', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object))), ('tp_bases', ctypes.POINTER(structs._object)), ('tp_mro', ctypes.POINTER(structs._object)), ('tp_cache', ctypes.POINTER(structs._object)), ('tp_subclasses', ctypes.POINTER(structs._object)), ('tp_weaklist', ctypes.POINTER(structs._object)), ('tp_del', ctypes.CFUNCTYPE(None, ctypes.POINTER(structs._object))), ('tp_version_tag', ctypes_wrapped.c_uint)] del _class_struct__typeobject _class_struct__object.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject))] del _class_struct__object class _class_struct__anonymous_PyVarObject(ctypes.Structure): pass structs._anonymous_PyVarObject = _class_struct__anonymous_PyVarObject _class_struct__anonymous_PyVarObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long)] del _class_struct__anonymous_PyVarObject class _class_struct__heaptypeobject(ctypes.Structure): pass structs._heaptypeobject = _class_struct__heaptypeobject _class_struct__heaptypeobject.fields = [ ('ht_type', structs._typeobject), ('as_number', structs._anonymous_PyNumberMethods), ('as_mapping', structs._anonymous_PyMappingMethods), ('as_sequence', structs._anonymous_PySequenceMethods), ('as_buffer', structs._anonymous_PyBufferProcs), ('ht_name', ctypes.POINTER(structs._object)), ('ht_slots', ctypes.POINTER(structs._object))] del _class_struct__heaptypeobject class _class_struct__anonymous_PyIntObject(ctypes.Structure): pass structs._anonymous_PyIntObject = _class_struct__anonymous_PyIntObject _class_struct__anonymous_PyIntObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_ival', ctypes_wrapped.c_long)] del _class_struct__anonymous_PyIntObject class _class_struct__anonymous_PyFloatObject(ctypes.Structure): pass structs._anonymous_PyFloatObject = _class_struct__anonymous_PyFloatObject _class_struct__anonymous_PyFloatObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_fval', ctypes_wrapped.c_double)] del _class_struct__anonymous_PyFloatObject class _class_struct__anonymous_PyComplexObject(ctypes.Structure): pass structs._anonymous_PyComplexObject = _class_struct__anonymous_PyComplexObject _class_struct__anonymous_PyComplexObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('cval', structs._anonymous_Py_complex)] del _class_struct__anonymous_PyComplexObject class _class_struct__anonymous_PyStringObject(ctypes.Structure): pass structs._anonymous_PyStringObject = _class_struct__anonymous_PyStringObject _class_struct__anonymous_PyStringObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('ob_shash', ctypes_wrapped.c_long), ('ob_sstate', ctypes_wrapped.c_int), ('ob_sval', ctypes_wrapped.c_byte * 1)] del _class_struct__anonymous_PyStringObject class _class_struct__anonymous_PyMemoryViewObject(ctypes.Structure): pass structs._anonymous_PyMemoryViewObject = _class_struct__anonymous_PyMemoryViewObject _class_struct__anonymous_PyMemoryViewObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('base', ctypes.POINTER(structs._object)), ('view', structs.bufferinfo)] del _class_struct__anonymous_PyMemoryViewObject class _class_struct__anonymous_PyByteArrayObject(ctypes.Structure): pass structs._anonymous_PyByteArrayObject = _class_struct__anonymous_PyByteArrayObject _class_struct__anonymous_PyByteArrayObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('ob_exports', ctypes_wrapped.c_int), ('ob_alloc', ctypes_wrapped.c_long), ('ob_bytes', ctypes.POINTER(ctypes_wrapped.c_byte))] del _class_struct__anonymous_PyByteArrayObject class _class_struct__anonymous_PyTupleObject(ctypes.Structure): pass structs._anonymous_PyTupleObject = _class_struct__anonymous_PyTupleObject _class_struct__anonymous_PyTupleObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('ob_item', ctypes.POINTER(structs._object) * 1)] del _class_struct__anonymous_PyTupleObject class _class_struct__anonymous_PyListObject(ctypes.Structure): pass structs._anonymous_PyListObject = _class_struct__anonymous_PyListObject _class_struct__anonymous_PyListObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('ob_item', ctypes.POINTER(ctypes.POINTER(structs._object))), ('allocated', ctypes_wrapped.c_long)] del _class_struct__anonymous_PyListObject class _class_struct__anonymous_PyDictEntry(ctypes.Structure): pass structs._anonymous_PyDictEntry = _class_struct__anonymous_PyDictEntry _class_struct__anonymous_PyDictEntry.fields = [ ('me_hash', ctypes_wrapped.c_long), ('me_key', ctypes.POINTER(structs._object)), ('me_value', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyDictEntry class _class_struct__dictobject(ctypes.Structure): pass structs._dictobject = _class_struct__dictobject _class_struct__dictobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ma_fill', ctypes_wrapped.c_long), ('ma_used', ctypes_wrapped.c_long), ('ma_mask', ctypes_wrapped.c_long), ('ma_table', ctypes.POINTER(structs._anonymous_PyDictEntry)), ('ma_lookup', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._dictobject), ctypes.POINTER(structs._object), ctypes_wrapped.c_long)), ('ma_smalltable', structs._anonymous_PyDictEntry * 8)] del _class_struct__dictobject class _class_struct__anonymous_setentry(ctypes.Structure): pass structs._anonymous_setentry = _class_struct__anonymous_setentry _class_struct__anonymous_setentry.fields = [ ('hash', ctypes_wrapped.c_long), ('key', ctypes.POINTER(structs._object))] del _class_struct__anonymous_setentry class _class_struct__setobject(ctypes.Structure): pass structs._setobject = _class_struct__setobject _class_struct__setobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('fill', ctypes_wrapped.c_long), ('used', ctypes_wrapped.c_long), ('mask', ctypes_wrapped.c_long), ('table', ctypes.POINTER(structs._anonymous_setentry)), ('lookup', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._setobject), ctypes.POINTER(structs._object), ctypes_wrapped.c_long)), ('smalltable', structs._anonymous_setentry * 8), ('hash', ctypes_wrapped.c_long), ('weakreflist', ctypes.POINTER(structs._object))] del _class_struct__setobject class _class_struct_PyMethodChain(ctypes.Structure): pass structs.PyMethodChain = _class_struct_PyMethodChain _class_struct_PyMethodChain.fields = [ ('methods', ctypes.POINTER(structs.PyMethodDef)), ('link', ctypes.POINTER(structs.PyMethodChain))] del _class_struct_PyMethodChain class _class_struct__anonymous_PyCFunctionObject(ctypes.Structure): pass structs._anonymous_PyCFunctionObject = _class_struct__anonymous_PyCFunctionObject _class_struct__anonymous_PyCFunctionObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('m_ml', ctypes.POINTER(structs.PyMethodDef)), ('m_self', ctypes.POINTER(structs._object)), ('m_module', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyCFunctionObject class _class_struct__anonymous_PyFunctionObject(ctypes.Structure): pass structs._anonymous_PyFunctionObject = _class_struct__anonymous_PyFunctionObject _class_struct__anonymous_PyFunctionObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('func_code', ctypes.POINTER(structs._object)), ('func_globals', ctypes.POINTER(structs._object)), ('func_defaults', ctypes.POINTER(structs._object)), ('func_closure', ctypes.POINTER(structs._object)), ('func_doc', ctypes.POINTER(structs._object)), ('func_name', ctypes.POINTER(structs._object)), ('func_dict', ctypes.POINTER(structs._object)), ('func_weakreflist', ctypes.POINTER(structs._object)), ('func_module', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyFunctionObject class _class_struct__anonymous_PyClassObject(ctypes.Structure): pass structs._anonymous_PyClassObject = _class_struct__anonymous_PyClassObject _class_struct__anonymous_PyClassObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('cl_bases', ctypes.POINTER(structs._object)), ('cl_dict', ctypes.POINTER(structs._object)), ('cl_name', ctypes.POINTER(structs._object)), ('cl_getattr', ctypes.POINTER(structs._object)), ('cl_setattr', ctypes.POINTER(structs._object)), ('cl_delattr', ctypes.POINTER(structs._object)), ('cl_weakreflist', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyClassObject class _class_struct__anonymous_PyInstanceObject(ctypes.Structure): pass structs._anonymous_PyInstanceObject = _class_struct__anonymous_PyInstanceObject _class_struct__anonymous_PyInstanceObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('in_class', ctypes.POINTER(structs._anonymous_PyClassObject)), ('in_dict', ctypes.POINTER(structs._object)), ('in_weakreflist', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyInstanceObject class _class_struct__anonymous_PyMethodObject(ctypes.Structure): pass structs._anonymous_PyMethodObject = _class_struct__anonymous_PyMethodObject _class_struct__anonymous_PyMethodObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('im_func', ctypes.POINTER(structs._object)), ('im_self', ctypes.POINTER(structs._object)), ('im_class', ctypes.POINTER(structs._object)), ('im_weakreflist', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyMethodObject class _class_struct__anonymous_PyFileObject(ctypes.Structure): pass structs._anonymous_PyFileObject = _class_struct__anonymous_PyFileObject _class_struct__anonymous_PyFileObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('f_fp', ctypes.POINTER(ctypes_wrapped.c_int)), ('f_name', ctypes.POINTER(structs._object)), ('f_mode', ctypes.POINTER(structs._object)), ('f_close', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(ctypes_wrapped.c_int))), ('f_softspace', ctypes_wrapped.c_int), ('f_binary', ctypes_wrapped.c_int), ('f_buf', ctypes.POINTER(ctypes_wrapped.c_byte)), ('f_bufend', ctypes.POINTER(ctypes_wrapped.c_byte)), ('f_bufptr', ctypes.POINTER(ctypes_wrapped.c_byte)), ('f_setbuf', ctypes.POINTER(ctypes_wrapped.c_byte)), ('f_univ_newline', ctypes_wrapped.c_int), ('f_newlinetypes', ctypes_wrapped.c_int), ('f_skipnextlf', ctypes_wrapped.c_int), ('f_encoding', ctypes.POINTER(structs._object)), ('f_errors', ctypes.POINTER(structs._object)), ('weakreflist', ctypes.POINTER(structs._object)), ('unlocked_count', ctypes_wrapped.c_int), ('readable', ctypes_wrapped.c_int), ('writable', ctypes_wrapped.c_int)] del _class_struct__anonymous_PyFileObject class _class_struct__anonymous_PyCObject(ctypes.Structure): pass structs._anonymous_PyCObject = _class_struct__anonymous_PyCObject _class_struct__anonymous_PyCObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('cobject', ctypes_wrapped.c_void_p), ('desc', ctypes_wrapped.c_void_p), ('destructor', ctypes.CFUNCTYPE(None, ctypes_wrapped.c_void_p))] del _class_struct__anonymous_PyCObject class _class_struct__traceback(ctypes.Structure): pass structs._traceback = _class_struct__traceback class _class_struct__frame(ctypes.Structure): pass structs._frame = _class_struct__frame class _class_struct__anonymous_PyCodeObject(ctypes.Structure): pass structs._anonymous_PyCodeObject = _class_struct__anonymous_PyCodeObject _class_struct__anonymous_PyCodeObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('co_argcount', ctypes_wrapped.c_int), ('co_nlocals', ctypes_wrapped.c_int), ('co_stacksize', ctypes_wrapped.c_int), ('co_flags', ctypes_wrapped.c_int), ('co_code', ctypes.POINTER(structs._object)), ('co_consts', ctypes.POINTER(structs._object)), ('co_names', ctypes.POINTER(structs._object)), ('co_varnames', ctypes.POINTER(structs._object)), ('co_freevars', ctypes.POINTER(structs._object)), ('co_cellvars', ctypes.POINTER(structs._object)), ('co_filename', ctypes.POINTER(structs._object)), ('co_name', ctypes.POINTER(structs._object)), ('co_firstlineno', ctypes_wrapped.c_int), ('co_lnotab', ctypes.POINTER(structs._object)), ('co_zombieframe', ctypes_wrapped.c_void_p), ('co_weakreflist', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyCodeObject class _class_struct__ts(ctypes.Structure): pass structs._ts = _class_struct__ts class _class_struct__is(ctypes.Structure): pass structs._is = _class_struct__is _class_struct__is.fields = [ ('next', ctypes.POINTER(structs._is)), ('tstate_head', ctypes.POINTER(structs._ts)), ('modules', ctypes.POINTER(structs._object)), ('sysdict', ctypes.POINTER(structs._object)), ('builtins', ctypes.POINTER(structs._object)), ('modules_reloading', ctypes.POINTER(structs._object)), ('codec_search_path', ctypes.POINTER(structs._object)), ('codec_search_cache', ctypes.POINTER(structs._object)), ('codec_error_registry', ctypes.POINTER(structs._object))] del _class_struct__is _class_struct__ts.fields = [ ('next', ctypes.POINTER(structs._ts)), ('interp', ctypes.POINTER(structs._is)), ('frame', ctypes.POINTER(structs._frame)), ('recursion_depth', ctypes_wrapped.c_int), ('tracing', ctypes_wrapped.c_int), ('use_tracing', ctypes_wrapped.c_int), ('c_profilefunc', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._frame), ctypes_wrapped.c_int, ctypes.POINTER(structs._object))), ('c_tracefunc', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(structs._object), ctypes.POINTER(structs._frame), ctypes_wrapped.c_int, ctypes.POINTER(structs._object))), ('c_profileobj', ctypes.POINTER(structs._object)), ('c_traceobj', ctypes.POINTER(structs._object)), ('curexc_type', ctypes.POINTER(structs._object)), ('curexc_value', ctypes.POINTER(structs._object)), ('curexc_traceback', ctypes.POINTER(structs._object)), ('exc_type', ctypes.POINTER(structs._object)), ('exc_value', ctypes.POINTER(structs._object)), ('exc_traceback', ctypes.POINTER(structs._object)), ('dict', ctypes.POINTER(structs._object)), ('tick_counter', ctypes_wrapped.c_int), ('gilstate_counter', ctypes_wrapped.c_int), ('async_exc', ctypes.POINTER(structs._object)), ('thread_id', ctypes_wrapped.c_long), ('trash_delete_nesting', ctypes_wrapped.c_int), ('trash_delete_later', ctypes.POINTER(structs._object))] del _class_struct__ts _class_struct__frame.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('f_back', ctypes.POINTER(structs._frame)), ('f_code', ctypes.POINTER(structs._anonymous_PyCodeObject)), ('f_builtins', ctypes.POINTER(structs._object)), ('f_globals', ctypes.POINTER(structs._object)), ('f_locals', ctypes.POINTER(structs._object)), ('f_valuestack', ctypes.POINTER(ctypes.POINTER(structs._object))), ('f_stacktop', ctypes.POINTER(ctypes.POINTER(structs._object))), ('f_trace', ctypes.POINTER(structs._object)), ('f_exc_type', ctypes.POINTER(structs._object)), ('f_exc_value', ctypes.POINTER(structs._object)), ('f_exc_traceback', ctypes.POINTER(structs._object)), ('f_tstate', ctypes.POINTER(structs._ts)), ('f_lasti', ctypes_wrapped.c_int), ('f_lineno', ctypes_wrapped.c_int), ('f_iblock', ctypes_wrapped.c_int), ('f_blockstack', structs._anonymous_PyTryBlock * 20), ('f_localsplus', ctypes.POINTER(structs._object) * 1)] del _class_struct__frame _class_struct__traceback.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('tb_next', ctypes.POINTER(structs._traceback)), ('tb_frame', ctypes.POINTER(structs._frame)), ('tb_lasti', ctypes_wrapped.c_int), ('tb_lineno', ctypes_wrapped.c_int)] del _class_struct__traceback class _class_struct__anonymous_PySliceObject(ctypes.Structure): pass structs._anonymous_PySliceObject = _class_struct__anonymous_PySliceObject _class_struct__anonymous_PySliceObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('start', ctypes.POINTER(structs._object)), ('stop', ctypes.POINTER(structs._object)), ('step', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PySliceObject class _class_struct__anonymous_PyCellObject(ctypes.Structure): pass structs._anonymous_PyCellObject = _class_struct__anonymous_PyCellObject _class_struct__anonymous_PyCellObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_ref', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyCellObject class _class_struct__anonymous_PyGenObject(ctypes.Structure): pass structs._anonymous_PyGenObject = _class_struct__anonymous_PyGenObject _class_struct__anonymous_PyGenObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('gi_frame', ctypes.POINTER(structs._frame)), ('gi_running', ctypes_wrapped.c_int), ('gi_code', ctypes.POINTER(structs._object)), ('gi_weakreflist', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyGenObject class _class_struct_wrapperbase(ctypes.Structure): pass structs.wrapperbase = _class_struct_wrapperbase _class_struct_wrapperbase.fields = [ ('name', ctypes.POINTER(ctypes_wrapped.c_byte)), ('offset', ctypes_wrapped.c_int), ('function', ctypes_wrapped.c_void_p), ('wrapper', ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._object), ctypes.POINTER(structs._object), ctypes_wrapped.c_void_p)), ('doc', ctypes.POINTER(ctypes_wrapped.c_byte)), ('flags', ctypes_wrapped.c_int), ('name_strobj', ctypes.POINTER(structs._object))] del _class_struct_wrapperbase class _class_struct__anonymous_PyDescrObject(ctypes.Structure): pass structs._anonymous_PyDescrObject = _class_struct__anonymous_PyDescrObject _class_struct__anonymous_PyDescrObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('d_type', ctypes.POINTER(structs._typeobject)), ('d_name', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyDescrObject class _class_struct__anonymous_PyMethodDescrObject(ctypes.Structure): pass structs._anonymous_PyMethodDescrObject = _class_struct__anonymous_PyMethodDescrObject _class_struct__anonymous_PyMethodDescrObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('d_type', ctypes.POINTER(structs._typeobject)), ('d_name', ctypes.POINTER(structs._object)), ('d_method', ctypes.POINTER(structs.PyMethodDef))] del _class_struct__anonymous_PyMethodDescrObject class _class_struct__anonymous_PyMemberDescrObject(ctypes.Structure): pass structs._anonymous_PyMemberDescrObject = _class_struct__anonymous_PyMemberDescrObject _class_struct__anonymous_PyMemberDescrObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('d_type', ctypes.POINTER(structs._typeobject)), ('d_name', ctypes.POINTER(structs._object)), ('d_member', ctypes.POINTER(structs.PyMemberDef))] del _class_struct__anonymous_PyMemberDescrObject class _class_struct__anonymous_PyGetSetDescrObject(ctypes.Structure): pass structs._anonymous_PyGetSetDescrObject = _class_struct__anonymous_PyGetSetDescrObject _class_struct__anonymous_PyGetSetDescrObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('d_type', ctypes.POINTER(structs._typeobject)), ('d_name', ctypes.POINTER(structs._object)), ('d_getset', ctypes.POINTER(structs.PyGetSetDef))] del _class_struct__anonymous_PyGetSetDescrObject class _class_struct__anonymous_PyWrapperDescrObject(ctypes.Structure): pass structs._anonymous_PyWrapperDescrObject = _class_struct__anonymous_PyWrapperDescrObject _class_struct__anonymous_PyWrapperDescrObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('d_type', ctypes.POINTER(structs._typeobject)), ('d_name', ctypes.POINTER(structs._object)), ('d_base', ctypes.POINTER(structs.wrapperbase)), ('d_wrapped', ctypes_wrapped.c_void_p)] del _class_struct__anonymous_PyWrapperDescrObject class _class_struct__PyWeakReference(ctypes.Structure): pass structs._PyWeakReference = _class_struct__PyWeakReference _class_struct__PyWeakReference.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('wr_object', ctypes.POINTER(structs._object)), ('wr_callback', ctypes.POINTER(structs._object)), ('hash', ctypes_wrapped.c_long), ('wr_prev', ctypes.POINTER(structs._PyWeakReference)), ('wr_next', ctypes.POINTER(structs._PyWeakReference))] del _class_struct__PyWeakReference class _class_struct__anonymous_PyBaseExceptionObject(ctypes.Structure): pass structs._anonymous_PyBaseExceptionObject = _class_struct__anonymous_PyBaseExceptionObject _class_struct__anonymous_PyBaseExceptionObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('dict', ctypes.POINTER(structs._object)), ('args', ctypes.POINTER(structs._object)), ('message', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyBaseExceptionObject class _class_struct__anonymous_PySyntaxErrorObject(ctypes.Structure): pass structs._anonymous_PySyntaxErrorObject = _class_struct__anonymous_PySyntaxErrorObject _class_struct__anonymous_PySyntaxErrorObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('dict', ctypes.POINTER(structs._object)), ('args', ctypes.POINTER(structs._object)), ('message', ctypes.POINTER(structs._object)), ('msg', ctypes.POINTER(structs._object)), ('filename', ctypes.POINTER(structs._object)), ('lineno', ctypes.POINTER(structs._object)), ('offset', ctypes.POINTER(structs._object)), ('text', ctypes.POINTER(structs._object)), ('print_file_and_line', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PySyntaxErrorObject class _class_struct__anonymous_PySystemExitObject(ctypes.Structure): pass structs._anonymous_PySystemExitObject = _class_struct__anonymous_PySystemExitObject _class_struct__anonymous_PySystemExitObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('dict', ctypes.POINTER(structs._object)), ('args', ctypes.POINTER(structs._object)), ('message', ctypes.POINTER(structs._object)), ('code', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PySystemExitObject class _class_struct__anonymous_PyEnvironmentErrorObject(ctypes.Structure): pass structs._anonymous_PyEnvironmentErrorObject = _class_struct__anonymous_PyEnvironmentErrorObject _class_struct__anonymous_PyEnvironmentErrorObject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('dict', ctypes.POINTER(structs._object)), ('args', ctypes.POINTER(structs._object)), ('message', ctypes.POINTER(structs._object)), ('myerrno', ctypes.POINTER(structs._object)), ('strerror', ctypes.POINTER(structs._object)), ('filename', ctypes.POINTER(structs._object))] del _class_struct__anonymous_PyEnvironmentErrorObject class _class_struct__mod(ctypes.Structure): pass structs._mod = _class_struct__mod class _class_union__local__anonymous_1(ctypes.Union): pass unions._local__anonymous_1 = _class_union__local__anonymous_1 class _class_struct__local__anonymous_7(ctypes.Structure): pass structs._local__anonymous_7 = _class_struct__local__anonymous_7 _class_struct__local__anonymous_7.fields = [ ('body', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_7 class _class_struct__local__anonymous_8(ctypes.Structure): pass structs._local__anonymous_8 = _class_struct__local__anonymous_8 _class_struct__local__anonymous_8.fields = [ ('body', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_8 class _class_struct__local__anonymous_9(ctypes.Structure): pass structs._local__anonymous_9 = _class_struct__local__anonymous_9 class _class_struct__expr(ctypes.Structure): pass structs._expr = _class_struct__expr class _class_union__local__anonymous_3(ctypes.Union): pass unions._local__anonymous_3 = _class_union__local__anonymous_3 class _class_struct__local__anonymous_10(ctypes.Structure): pass structs._local__anonymous_10 = _class_struct__local__anonymous_10 _class_struct__local__anonymous_10.fields = [ ('op', ctypes_wrapped.c_uint32), ('values', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_10 class _class_struct__local__anonymous_11(ctypes.Structure): pass structs._local__anonymous_11 = _class_struct__local__anonymous_11 _class_struct__local__anonymous_11.fields = [ ('left', ctypes.POINTER(structs._expr)), ('op', ctypes_wrapped.c_uint32), ('right', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_11 class _class_struct__local__anonymous_12(ctypes.Structure): pass structs._local__anonymous_12 = _class_struct__local__anonymous_12 _class_struct__local__anonymous_12.fields = [ ('op', ctypes_wrapped.c_uint32), ('operand', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_12 class _class_struct__local__anonymous_13(ctypes.Structure): pass structs._local__anonymous_13 = _class_struct__local__anonymous_13 class _class_struct__arguments(ctypes.Structure): pass structs._arguments = _class_struct__arguments _class_struct__arguments.fields = [ ('args', ctypes.POINTER(structs._anonymous_asdl_seq)), ('vararg', ctypes.POINTER(structs._object)), ('kwarg', ctypes.POINTER(structs._object)), ('defaults', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__arguments _class_struct__local__anonymous_13.fields = [ ('args', ctypes.POINTER(structs._arguments)), ('body', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_13 class _class_struct__local__anonymous_14(ctypes.Structure): pass structs._local__anonymous_14 = _class_struct__local__anonymous_14 _class_struct__local__anonymous_14.fields = [ ('test', ctypes.POINTER(structs._expr)), ('body', ctypes.POINTER(structs._expr)), ('orelse', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_14 class _class_struct__local__anonymous_15(ctypes.Structure): pass structs._local__anonymous_15 = _class_struct__local__anonymous_15 _class_struct__local__anonymous_15.fields = [ ('keys', ctypes.POINTER(structs._anonymous_asdl_seq)), ('values', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_15 class _class_struct__local__anonymous_16(ctypes.Structure): pass structs._local__anonymous_16 = _class_struct__local__anonymous_16 _class_struct__local__anonymous_16.fields = [ ('elts', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_16 class _class_struct__local__anonymous_17(ctypes.Structure): pass structs._local__anonymous_17 = _class_struct__local__anonymous_17 _class_struct__local__anonymous_17.fields = [ ('elt', ctypes.POINTER(structs._expr)), ('generators', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_17 class _class_struct__local__anonymous_18(ctypes.Structure): pass structs._local__anonymous_18 = _class_struct__local__anonymous_18 _class_struct__local__anonymous_18.fields = [ ('elt', ctypes.POINTER(structs._expr)), ('generators', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_18 class _class_struct__local__anonymous_19(ctypes.Structure): pass structs._local__anonymous_19 = _class_struct__local__anonymous_19 _class_struct__local__anonymous_19.fields = [ ('key', ctypes.POINTER(structs._expr)), ('value', ctypes.POINTER(structs._expr)), ('generators', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_19 class _class_struct__local__anonymous_20(ctypes.Structure): pass structs._local__anonymous_20 = _class_struct__local__anonymous_20 _class_struct__local__anonymous_20.fields = [ ('elt', ctypes.POINTER(structs._expr)), ('generators', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_20 class _class_struct__local__anonymous_21(ctypes.Structure): pass structs._local__anonymous_21 = _class_struct__local__anonymous_21 _class_struct__local__anonymous_21.fields = [ ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_21 class _class_struct__local__anonymous_22(ctypes.Structure): pass structs._local__anonymous_22 = _class_struct__local__anonymous_22 _class_struct__local__anonymous_22.fields = [ ('left', ctypes.POINTER(structs._expr)), ('ops', ctypes.POINTER(structs._anonymous_asdl_int_seq)), ('comparators', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_22 class _class_struct__local__anonymous_23(ctypes.Structure): pass structs._local__anonymous_23 = _class_struct__local__anonymous_23 _class_struct__local__anonymous_23.fields = [ ('func', ctypes.POINTER(structs._expr)), ('args', ctypes.POINTER(structs._anonymous_asdl_seq)), ('keywords', ctypes.POINTER(structs._anonymous_asdl_seq)), ('starargs', ctypes.POINTER(structs._expr)), ('kwargs', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_23 class _class_struct__local__anonymous_24(ctypes.Structure): pass structs._local__anonymous_24 = _class_struct__local__anonymous_24 _class_struct__local__anonymous_24.fields = [ ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_24 class _class_struct__local__anonymous_25(ctypes.Structure): pass structs._local__anonymous_25 = _class_struct__local__anonymous_25 _class_struct__local__anonymous_25.fields = [ ('n', ctypes.POINTER(structs._object))] del _class_struct__local__anonymous_25 class _class_struct__local__anonymous_26(ctypes.Structure): pass structs._local__anonymous_26 = _class_struct__local__anonymous_26 _class_struct__local__anonymous_26.fields = [ ('s', ctypes.POINTER(structs._object))] del _class_struct__local__anonymous_26 class _class_struct__local__anonymous_27(ctypes.Structure): pass structs._local__anonymous_27 = _class_struct__local__anonymous_27 _class_struct__local__anonymous_27.fields = [ ('value', ctypes.POINTER(structs._expr)), ('attr', ctypes.POINTER(structs._object)), ('ctx', ctypes_wrapped.c_uint32)] del _class_struct__local__anonymous_27 class _class_struct__local__anonymous_28(ctypes.Structure): pass structs._local__anonymous_28 = _class_struct__local__anonymous_28 class _class_struct__slice(ctypes.Structure): pass structs._slice = _class_struct__slice class _class_union__local__anonymous_4(ctypes.Union): pass unions._local__anonymous_4 = _class_union__local__anonymous_4 class _class_struct__local__anonymous_29(ctypes.Structure): pass structs._local__anonymous_29 = _class_struct__local__anonymous_29 _class_struct__local__anonymous_29.fields = [ ('lower', ctypes.POINTER(structs._expr)), ('upper', ctypes.POINTER(structs._expr)), ('step', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_29 class _class_struct__local__anonymous_30(ctypes.Structure): pass structs._local__anonymous_30 = _class_struct__local__anonymous_30 _class_struct__local__anonymous_30.fields = [ ('dims', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_30 class _class_struct__local__anonymous_31(ctypes.Structure): pass structs._local__anonymous_31 = _class_struct__local__anonymous_31 _class_struct__local__anonymous_31.fields = [ ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_31 _class_union__local__anonymous_4.fields = [ ('Slice', structs._local__anonymous_29), ('ExtSlice', structs._local__anonymous_30), ('Index', structs._local__anonymous_31)] del _class_union__local__anonymous_4 _class_struct__slice.fields = [ ('kind', ctypes_wrapped.c_uint32), ('v', unions._local__anonymous_4)] del _class_struct__slice _class_struct__local__anonymous_28.fields = [ ('value', ctypes.POINTER(structs._expr)), ('slice', ctypes.POINTER(structs._slice)), ('ctx', ctypes_wrapped.c_uint32)] del _class_struct__local__anonymous_28 class _class_struct__local__anonymous_32(ctypes.Structure): pass structs._local__anonymous_32 = _class_struct__local__anonymous_32 _class_struct__local__anonymous_32.fields = [ ('id', ctypes.POINTER(structs._object)), ('ctx', ctypes_wrapped.c_uint32)] del _class_struct__local__anonymous_32 class _class_struct__local__anonymous_33(ctypes.Structure): pass structs._local__anonymous_33 = _class_struct__local__anonymous_33 _class_struct__local__anonymous_33.fields = [ ('elts', ctypes.POINTER(structs._anonymous_asdl_seq)), ('ctx', ctypes_wrapped.c_uint32)] del _class_struct__local__anonymous_33 class _class_struct__local__anonymous_34(ctypes.Structure): pass structs._local__anonymous_34 = _class_struct__local__anonymous_34 _class_struct__local__anonymous_34.fields = [ ('elts', ctypes.POINTER(structs._anonymous_asdl_seq)), ('ctx', ctypes_wrapped.c_uint32)] del _class_struct__local__anonymous_34 _class_union__local__anonymous_3.fields = [ ('BoolOp', structs._local__anonymous_10), ('BinOp', structs._local__anonymous_11), ('UnaryOp', structs._local__anonymous_12), ('Lambda', structs._local__anonymous_13), ('IfExp', structs._local__anonymous_14), ('Dict', structs._local__anonymous_15), ('Set', structs._local__anonymous_16), ('ListComp', structs._local__anonymous_17), ('SetComp', structs._local__anonymous_18), ('DictComp', structs._local__anonymous_19), ('GeneratorExp', structs._local__anonymous_20), ('Yield', structs._local__anonymous_21), ('Compare', structs._local__anonymous_22), ('Call', structs._local__anonymous_23), ('Repr', structs._local__anonymous_24), ('Num', structs._local__anonymous_25), ('Str', structs._local__anonymous_26), ('Attribute', structs._local__anonymous_27), ('Subscript', structs._local__anonymous_28), ('Name', structs._local__anonymous_32), ('List', structs._local__anonymous_33), ('Tuple', structs._local__anonymous_34)] del _class_union__local__anonymous_3 _class_struct__expr.fields = [ ('kind', ctypes_wrapped.c_uint32), ('v', unions._local__anonymous_3), ('lineno', ctypes_wrapped.c_int), ('col_offset', ctypes_wrapped.c_int)] del _class_struct__expr _class_struct__local__anonymous_9.fields = [ ('body', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_9 class _class_struct__local__anonymous_35(ctypes.Structure): pass structs._local__anonymous_35 = _class_struct__local__anonymous_35 _class_struct__local__anonymous_35.fields = [ ('body', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_35 _class_union__local__anonymous_1.fields = [ ('Module', structs._local__anonymous_7), ('Interactive', structs._local__anonymous_8), ('Expression', structs._local__anonymous_9), ('Suite', structs._local__anonymous_35)] del _class_union__local__anonymous_1 _class_struct__mod.fields = [ ('kind', ctypes_wrapped.c_uint32), ('v', unions._local__anonymous_1)] del _class_struct__mod class _class_struct__stmt(ctypes.Structure): pass structs._stmt = _class_struct__stmt class _class_union__local__anonymous_2(ctypes.Union): pass unions._local__anonymous_2 = _class_union__local__anonymous_2 class _class_struct__local__anonymous_36(ctypes.Structure): pass structs._local__anonymous_36 = _class_struct__local__anonymous_36 _class_struct__local__anonymous_36.fields = [ ('name', ctypes.POINTER(structs._object)), ('args', ctypes.POINTER(structs._arguments)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('decorator_list', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_36 class _class_struct__local__anonymous_37(ctypes.Structure): pass structs._local__anonymous_37 = _class_struct__local__anonymous_37 _class_struct__local__anonymous_37.fields = [ ('name', ctypes.POINTER(structs._object)), ('bases', ctypes.POINTER(structs._anonymous_asdl_seq)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('decorator_list', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_37 class _class_struct__local__anonymous_38(ctypes.Structure): pass structs._local__anonymous_38 = _class_struct__local__anonymous_38 _class_struct__local__anonymous_38.fields = [ ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_38 class _class_struct__local__anonymous_39(ctypes.Structure): pass structs._local__anonymous_39 = _class_struct__local__anonymous_39 _class_struct__local__anonymous_39.fields = [ ('targets', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_39 class _class_struct__local__anonymous_40(ctypes.Structure): pass structs._local__anonymous_40 = _class_struct__local__anonymous_40 _class_struct__local__anonymous_40.fields = [ ('targets', ctypes.POINTER(structs._anonymous_asdl_seq)), ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_40 class _class_struct__local__anonymous_41(ctypes.Structure): pass structs._local__anonymous_41 = _class_struct__local__anonymous_41 _class_struct__local__anonymous_41.fields = [ ('target', ctypes.POINTER(structs._expr)), ('op', ctypes_wrapped.c_uint32), ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_41 class _class_struct__local__anonymous_42(ctypes.Structure): pass structs._local__anonymous_42 = _class_struct__local__anonymous_42 _class_struct__local__anonymous_42.fields = [ ('dest', ctypes.POINTER(structs._expr)), ('values', ctypes.POINTER(structs._anonymous_asdl_seq)), ('nl', ctypes_wrapped.c_uint32)] del _class_struct__local__anonymous_42 class _class_struct__local__anonymous_43(ctypes.Structure): pass structs._local__anonymous_43 = _class_struct__local__anonymous_43 _class_struct__local__anonymous_43.fields = [ ('target', ctypes.POINTER(structs._expr)), ('iter', ctypes.POINTER(structs._expr)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('orelse', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_43 class _class_struct__local__anonymous_44(ctypes.Structure): pass structs._local__anonymous_44 = _class_struct__local__anonymous_44 _class_struct__local__anonymous_44.fields = [ ('test', ctypes.POINTER(structs._expr)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('orelse', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_44 class _class_struct__local__anonymous_45(ctypes.Structure): pass structs._local__anonymous_45 = _class_struct__local__anonymous_45 _class_struct__local__anonymous_45.fields = [ ('test', ctypes.POINTER(structs._expr)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('orelse', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_45 class _class_struct__local__anonymous_46(ctypes.Structure): pass structs._local__anonymous_46 = _class_struct__local__anonymous_46 _class_struct__local__anonymous_46.fields = [ ('context_expr', ctypes.POINTER(structs._expr)), ('optional_vars', ctypes.POINTER(structs._expr)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_46 class _class_struct__local__anonymous_47(ctypes.Structure): pass structs._local__anonymous_47 = _class_struct__local__anonymous_47 _class_struct__local__anonymous_47.fields = [ ('type', ctypes.POINTER(structs._expr)), ('inst', ctypes.POINTER(structs._expr)), ('tback', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_47 class _class_struct__local__anonymous_48(ctypes.Structure): pass structs._local__anonymous_48 = _class_struct__local__anonymous_48 _class_struct__local__anonymous_48.fields = [ ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('handlers', ctypes.POINTER(structs._anonymous_asdl_seq)), ('orelse', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_48 class _class_struct__local__anonymous_49(ctypes.Structure): pass structs._local__anonymous_49 = _class_struct__local__anonymous_49 _class_struct__local__anonymous_49.fields = [ ('body', ctypes.POINTER(structs._anonymous_asdl_seq)), ('finalbody', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_49 class _class_struct__local__anonymous_50(ctypes.Structure): pass structs._local__anonymous_50 = _class_struct__local__anonymous_50 _class_struct__local__anonymous_50.fields = [ ('test', ctypes.POINTER(structs._expr)), ('msg', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_50 class _class_struct__local__anonymous_51(ctypes.Structure): pass structs._local__anonymous_51 = _class_struct__local__anonymous_51 _class_struct__local__anonymous_51.fields = [ ('names', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_51 class _class_struct__local__anonymous_52(ctypes.Structure): pass structs._local__anonymous_52 = _class_struct__local__anonymous_52 _class_struct__local__anonymous_52.fields = [ ('module', ctypes.POINTER(structs._object)), ('names', ctypes.POINTER(structs._anonymous_asdl_seq)), ('level', ctypes_wrapped.c_int)] del _class_struct__local__anonymous_52 class _class_struct__local__anonymous_53(ctypes.Structure): pass structs._local__anonymous_53 = _class_struct__local__anonymous_53 _class_struct__local__anonymous_53.fields = [ ('body', ctypes.POINTER(structs._expr)), ('globals', ctypes.POINTER(structs._expr)), ('locals', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_53 class _class_struct__local__anonymous_54(ctypes.Structure): pass structs._local__anonymous_54 = _class_struct__local__anonymous_54 _class_struct__local__anonymous_54.fields = [ ('names', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_54 class _class_struct__local__anonymous_55(ctypes.Structure): pass structs._local__anonymous_55 = _class_struct__local__anonymous_55 _class_struct__local__anonymous_55.fields = [ ('value', ctypes.POINTER(structs._expr))] del _class_struct__local__anonymous_55 _class_union__local__anonymous_2.fields = [ ('FunctionDef', structs._local__anonymous_36), ('ClassDef', structs._local__anonymous_37), ('Return', structs._local__anonymous_38), ('Delete', structs._local__anonymous_39), ('Assign', structs._local__anonymous_40), ('AugAssign', structs._local__anonymous_41), ('Print', structs._local__anonymous_42), ('For', structs._local__anonymous_43), ('While', structs._local__anonymous_44), ('If', structs._local__anonymous_45), ('With', structs._local__anonymous_46), ('Raise', structs._local__anonymous_47), ('TryExcept', structs._local__anonymous_48), ('TryFinally', structs._local__anonymous_49), ('Assert', structs._local__anonymous_50), ('Import', structs._local__anonymous_51), ('ImportFrom', structs._local__anonymous_52), ('Exec', structs._local__anonymous_53), ('Global', structs._local__anonymous_54), ('Expr', structs._local__anonymous_55)] del _class_union__local__anonymous_2 _class_struct__stmt.fields = [ ('kind', ctypes_wrapped.c_uint32), ('v', unions._local__anonymous_2), ('lineno', ctypes_wrapped.c_int), ('col_offset', ctypes_wrapped.c_int)] del _class_struct__stmt class _class_struct__comprehension(ctypes.Structure): pass structs._comprehension = _class_struct__comprehension _class_struct__comprehension.fields = [ ('target', ctypes.POINTER(structs._expr)), ('iter', ctypes.POINTER(structs._expr)), ('ifs', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__comprehension class _class_struct__excepthandler(ctypes.Structure): pass structs._excepthandler = _class_struct__excepthandler class _class_union__local__anonymous_5(ctypes.Union): pass unions._local__anonymous_5 = _class_union__local__anonymous_5 class _class_struct__local__anonymous_56(ctypes.Structure): pass structs._local__anonymous_56 = _class_struct__local__anonymous_56 _class_struct__local__anonymous_56.fields = [ ('type', ctypes.POINTER(structs._expr)), ('name', ctypes.POINTER(structs._expr)), ('body', ctypes.POINTER(structs._anonymous_asdl_seq))] del _class_struct__local__anonymous_56 _class_union__local__anonymous_5.fields = [ ('ExceptHandler', structs._local__anonymous_56)] del _class_union__local__anonymous_5 _class_struct__excepthandler.fields = [ ('kind', ctypes_wrapped.c_uint32), ('v', unions._local__anonymous_5), ('lineno', ctypes_wrapped.c_int), ('col_offset', ctypes_wrapped.c_int)] del _class_struct__excepthandler class _class_struct__keyword(ctypes.Structure): pass structs._keyword = _class_struct__keyword _class_struct__keyword.fields = [ ('arg', ctypes.POINTER(structs._object)), ('value', ctypes.POINTER(structs._expr))] del _class_struct__keyword class _class_struct__alias(ctypes.Structure): pass structs._alias = _class_struct__alias _class_struct__alias.fields = [ ('name', ctypes.POINTER(structs._object)), ('asname', ctypes.POINTER(structs._object))] del _class_struct__alias class _class_struct__node(ctypes.Structure): pass structs._node = _class_struct__node _class_struct__node.fields = [ ('n_type', ctypes_wrapped.c_short), ('n_str', ctypes.POINTER(ctypes_wrapped.c_byte)), ('n_lineno', ctypes_wrapped.c_int), ('n_col_offset', ctypes_wrapped.c_int), ('n_nchildren', ctypes_wrapped.c_int), ('n_child', ctypes.POINTER(structs._node))] del _class_struct__node class _class_struct_symtable(ctypes.Structure): pass structs.symtable = _class_struct_symtable class _class_struct__symtable_entry(ctypes.Structure): pass structs._symtable_entry = _class_struct__symtable_entry _class_struct__symtable_entry.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ste_id', ctypes.POINTER(structs._object)), ('ste_symbols', ctypes.POINTER(structs._object)), ('ste_name', ctypes.POINTER(structs._object)), ('ste_varnames', ctypes.POINTER(structs._object)), ('ste_children', ctypes.POINTER(structs._object)), ('ste_type', ctypes_wrapped.c_uint32), ('ste_unoptimized', ctypes_wrapped.c_int), ('ste_nested', ctypes_wrapped.c_int), ('ste_free', ctypes_wrapped.c_uint, 1), ('ste_child_free', ctypes_wrapped.c_uint, 1), ('ste_generator', ctypes_wrapped.c_uint, 1), ('ste_varargs', ctypes_wrapped.c_uint, 1), ('ste_varkeywords', ctypes_wrapped.c_uint, 1), ('ste_returns_value', ctypes_wrapped.c_uint, 1), ('ste_lineno', ctypes_wrapped.c_int), ('ste_opt_lineno', ctypes_wrapped.c_int), ('ste_tmpname', ctypes_wrapped.c_int), ('ste_table', ctypes.POINTER(structs.symtable))] del _class_struct__symtable_entry _class_struct_symtable.fields = [ ('st_filename', ctypes.POINTER(ctypes_wrapped.c_byte)), ('st_cur', ctypes.POINTER(structs._symtable_entry)), ('st_top', ctypes.POINTER(structs._symtable_entry)), ('st_symbols', ctypes.POINTER(structs._object)), ('st_stack', ctypes.POINTER(structs._object)), ('st_global', ctypes.POINTER(structs._object)), ('st_nblocks', ctypes_wrapped.c_int), ('st_private', ctypes.POINTER(structs._object)), ('st_future', ctypes.POINTER(structs._anonymous_PyFutureFeatures))] del _class_struct_symtable class _class_struct__anonymous_PyStructSequence(ctypes.Structure): pass structs._anonymous_PyStructSequence = _class_struct__anonymous_PyStructSequence _class_struct__anonymous_PyStructSequence.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('ob_item', ctypes.POINTER(structs._object) * 1)] del _class_struct__anonymous_PyStructSequence class _class_struct_method_cache_entry(ctypes.Structure): pass structs.method_cache_entry = _class_struct_method_cache_entry _class_struct_method_cache_entry.fields = [ ('version', ctypes_wrapped.c_uint), ('name', ctypes.POINTER(structs._object)), ('value', ctypes.POINTER(structs._object))] del _class_struct_method_cache_entry class _class_struct__anonymous_superobject(ctypes.Structure): pass structs._anonymous_superobject = _class_struct__anonymous_superobject _class_struct__anonymous_superobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('type', ctypes.POINTER(structs._typeobject)), ('obj', ctypes.POINTER(structs._object)), ('obj_type', ctypes.POINTER(structs._typeobject))] del _class_struct__anonymous_superobject class _class_struct__anonymous_tupleiterobject(ctypes.Structure): pass structs._anonymous_tupleiterobject = _class_struct__anonymous_tupleiterobject _class_struct__anonymous_tupleiterobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('it_index', ctypes_wrapped.c_long), ('it_seq', ctypes.POINTER(structs._anonymous_PyTupleObject))] del _class_struct__anonymous_tupleiterobject class _class_struct__anonymous_dictiterobject(ctypes.Structure): pass structs._anonymous_dictiterobject = _class_struct__anonymous_dictiterobject _class_struct__anonymous_dictiterobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('di_dict', ctypes.POINTER(structs._dictobject)), ('di_used', ctypes_wrapped.c_long), ('di_pos', ctypes_wrapped.c_long), ('di_result', ctypes.POINTER(structs._object)), ('len', ctypes_wrapped.c_long)] del _class_struct__anonymous_dictiterobject class _class_struct__anonymous_dictviewobject(ctypes.Structure): pass structs._anonymous_dictviewobject = _class_struct__anonymous_dictviewobject _class_struct__anonymous_dictviewobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('dv_dict', ctypes.POINTER(structs._dictobject))] del _class_struct__anonymous_dictviewobject class _class_struct__anonymous_OutputString(ctypes.Structure): pass structs._anonymous_OutputString = _class_struct__anonymous_OutputString _class_struct__anonymous_OutputString.fields = [ ('ptr', ctypes.POINTER(ctypes_wrapped.c_byte)), ('end', ctypes.POINTER(ctypes_wrapped.c_byte)), ('obj', ctypes.POINTER(structs._object)), ('size_increment', ctypes_wrapped.c_long)] del _class_struct__anonymous_OutputString class _class_struct__anonymous_formatteriterobject(ctypes.Structure): pass structs._anonymous_formatteriterobject = _class_struct__anonymous_formatteriterobject _class_struct__anonymous_formatteriterobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('str', ctypes.POINTER(structs._anonymous_PyStringObject)), ('it_markup', structs._anonymous_MarkupIterator)] del _class_struct__anonymous_formatteriterobject class _class_struct__anonymous_fieldnameiterobject(ctypes.Structure): pass structs._anonymous_fieldnameiterobject = _class_struct__anonymous_fieldnameiterobject _class_struct__anonymous_fieldnameiterobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('str', ctypes.POINTER(structs._anonymous_PyStringObject)), ('it_field', structs._anonymous_FieldNameIterator)] del _class_struct__anonymous_fieldnameiterobject class _class_struct_gc_generation(ctypes.Structure): pass structs.gc_generation = _class_struct_gc_generation class _class_union__gc_head(ctypes.Union): pass unions._gc_head = _class_union__gc_head class _class_struct__local__anonymous_6(ctypes.Structure): pass structs._local__anonymous_6 = _class_struct__local__anonymous_6 _class_struct__local__anonymous_6.fields = [ ('gc_next', ctypes.POINTER(unions._gc_head)), ('gc_prev', ctypes.POINTER(unions._gc_head)), ('gc_refs', ctypes_wrapped.c_long)] del _class_struct__local__anonymous_6 _class_union__gc_head.fields = [ ('gc', structs._local__anonymous_6), ('dummy', ctypes_wrapped.c_longdouble)] del _class_union__gc_head _class_struct_gc_generation.fields = [ ('head', unions._gc_head), ('threshold', ctypes_wrapped.c_int), ('count', ctypes_wrapped.c_int)] del _class_struct_gc_generation class _class_struct__anonymous_proxyobject(ctypes.Structure): pass structs._anonymous_proxyobject = _class_struct__anonymous_proxyobject _class_struct__anonymous_proxyobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('dict', ctypes.POINTER(structs._object))] del _class_struct__anonymous_proxyobject class _class_struct__anonymous_wrapperobject(ctypes.Structure): pass structs._anonymous_wrapperobject = _class_struct__anonymous_wrapperobject _class_struct__anonymous_wrapperobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('descr', ctypes.POINTER(structs._anonymous_PyWrapperDescrObject)), ('self', ctypes.POINTER(structs._object))] del _class_struct__anonymous_wrapperobject class _class_struct__anonymous_propertyobject(ctypes.Structure): pass structs._anonymous_propertyobject = _class_struct__anonymous_propertyobject _class_struct__anonymous_propertyobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('prop_get', ctypes.POINTER(structs._object)), ('prop_set', ctypes.POINTER(structs._object)), ('prop_del', ctypes.POINTER(structs._object)), ('prop_doc', ctypes.POINTER(structs._object)), ('getter_doc', ctypes_wrapped.c_int)] del _class_struct__anonymous_propertyobject class _class_struct_s_slice(ctypes.Structure): pass structs.s_slice = _class_struct_s_slice _class_struct_s_slice.fields = [ ('base', ctypes.POINTER(ctypes.POINTER(structs._object))), ('len', ctypes_wrapped.c_long)] del _class_struct_s_slice class _class_struct_s_MergeState(ctypes.Structure): pass structs.s_MergeState = _class_struct_s_MergeState _class_struct_s_MergeState.fields = [ ('compare', ctypes.POINTER(structs._object)), ('min_gallop', ctypes_wrapped.c_long), ('a', ctypes.POINTER(ctypes.POINTER(structs._object))), ('alloced', ctypes_wrapped.c_long), ('n', ctypes_wrapped.c_int), ('pending', structs.s_slice * 85), ('temparray', ctypes.POINTER(structs._object) * 256)] del _class_struct_s_MergeState class _class_struct__anonymous_sortwrapperobject(ctypes.Structure): pass structs._anonymous_sortwrapperobject = _class_struct__anonymous_sortwrapperobject _class_struct__anonymous_sortwrapperobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('key', ctypes.POINTER(structs._object)), ('value', ctypes.POINTER(structs._object))] del _class_struct__anonymous_sortwrapperobject class _class_struct__anonymous_cmpwrapperobject(ctypes.Structure): pass structs._anonymous_cmpwrapperobject = _class_struct__anonymous_cmpwrapperobject _class_struct__anonymous_cmpwrapperobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('func', ctypes.POINTER(structs._object))] del _class_struct__anonymous_cmpwrapperobject class _class_struct__anonymous_listiterobject(ctypes.Structure): pass structs._anonymous_listiterobject = _class_struct__anonymous_listiterobject _class_struct__anonymous_listiterobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('it_index', ctypes_wrapped.c_long), ('it_seq', ctypes.POINTER(structs._anonymous_PyListObject))] del _class_struct__anonymous_listiterobject class _class_struct__anonymous_listreviterobject(ctypes.Structure): pass structs._anonymous_listreviterobject = _class_struct__anonymous_listreviterobject _class_struct__anonymous_listreviterobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('it_index', ctypes_wrapped.c_long), ('it_seq', ctypes.POINTER(structs._anonymous_PyListObject))] del _class_struct__anonymous_listreviterobject class _class_struct__longobject(ctypes.Structure): pass structs._longobject = _class_struct__longobject _class_struct__longobject.fields = [ ('ob_refcnt', ctypes_wrapped.c_long), ('ob_type', ctypes.POINTER(structs._typeobject)), ('ob_size', ctypes_wrapped.c_long), ('ob_digit', ctypes_wrapped.c_ushort * 1)] del _class_struct__longobject class values: errno = intp.stateStructs[0].vars['errno'] stderr = intp.stateStructs[0].vars['stderr'] stdin = intp.stateStructs[0].vars['stdin'] stdout = intp.stateStructs[0].vars['stdout'] __va_arg = intp.stateStructs[0].funcs['__va_arg'] abort = intp.stateStructs[0].funcs['abort'] assert_a = intp.stateStructs[0].funcs['assert'] atoi = intp.stateStructs[0].funcs['atoi'] clearerr = intp.stateStructs[0].funcs['clearerr'] close = intp.stateStructs[0].funcs['close'] exit_a = intp.stateStructs[0].funcs['exit'] fclose = intp.stateStructs[0].funcs['fclose'] fdopen = intp.stateStructs[0].funcs['fdopen'] ferror = intp.stateStructs[0].funcs['ferror'] fflush = intp.stateStructs[0].funcs['fflush'] fgets = intp.stateStructs[0].funcs['fgets'] fileno = intp.stateStructs[0].funcs['fileno'] fopen = intp.stateStructs[0].funcs['fopen'] fprintf = intp.stateStructs[0].funcs['fprintf'] fputc = intp.stateStructs[0].funcs['fputc'] fputs = intp.stateStructs[0].funcs['fputs'] fread = intp.stateStructs[0].funcs['fread'] free = intp.stateStructs[0].funcs['free'] fstat = intp.stateStructs[0].funcs['fstat'] ftell = intp.stateStructs[0].funcs['ftell'] fwrite = intp.stateStructs[0].funcs['fwrite'] getc = intp.stateStructs[0].funcs['getc'] getenv = intp.stateStructs[0].funcs['getenv'] isalnum = intp.stateStructs[0].funcs['isalnum'] isalpha = intp.stateStructs[0].funcs['isalpha'] isatty = intp.stateStructs[0].funcs['isatty'] isdigit = intp.stateStructs[0].funcs['isdigit'] islower = intp.stateStructs[0].funcs['islower'] isspace = intp.stateStructs[0].funcs['isspace'] isupper = intp.stateStructs[0].funcs['isupper'] isxdigit = intp.stateStructs[0].funcs['isxdigit'] localeconv = intp.stateStructs[0].funcs['localeconv'] malloc = intp.stateStructs[0].funcs['malloc'] memchr = intp.stateStructs[0].funcs['memchr'] memcmp = intp.stateStructs[0].funcs['memcmp'] memcpy = intp.stateStructs[0].funcs['memcpy'] memmove = intp.stateStructs[0].funcs['memmove'] memset = intp.stateStructs[0].funcs['memset'] open_a = intp.stateStructs[0].funcs['open'] printf = intp.stateStructs[0].funcs['printf'] read = intp.stateStructs[0].funcs['read'] realloc = intp.stateStructs[0].funcs['realloc'] rewind = intp.stateStructs[0].funcs['rewind'] setbuf = intp.stateStructs[0].funcs['setbuf'] signal = intp.stateStructs[0].funcs['signal'] sprintf = intp.stateStructs[0].funcs['sprintf'] strcat = intp.stateStructs[0].funcs['strcat'] strchr = intp.stateStructs[0].funcs['strchr'] strcmp = intp.stateStructs[0].funcs['strcmp'] strcpy = intp.stateStructs[0].funcs['strcpy'] strdup = intp.stateStructs[0].funcs['strdup'] strerror = intp.stateStructs[0].funcs['strerror'] strlen = intp.stateStructs[0].funcs['strlen'] strncmp = intp.stateStructs[0].funcs['strncmp'] strncpy = intp.stateStructs[0].funcs['strncpy'] strrchr = intp.stateStructs[0].funcs['strrchr'] strstr = intp.stateStructs[0].funcs['strstr'] strtok = intp.stateStructs[0].funcs['strtok'] strtoul = intp.stateStructs[0].funcs['strtoul'] tolower = intp.stateStructs[0].funcs['tolower'] toupper = intp.stateStructs[0].funcs['toupper'] ungetc = intp.stateStructs[0].funcs['ungetc'] va_end = intp.stateStructs[0].funcs['va_end'] va_start = intp.stateStructs[0].funcs['va_start'] vfprintf = intp.stateStructs[0].funcs['vfprintf'] vprintf = intp.stateStructs[0].funcs['vprintf'] vsprintf = intp.stateStructs[0].funcs['vsprintf'] class g: Py_uintptr_t = ctypes_wrapped.c_ulong Py_intptr_t = ctypes_wrapped.c_long Py_ssize_t = Py_intptr_t @staticmethod def copysign(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes_wrapped.c_double(__dummy_b.value) raise Exception(u"Function 'copysign' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def round(__dummy_a): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) raise Exception(u"Function 'round' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def hypot(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes_wrapped.c_double(__dummy_b.value) raise Exception(u"Function 'hypot' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def fmod(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes_wrapped.c_double(__dummy_b.value) raise Exception(u"Function 'fmod' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def frexp(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'frexp' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def ldexp(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'ldexp' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def modf(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_double)) raise Exception(u"Function 'modf' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def pow(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) __dummy_b = ctypes_wrapped.c_double(__dummy_b.value) raise Exception(u"Function 'pow' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_double().value PyObject = structs._object PyVarObject = structs._anonymous_PyVarObject unaryfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject)) binaryfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) ternaryfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) inquiry = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject)) lenfunc = ctypes.CFUNCTYPE(Py_ssize_t, ctypes.POINTER(PyObject)) coercion = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(ctypes.POINTER(PyObject)), ctypes.POINTER(ctypes.POINTER(PyObject))) intargfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes_wrapped.c_int) intintargfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes_wrapped.c_int, ctypes_wrapped.c_int) ssizeargfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), Py_ssize_t) ssizessizeargfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t) intobjargproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes_wrapped.c_int, ctypes.POINTER(PyObject)) intintobjargproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes_wrapped.c_int, ctypes_wrapped.c_int, ctypes.POINTER(PyObject)) ssizeobjargproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject)) ssizessizeobjargproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject)) objobjargproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) getreadbufferproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes_wrapped.c_int, ctypes.POINTER(ctypes_wrapped.c_void_p)) getwritebufferproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes_wrapped.c_int, ctypes.POINTER(ctypes_wrapped.c_void_p)) getsegcountproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int)) getcharbufferproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes_wrapped.c_int, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) readbufferproc = ctypes.CFUNCTYPE(Py_ssize_t, ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(ctypes_wrapped.c_void_p)) writebufferproc = ctypes.CFUNCTYPE(Py_ssize_t, ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(ctypes_wrapped.c_void_p)) segcountproc = ctypes.CFUNCTYPE(Py_ssize_t, ctypes.POINTER(PyObject), ctypes.POINTER(Py_ssize_t)) charbufferproc = ctypes.CFUNCTYPE(Py_ssize_t, ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) Py_buffer = structs.bufferinfo getbufferproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(Py_buffer), ctypes_wrapped.c_int) releasebufferproc = ctypes.CFUNCTYPE(None, ctypes.POINTER(PyObject), ctypes.POINTER(Py_buffer)) objobjproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) visitproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p) traverseproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p) PyNumberMethods = structs._anonymous_PyNumberMethods PySequenceMethods = structs._anonymous_PySequenceMethods PyMappingMethods = structs._anonymous_PyMappingMethods PyBufferProcs = structs._anonymous_PyBufferProcs freefunc = ctypes.CFUNCTYPE(None, ctypes_wrapped.c_void_p) destructor = ctypes.CFUNCTYPE(None, ctypes.POINTER(PyObject)) printfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int) getattrfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte)) getattrofunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) setattrfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject)) setattrofunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) cmpfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) reprfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject)) hashfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_long, ctypes.POINTER(PyObject)) richcmpfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int) getiterfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject)) iternextfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject)) descrgetfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) descrsetfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) initproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) newfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) allocfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(structs._typeobject), Py_ssize_t) PyTypeObject = structs._typeobject PyHeapTypeObject = structs._heaptypeobject @staticmethod def PyObject_ClearWeakRefs(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyObject_ClearWeakRefs' only predeclared. Body is missing. Missing C source code.") del __dummy_a return _Py_HashSecret_t = structs._anonymous__Py_HashSecret_t PyGC_Head = unions._gc_head Py_OptimizeFlag = ctypes_wrapped.c_int() Py_TabcheckFlag = ctypes_wrapped.c_int() PyIntObject = structs._anonymous_PyIntObject PyInt_Type = PyTypeObject() @staticmethod def PyInt_FromString(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyInt_FromString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInt_FromLong(__dummy_a): __dummy_a = ctypes_wrapped.c_long(int(__dummy_a.value)) raise Exception(u"Function 'PyInt_FromLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInt_FromSize_t(__dummy_a): __dummy_a = ctypes_wrapped.c_ulong(int(__dummy_a.value)) raise Exception(u"Function 'PyInt_FromSize_t' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInt_FromSsize_t(__dummy_a): __dummy_a = g.Py_ssize_t(int(__dummy_a.value)) raise Exception(u"Function 'PyInt_FromSsize_t' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInt_AsLong(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyInt_AsLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_long().value @staticmethod def PyInt_AsSsize_t(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyInt_AsSsize_t' only predeclared. Body is missing. Missing C source code.") del __dummy_a return g.Py_ssize_t().value @staticmethod def _PyInt_AsInt(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyInt_AsInt' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyInt_AsUnsignedLongMask(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyInt_AsUnsignedLongMask' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_ulong().value @staticmethod def PyInt_GetMax(): raise Exception(u"Function 'PyInt_GetMax' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_long().value @staticmethod def PyOS_strtoul(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyOS_strtoul' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_ulong().value @staticmethod def PyOS_strtol(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyOS_strtol' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_long().value @staticmethod def PyInt_ClearFreeList(): raise Exception(u"Function 'PyInt_ClearFreeList' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def _PyInt_Format(v, base, newstyle): v = ctypes.cast(v, ctypes.POINTER(g.PyIntObject)) base = ctypes_wrapped.c_int(int(base.value)) newstyle = ctypes_wrapped.c_int(int(newstyle.value)) raise Exception(u"Function '_PyInt_Format' only predeclared. Body is missing. Missing C source code.") del newstyle del base del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyInt_FormatAdvanced(obj, format_spec, format_spec_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_len = g.Py_ssize_t(int(format_spec_len.value)) raise Exception(u"Function '_PyInt_FormatAdvanced' only predeclared. Body is missing. Missing C source code.") del format_spec_len del obj del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyBoolObject = PyIntObject PyBool_Type = PyTypeObject() _Py_ZeroStruct = PyIntObject() _Py_TrueStruct = PyIntObject() @staticmethod def PyBool_FromLong(__dummy_a): __dummy_a = ctypes_wrapped.c_long(int(__dummy_a.value)) raise Exception(u"Function 'PyBool_FromLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyLongObject = structs._longobject PyLong_Type = PyTypeObject() @staticmethod def PyLong_FromLong(__dummy_a): __dummy_a = ctypes_wrapped.c_long(int(__dummy_a.value)) raise Exception(u"Function 'PyLong_FromLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_FromUnsignedLong(__dummy_a): __dummy_a = ctypes_wrapped.c_ulong(int(__dummy_a.value)) raise Exception(u"Function 'PyLong_FromUnsignedLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_FromDouble(__dummy_a): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) raise Exception(u"Function 'PyLong_FromDouble' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_FromSize_t(__dummy_a): __dummy_a = ctypes_wrapped.c_ulong(int(__dummy_a.value)) raise Exception(u"Function 'PyLong_FromSize_t' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_FromSsize_t(__dummy_a): __dummy_a = g.Py_ssize_t(int(__dummy_a.value)) raise Exception(u"Function 'PyLong_FromSsize_t' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_AsLong(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyLong_AsLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_long().value @staticmethod def PyLong_AsLongAndOverflow(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyLong_AsLongAndOverflow' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_long().value @staticmethod def PyLong_AsUnsignedLong(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyLong_AsUnsignedLong' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_ulong().value @staticmethod def PyLong_AsUnsignedLongMask(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyLong_AsUnsignedLongMask' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_ulong().value @staticmethod def PyLong_AsSsize_t(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyLong_AsSsize_t' only predeclared. Body is missing. Missing C source code.") del __dummy_a return g.Py_ssize_t().value @staticmethod def _PyLong_AsInt(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyLong_AsInt' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyLong_GetInfo(): raise Exception(u"Function 'PyLong_GetInfo' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) _PyLong_DigitValue = (ctypes_wrapped.c_int * 256L)() @staticmethod def _PyLong_Frexp(a, e): a = ctypes.cast(a, ctypes.POINTER(g.PyLongObject)) e = ctypes.cast(e, ctypes.POINTER(g.Py_ssize_t)) raise Exception(u"Function '_PyLong_Frexp' only predeclared. Body is missing. Missing C source code.") del a del e return ctypes_wrapped.c_double().value @staticmethod def PyLong_AsDouble(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyLong_AsDouble' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def PyLong_FromVoidPtr(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes_wrapped.c_void_p) raise Exception(u"Function 'PyLong_FromVoidPtr' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_AsVoidPtr(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyLong_AsVoidPtr' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyLong_FromString(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyLong_FromString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyLong_Sign(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyLong_Sign' only predeclared. Body is missing. Missing C source code.") del v return ctypes_wrapped.c_int().value @staticmethod def _PyLong_NumBits(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyLong_NumBits' only predeclared. Body is missing. Missing C source code.") del v return ctypes_wrapped.c_ulong().value @staticmethod def _PyLong_FromByteArray(bytes_a, n, little_endian, is_signed): bytes_a = ctypes.cast(bytes_a, ctypes.POINTER(ctypes_wrapped.c_ubyte)) n = ctypes_wrapped.c_ulong(int(n.value)) little_endian = ctypes_wrapped.c_int(int(little_endian.value)) is_signed = ctypes_wrapped.c_int(int(is_signed.value)) raise Exception(u"Function '_PyLong_FromByteArray' only predeclared. Body is missing. Missing C source code.") del bytes_a del little_endian del is_signed del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyLong_AsByteArray(v, bytes_a, n, little_endian, is_signed): v = ctypes.cast(v, ctypes.POINTER(g.PyLongObject)) bytes_a = ctypes.cast(bytes_a, ctypes.POINTER(ctypes_wrapped.c_ubyte)) n = ctypes_wrapped.c_ulong(int(n.value)) little_endian = ctypes_wrapped.c_int(int(little_endian.value)) is_signed = ctypes_wrapped.c_int(int(is_signed.value)) raise Exception(u"Function '_PyLong_AsByteArray' only predeclared. Body is missing. Missing C source code.") del little_endian del bytes_a del n del is_signed del v return ctypes_wrapped.c_int().value @staticmethod def _PyLong_Format(aa, base, addL, newstyle): aa = ctypes.cast(aa, ctypes.POINTER(g.PyObject)) base = ctypes_wrapped.c_int(int(base.value)) addL = ctypes_wrapped.c_int(int(addL.value)) newstyle = ctypes_wrapped.c_int(int(newstyle.value)) raise Exception(u"Function '_PyLong_Format' only predeclared. Body is missing. Missing C source code.") del aa del newstyle del base del addL return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyLong_FormatAdvanced(obj, format_spec, format_spec_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_len = g.Py_ssize_t(int(format_spec_len.value)) raise Exception(u"Function '_PyLong_FormatAdvanced' only predeclared. Body is missing. Missing C source code.") del format_spec_len del obj del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyFloatObject = structs._anonymous_PyFloatObject PyFloat_Type = PyTypeObject() @staticmethod def PyFloat_GetMax(): raise Exception(u"Function 'PyFloat_GetMax' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_double().value @staticmethod def PyFloat_GetMin(): raise Exception(u"Function 'PyFloat_GetMin' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_double().value @staticmethod def PyFloat_GetInfo(): raise Exception(u"Function 'PyFloat_GetInfo' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFloat_FromString(__dummy_a, junk): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) junk = ctypes.cast(junk, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) raise Exception(u"Function 'PyFloat_FromString' only predeclared. Body is missing. Missing C source code.") del junk del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFloat_FromDouble(__dummy_a): __dummy_a = ctypes_wrapped.c_double(__dummy_a.value) raise Exception(u"Function 'PyFloat_FromDouble' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFloat_AsDouble(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFloat_AsDouble' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_double().value @staticmethod def PyFloat_AsReprString(__dummy_a, v): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.cast(v, ctypes.POINTER(g.PyFloatObject)) raise Exception(u"Function 'PyFloat_AsReprString' only predeclared. Body is missing. Missing C source code.") del __dummy_a del v return @staticmethod def PyFloat_AsString(__dummy_a, v): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.cast(v, ctypes.POINTER(g.PyFloatObject)) raise Exception(u"Function 'PyFloat_AsString' only predeclared. Body is missing. Missing C source code.") del __dummy_a del v return @staticmethod def _PyFloat_Pack4(x, p, le): x = ctypes_wrapped.c_double(x.value) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_ubyte)) le = ctypes_wrapped.c_int(int(le.value)) raise Exception(u"Function '_PyFloat_Pack4' only predeclared. Body is missing. Missing C source code.") del x del le del p return ctypes_wrapped.c_int().value @staticmethod def _PyFloat_Pack8(x, p, le): x = ctypes_wrapped.c_double(x.value) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_ubyte)) le = ctypes_wrapped.c_int(int(le.value)) raise Exception(u"Function '_PyFloat_Pack8' only predeclared. Body is missing. Missing C source code.") del x del le del p return ctypes_wrapped.c_int().value @staticmethod def _PyFloat_Digits(buf, v, signum): buf = ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes_wrapped.c_double(v.value) signum = ctypes.cast(signum, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function '_PyFloat_Digits' only predeclared. Body is missing. Missing C source code.") del signum del buf del v return ctypes_wrapped.c_int().value @staticmethod def _PyFloat_DigitsInit(): raise Exception(u"Function '_PyFloat_DigitsInit' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyFloat_Unpack4(p, le): p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_ubyte)) le = ctypes_wrapped.c_int(int(le.value)) raise Exception(u"Function '_PyFloat_Unpack4' only predeclared. Body is missing. Missing C source code.") del p del le return ctypes_wrapped.c_double().value @staticmethod def _PyFloat_Unpack8(p, le): p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_ubyte)) le = ctypes_wrapped.c_int(int(le.value)) raise Exception(u"Function '_PyFloat_Unpack8' only predeclared. Body is missing. Missing C source code.") del p del le return ctypes_wrapped.c_double().value @staticmethod def PyFloat_ClearFreeList(): raise Exception(u"Function 'PyFloat_ClearFreeList' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def _PyFloat_FormatAdvanced(obj, format_spec, format_spec_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_len = g.Py_ssize_t(int(format_spec_len.value)) raise Exception(u"Function '_PyFloat_FormatAdvanced' only predeclared. Body is missing. Missing C source code.") del format_spec_len del obj del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_double_round(x, ndigits): x = ctypes_wrapped.c_double(x.value) ndigits = ctypes_wrapped.c_int(int(ndigits.value)) raise Exception(u"Function '_Py_double_round' only predeclared. Body is missing. Missing C source code.") del x del ndigits return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) Py_complex = structs._anonymous_Py_complex @staticmethod def _Py_c_sum(__dummy_a, __dummy_b): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) __dummy_b = helpers.assign(g.Py_complex(), __dummy_b) raise Exception(u"Function '_Py_c_sum' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return g.Py_complex() @staticmethod def _Py_c_diff(__dummy_a, __dummy_b): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) __dummy_b = helpers.assign(g.Py_complex(), __dummy_b) raise Exception(u"Function '_Py_c_diff' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return g.Py_complex() @staticmethod def _Py_c_neg(__dummy_a): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) raise Exception(u"Function '_Py_c_neg' only predeclared. Body is missing. Missing C source code.") del __dummy_a return g.Py_complex() @staticmethod def _Py_c_prod(__dummy_a, __dummy_b): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) __dummy_b = helpers.assign(g.Py_complex(), __dummy_b) raise Exception(u"Function '_Py_c_prod' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return g.Py_complex() @staticmethod def _Py_c_quot(__dummy_a, __dummy_b): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) __dummy_b = helpers.assign(g.Py_complex(), __dummy_b) raise Exception(u"Function '_Py_c_quot' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return g.Py_complex() @staticmethod def _Py_c_pow(__dummy_a, __dummy_b): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) __dummy_b = helpers.assign(g.Py_complex(), __dummy_b) raise Exception(u"Function '_Py_c_pow' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return g.Py_complex() @staticmethod def _Py_c_abs(__dummy_a): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) raise Exception(u"Function '_Py_c_abs' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_double().value PyComplexObject = structs._anonymous_PyComplexObject PyComplex_Type = PyTypeObject() @staticmethod def PyComplex_FromCComplex(__dummy_a): __dummy_a = helpers.assign(g.Py_complex(), __dummy_a) raise Exception(u"Function 'PyComplex_FromCComplex' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyComplex_FromDoubles(real, imag): real = ctypes_wrapped.c_double(real.value) imag = ctypes_wrapped.c_double(imag.value) raise Exception(u"Function 'PyComplex_FromDoubles' only predeclared. Body is missing. Missing C source code.") del real del imag return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyComplex_RealAsDouble(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyComplex_RealAsDouble' only predeclared. Body is missing. Missing C source code.") del op return ctypes_wrapped.c_double().value @staticmethod def PyComplex_ImagAsDouble(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyComplex_ImagAsDouble' only predeclared. Body is missing. Missing C source code.") del op return ctypes_wrapped.c_double().value @staticmethod def PyComplex_AsCComplex(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyComplex_AsCComplex' only predeclared. Body is missing. Missing C source code.") del op return g.Py_complex() @staticmethod def _PyComplex_FormatAdvanced(obj, format_spec, format_spec_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_len = g.Py_ssize_t(int(format_spec_len.value)) raise Exception(u"Function '_PyComplex_FormatAdvanced' only predeclared. Body is missing. Missing C source code.") del format_spec_len del obj del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyRange_Type = PyTypeObject() PyStringObject = structs._anonymous_PyStringObject @staticmethod def _PyString_InsertThousandsGroupingLocale(buffer_a, n_buffer, digits, n_digits, min_width): buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)) n_buffer = g.Py_ssize_t(int(n_buffer.value)) digits = ctypes.cast(digits, ctypes.POINTER(ctypes_wrapped.c_byte)) n_digits = g.Py_ssize_t(int(n_digits.value)) min_width = g.Py_ssize_t(int(min_width.value)) raise Exception(u"Function '_PyString_InsertThousandsGroupingLocale' only predeclared. Body is missing. Missing C source code.") del digits del min_width del n_digits del buffer_a del n_buffer return g.Py_ssize_t().value @staticmethod def _PyBytes_FormatAdvanced(obj, format_spec, format_spec_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_len = g.Py_ssize_t(int(format_spec_len.value)) raise Exception(u"Function '_PyBytes_FormatAdvanced' only predeclared. Body is missing. Missing C source code.") del format_spec_len del obj del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyMemoryView_Type = PyTypeObject() @staticmethod def PyMemoryView_GetContiguous(base, buffertype, fort): base = ctypes.cast(base, ctypes.POINTER(g.PyObject)) buffertype = ctypes_wrapped.c_int(int(buffertype.value)) fort = ctypes_wrapped.c_byte(int(fort.value)) raise Exception(u"Function 'PyMemoryView_GetContiguous' only predeclared. Body is missing. Missing C source code.") del base del buffertype del fort return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMemoryView_FromObject(base): base = ctypes.cast(base, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMemoryView_FromObject' only predeclared. Body is missing. Missing C source code.") del base return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMemoryView_FromBuffer(info): info = ctypes.cast(info, ctypes.POINTER(g.Py_buffer)) raise Exception(u"Function 'PyMemoryView_FromBuffer' only predeclared. Body is missing. Missing C source code.") del info return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyMemoryViewObject = structs._anonymous_PyMemoryViewObject PyBuffer_Type = PyTypeObject() @staticmethod def PyBuffer_FromObject(base, offset, size): base = ctypes.cast(base, ctypes.POINTER(g.PyObject)) offset = g.Py_ssize_t(int(offset.value)) size = g.Py_ssize_t(int(size.value)) raise Exception(u"Function 'PyBuffer_FromObject' only predeclared. Body is missing. Missing C source code.") del size del base del offset return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyBuffer_FromReadWriteObject(base, offset, size): base = ctypes.cast(base, ctypes.POINTER(g.PyObject)) offset = g.Py_ssize_t(int(offset.value)) size = g.Py_ssize_t(int(size.value)) raise Exception(u"Function 'PyBuffer_FromReadWriteObject' only predeclared. Body is missing. Missing C source code.") del size del base del offset return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyBuffer_FromMemory(ptr, size): ptr = ctypes.cast(ptr, ctypes_wrapped.c_void_p) size = g.Py_ssize_t(int(size.value)) raise Exception(u"Function 'PyBuffer_FromMemory' only predeclared. Body is missing. Missing C source code.") del ptr del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyBuffer_FromReadWriteMemory(ptr, size): ptr = ctypes.cast(ptr, ctypes_wrapped.c_void_p) size = g.Py_ssize_t(int(size.value)) raise Exception(u"Function 'PyBuffer_FromReadWriteMemory' only predeclared. Body is missing. Missing C source code.") del ptr del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyBuffer_New(size): size = g.Py_ssize_t(int(size.value)) raise Exception(u"Function 'PyBuffer_New' only predeclared. Body is missing. Missing C source code.") del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyByteArrayObject = structs._anonymous_PyByteArrayObject PyByteArray_Type = PyTypeObject() PyByteArrayIter_Type = PyTypeObject() @staticmethod def PyByteArray_FromObject(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyByteArray_FromObject' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyByteArray_Concat(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyByteArray_Concat' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyByteArray_FromStringAndSize(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = g.Py_ssize_t(int(__dummy_b.value)) raise Exception(u"Function 'PyByteArray_FromStringAndSize' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyByteArray_Size(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyByteArray_Size' only predeclared. Body is missing. Missing C source code.") del __dummy_a return g.Py_ssize_t().value @staticmethod def PyByteArray_AsString(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyByteArray_AsString' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyByteArray_Resize(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = g.Py_ssize_t(int(__dummy_b.value)) raise Exception(u"Function 'PyByteArray_Resize' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value _PyByteArray_empty_string = 'Compile exception ' 'array without explicit len and without body' PyTupleObject = structs._anonymous_PyTupleObject PyListObject = structs._anonymous_PyListObject PyDictEntry = structs._anonymous_PyDictEntry PyDictObject = structs._dictobject PyEnum_Type = PyTypeObject() PyReversed_Type = PyTypeObject() setentry = structs._anonymous_setentry PySetObject = structs._setobject PySet_Type = PyTypeObject() PyFrozenSet_Type = PyTypeObject() @staticmethod def PySet_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFrozenSet_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFrozenSet_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySet_Size(anyset): anyset = ctypes.cast(anyset, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_Size' only predeclared. Body is missing. Missing C source code.") del anyset return g.Py_ssize_t().value @staticmethod def PySet_Clear(set_a): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_Clear' only predeclared. Body is missing. Missing C source code.") del set_a return ctypes_wrapped.c_int().value @staticmethod def PySet_Contains(anyset, key): anyset = ctypes.cast(anyset, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_Contains' only predeclared. Body is missing. Missing C source code.") del anyset del key return ctypes_wrapped.c_int().value @staticmethod def PySet_Discard(set_a, key): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_Discard' only predeclared. Body is missing. Missing C source code.") del set_a del key return ctypes_wrapped.c_int().value @staticmethod def PySet_Add(set_a, key): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_Add' only predeclared. Body is missing. Missing C source code.") del set_a del key return ctypes_wrapped.c_int().value @staticmethod def _PySet_Next(set_a, pos, key): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) pos = ctypes.cast(pos, ctypes.POINTER(g.Py_ssize_t)) key = ctypes.cast(key, ctypes.POINTER(ctypes.POINTER(g.PyObject))) raise Exception(u"Function '_PySet_Next' only predeclared. Body is missing. Missing C source code.") del set_a del pos del key return ctypes_wrapped.c_int().value @staticmethod def _PySet_NextEntry(set_a, pos, key, hash_a): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) pos = ctypes.cast(pos, ctypes.POINTER(g.Py_ssize_t)) key = ctypes.cast(key, ctypes.POINTER(ctypes.POINTER(g.PyObject))) hash_a = ctypes.cast(hash_a, ctypes.POINTER(ctypes_wrapped.c_long)) raise Exception(u"Function '_PySet_NextEntry' only predeclared. Body is missing. Missing C source code.") del set_a del hash_a del pos del key return ctypes_wrapped.c_int().value @staticmethod def PySet_Pop(set_a): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySet_Pop' only predeclared. Body is missing. Missing C source code.") del set_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PySet_Update(set_a, iterable): set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) iterable = ctypes.cast(iterable, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PySet_Update' only predeclared. Body is missing. Missing C source code.") del set_a del iterable return ctypes_wrapped.c_int().value PyCFunction = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) PyCFunctionWithKeywords = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) PyNoArgsFunction = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject)) PyMethodDef = structs.PyMethodDef PyMethodChain = structs.PyMethodChain PyCFunctionObject = structs._anonymous_PyCFunctionObject PyModule_Type = PyTypeObject() @staticmethod def PyModule_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyModule_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyModule_GetDict(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyModule_GetDict' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyModule_GetName(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyModule_GetName' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyModule_GetFilename(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyModule_GetFilename' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyModule_Clear(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyModule_Clear' only predeclared. Body is missing. Missing C source code.") del __dummy_a return PyFunctionObject = structs._anonymous_PyFunctionObject PyFunction_Type = PyTypeObject() @staticmethod def PyFunction_New(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_New' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFunction_GetCode(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_GetCode' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFunction_GetGlobals(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_GetGlobals' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFunction_GetModule(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_GetModule' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFunction_GetDefaults(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_GetDefaults' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFunction_SetDefaults(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_SetDefaults' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyFunction_GetClosure(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_GetClosure' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFunction_SetClosure(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFunction_SetClosure' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value PyClassMethod_Type = PyTypeObject() PyStaticMethod_Type = PyTypeObject() @staticmethod def PyClassMethod_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyClassMethod_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyStaticMethod_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyStaticMethod_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyClassObject = structs._anonymous_PyClassObject PyInstanceObject = structs._anonymous_PyInstanceObject PyMethodObject = structs._anonymous_PyMethodObject PyClass_Type = PyTypeObject() PyInstance_Type = PyTypeObject() PyMethod_Type = PyTypeObject() @staticmethod def PyClass_New(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyClass_New' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInstance_New(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyInstance_New' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInstance_NewRaw(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyInstance_NewRaw' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMethod_New(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMethod_New' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMethod_Function(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMethod_Function' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMethod_Self(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMethod_Self' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMethod_Class(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMethod_Class' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyInstance_Lookup(pinst, name): pinst = ctypes.cast(pinst, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyInstance_Lookup' only predeclared. Body is missing. Missing C source code.") del pinst del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyClass_IsSubclass(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyClass_IsSubclass' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyMethod_ClearFreeList(): raise Exception(u"Function 'PyMethod_ClearFreeList' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value PyFileObject = structs._anonymous_PyFileObject PyFile_Type = PyTypeObject() @staticmethod def PyFile_FromString(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyFile_FromString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFile_SetBufSize(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyFile_SetBufSize' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return @staticmethod def PyFile_SetEncoding(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyFile_SetEncoding' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyFile_SetEncodingAndErrors(__dummy_a, __dummy_b, errors): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyFile_SetEncodingAndErrors' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a del errors return ctypes_wrapped.c_int().value @staticmethod def PyFile_FromFile(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_d = ctypes.cast(__dummy_d, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes_wrapped.c_int))) raise Exception(u"Function 'PyFile_FromFile' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFile_AsFile(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFile_AsFile' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_int)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFile_IncUseCount(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFileObject)) raise Exception(u"Function 'PyFile_IncUseCount' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyFile_DecUseCount(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFileObject)) raise Exception(u"Function 'PyFile_DecUseCount' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyFile_Name(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFile_Name' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFile_GetLine(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyFile_GetLine' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFile_WriteObject(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyFile_WriteObject' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyFile_SoftSpace(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyFile_SoftSpace' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyFile_WriteString(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFile_WriteString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyObject_AsFileDescriptor(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyObject_AsFileDescriptor' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value Py_FileSystemDefaultEncoding = ctypes.POINTER(ctypes_wrapped.c_byte)() @staticmethod def Py_UniversalNewlineFgets(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'Py_UniversalNewlineFgets' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_UniversalNewlineFread(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes_wrapped.c_ulong(int(__dummy_b.value)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'Py_UniversalNewlineFread' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return ctypes_wrapped.c_ulong().value @staticmethod def _PyFile_SanitizeMode(mode): mode = ctypes.cast(mode, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function '_PyFile_SanitizeMode' only predeclared. Body is missing. Missing C source code.") del mode return ctypes_wrapped.c_int().value PyCObject_Type = PyTypeObject() @staticmethod def PyCObject_FromVoidPtr(cobj, destruct): cobj = ctypes.cast(cobj, ctypes_wrapped.c_void_p) destruct = ctypes.cast(destruct, ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p)) raise Exception(u"Function 'PyCObject_FromVoidPtr' only predeclared. Body is missing. Missing C source code.") del destruct del cobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCObject_FromVoidPtrAndDesc(cobj, desc, destruct): cobj = ctypes.cast(cobj, ctypes_wrapped.c_void_p) desc = ctypes.cast(desc, ctypes_wrapped.c_void_p) destruct = ctypes.cast(destruct, ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p, ctypes_wrapped.c_void_p)) raise Exception(u"Function 'PyCObject_FromVoidPtrAndDesc' only predeclared. Body is missing. Missing C source code.") del destruct del cobj del desc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCObject_AsVoidPtr(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCObject_AsVoidPtr' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCObject_GetDesc(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCObject_GetDesc' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCObject_Import(module_name, cobject_name): module_name = ctypes.cast(module_name, ctypes.POINTER(ctypes_wrapped.c_byte)) cobject_name = ctypes.cast(cobject_name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCObject_Import' only predeclared. Body is missing. Missing C source code.") del module_name del cobject_name return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCObject_SetVoidPtr(self, cobj): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cobj = ctypes.cast(cobj, ctypes_wrapped.c_void_p) raise Exception(u"Function 'PyCObject_SetVoidPtr' only predeclared. Body is missing. Missing C source code.") del self del cobj return ctypes_wrapped.c_int().value PyCObject = structs._anonymous_PyCObject PyCapsule_Type = PyTypeObject() PyCapsule_Destructor = ctypes.CFUNCTYPE(None, ctypes.POINTER(PyObject)) @staticmethod def PyCapsule_New(pointer, name, destructor_a): pointer = ctypes.cast(pointer, ctypes_wrapped.c_void_p) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) destructor_a = ctypes.cast(destructor_a, g.PyCapsule_Destructor) raise Exception(u"Function 'PyCapsule_New' only predeclared. Body is missing. Missing C source code.") del pointer del name del destructor_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCapsule_GetPointer(capsule, name): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCapsule_GetPointer' only predeclared. Body is missing. Missing C source code.") del capsule del name return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCapsule_GetDestructor(capsule): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCapsule_GetDestructor' only predeclared. Body is missing. Missing C source code.") del capsule return g.PyCapsule_Destructor() @staticmethod def PyCapsule_GetName(capsule): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCapsule_GetName' only predeclared. Body is missing. Missing C source code.") del capsule return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCapsule_GetContext(capsule): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCapsule_GetContext' only predeclared. Body is missing. Missing C source code.") del capsule return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCapsule_IsValid(capsule, name): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCapsule_IsValid' only predeclared. Body is missing. Missing C source code.") del capsule del name return ctypes_wrapped.c_int().value @staticmethod def PyCapsule_SetPointer(capsule, pointer): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) pointer = ctypes.cast(pointer, ctypes_wrapped.c_void_p) raise Exception(u"Function 'PyCapsule_SetPointer' only predeclared. Body is missing. Missing C source code.") del capsule del pointer return ctypes_wrapped.c_int().value @staticmethod def PyCapsule_SetDestructor(capsule, destructor_a): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) destructor_a = ctypes.cast(destructor_a, g.PyCapsule_Destructor) raise Exception(u"Function 'PyCapsule_SetDestructor' only predeclared. Body is missing. Missing C source code.") del capsule del destructor_a return ctypes_wrapped.c_int().value @staticmethod def PyCapsule_SetName(capsule, name): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCapsule_SetName' only predeclared. Body is missing. Missing C source code.") del capsule del name return ctypes_wrapped.c_int().value @staticmethod def PyCapsule_SetContext(capsule, context): capsule = ctypes.cast(capsule, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) raise Exception(u"Function 'PyCapsule_SetContext' only predeclared. Body is missing. Missing C source code.") del capsule del context return ctypes_wrapped.c_int().value @staticmethod def PyCapsule_Import(name, no_block): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) no_block = ctypes_wrapped.c_int(int(no_block.value)) raise Exception(u"Function 'PyCapsule_Import' only predeclared. Body is missing. Missing C source code.") del no_block del name return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) PyTracebackObject = structs._traceback @staticmethod def PyTraceBack_Here(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs._frame)) raise Exception(u"Function 'PyTraceBack_Here' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyTraceBack_Print(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyTraceBack_Print' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def _Py_DisplaySourceLine(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) raise Exception(u"Function '_Py_DisplaySourceLine' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return ctypes_wrapped.c_int().value PyTraceBack_Type = PyTypeObject() _Py_EllipsisObject = PyObject() PySliceObject = structs._anonymous_PySliceObject PySlice_Type = PyTypeObject() PyEllipsis_Type = PyTypeObject() @staticmethod def PySlice_New(start, stop, step): start = ctypes.cast(start, ctypes.POINTER(g.PyObject)) stop = ctypes.cast(stop, ctypes.POINTER(g.PyObject)) step = ctypes.cast(step, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySlice_New' only predeclared. Body is missing. Missing C source code.") del start del step del stop return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PySlice_FromIndices(start, stop): start = g.Py_ssize_t(int(start.value)) stop = g.Py_ssize_t(int(stop.value)) raise Exception(u"Function '_PySlice_FromIndices' only predeclared. Body is missing. Missing C source code.") del start del stop return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySlice_GetIndices(r, length, start, stop, step): r = ctypes.cast(r, ctypes.POINTER(g.PySliceObject)) length = g.Py_ssize_t(int(length.value)) start = ctypes.cast(start, ctypes.POINTER(g.Py_ssize_t)) stop = ctypes.cast(stop, ctypes.POINTER(g.Py_ssize_t)) step = ctypes.cast(step, ctypes.POINTER(g.Py_ssize_t)) raise Exception(u"Function 'PySlice_GetIndices' only predeclared. Body is missing. Missing C source code.") del start del length del r del stop del step return ctypes_wrapped.c_int().value @staticmethod def PySlice_GetIndicesEx(r, length, start, stop, step, slicelength): r = ctypes.cast(r, ctypes.POINTER(g.PySliceObject)) length = g.Py_ssize_t(int(length.value)) start = ctypes.cast(start, ctypes.POINTER(g.Py_ssize_t)) stop = ctypes.cast(stop, ctypes.POINTER(g.Py_ssize_t)) step = ctypes.cast(step, ctypes.POINTER(g.Py_ssize_t)) slicelength = ctypes.cast(slicelength, ctypes.POINTER(g.Py_ssize_t)) raise Exception(u"Function 'PySlice_GetIndicesEx' only predeclared. Body is missing. Missing C source code.") del slicelength del stop del step del start del length del r return ctypes_wrapped.c_int().value PyCellObject = structs._anonymous_PyCellObject PyCell_Type = PyTypeObject() @staticmethod def PyCell_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCell_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCell_Get(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCell_Get' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCell_Set(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCell_Set' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value PySeqIter_Type = PyTypeObject() @staticmethod def PySeqIter_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PySeqIter_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyCallIter_Type = PyTypeObject() @staticmethod def PyCallIter_New(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCallIter_New' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyGenObject = structs._anonymous_PyGenObject PyGen_Type = PyTypeObject() @staticmethod def PyGen_New(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs._frame)) raise Exception(u"Function 'PyGen_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyGen_NeedsFinalizing(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyGenObject)) raise Exception(u"Function 'PyGen_NeedsFinalizing' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value getter = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p) setter = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p) PyGetSetDef = structs.PyGetSetDef wrapperfunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p) wrapperfunc_kwds = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject)) PyDescrObject = structs._anonymous_PyDescrObject PyMethodDescrObject = structs._anonymous_PyMethodDescrObject PyMemberDescrObject = structs._anonymous_PyMemberDescrObject PyGetSetDescrObject = structs._anonymous_PyGetSetDescrObject PyWrapperDescrObject = structs._anonymous_PyWrapperDescrObject @staticmethod def _PyWarnings_Init(): raise Exception(u"Function '_PyWarnings_Init' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyErr_WarnEx(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = g.Py_ssize_t(int(__dummy_c.value)) raise Exception(u"Function 'PyErr_WarnEx' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyErr_WarnExplicit(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_WarnExplicit' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_d del __dummy_e return ctypes_wrapped.c_int().value PyWeakReference = structs._PyWeakReference _PyWeakref_RefType = PyTypeObject() _PyWeakref_ProxyType = PyTypeObject() _PyWeakref_CallableProxyType = PyTypeObject() @staticmethod def PyWeakref_NewRef(ob, callback): ob = ctypes.cast(ob, ctypes.POINTER(g.PyObject)) callback = ctypes.cast(callback, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyWeakref_NewRef' only predeclared. Body is missing. Missing C source code.") del callback del ob return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyWeakref_NewProxy(ob, callback): ob = ctypes.cast(ob, ctypes.POINTER(g.PyObject)) callback = ctypes.cast(callback, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyWeakref_NewProxy' only predeclared. Body is missing. Missing C source code.") del callback del ob return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyWeakref_GetObject(ref): ref = ctypes.cast(ref, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyWeakref_GetObject' only predeclared. Body is missing. Missing C source code.") del ref return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyWeakref_GetWeakrefCount(head): head = ctypes.cast(head, ctypes.POINTER(g.PyWeakReference)) raise Exception(u"Function '_PyWeakref_GetWeakrefCount' only predeclared. Body is missing. Missing C source code.") del head return g.Py_ssize_t().value @staticmethod def _PyWeakref_ClearRef(self): self = ctypes.cast(self, ctypes.POINTER(g.PyWeakReference)) raise Exception(u"Function '_PyWeakref_ClearRef' only predeclared. Body is missing. Missing C source code.") del self return @staticmethod def PyCodec_Register(search_function): search_function = ctypes.cast(search_function, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_Register' only predeclared. Body is missing. Missing C source code.") del search_function return ctypes_wrapped.c_int().value @staticmethod def _PyCodec_Lookup(encoding): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function '_PyCodec_Lookup' only predeclared. Body is missing. Missing C source code.") del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_Encode(object_a, encoding, errors): object_a = ctypes.cast(object_a, ctypes.POINTER(g.PyObject)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_Encode' only predeclared. Body is missing. Missing C source code.") del object_a del errors del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_Decode(object_a, encoding, errors): object_a = ctypes.cast(object_a, ctypes.POINTER(g.PyObject)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_Decode' only predeclared. Body is missing. Missing C source code.") del object_a del errors del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_Encoder(encoding): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_Encoder' only predeclared. Body is missing. Missing C source code.") del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_Decoder(encoding): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_Decoder' only predeclared. Body is missing. Missing C source code.") del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_IncrementalEncoder(encoding, errors): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_IncrementalEncoder' only predeclared. Body is missing. Missing C source code.") del errors del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_IncrementalDecoder(encoding, errors): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_IncrementalDecoder' only predeclared. Body is missing. Missing C source code.") del errors del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_StreamReader(encoding, stream, errors): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) stream = ctypes.cast(stream, ctypes.POINTER(g.PyObject)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_StreamReader' only predeclared. Body is missing. Missing C source code.") del errors del stream del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_StreamWriter(encoding, stream, errors): encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) stream = ctypes.cast(stream, ctypes.POINTER(g.PyObject)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_StreamWriter' only predeclared. Body is missing. Missing C source code.") del errors del stream del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_RegisterError(name, error): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) error = ctypes.cast(error, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_RegisterError' only predeclared. Body is missing. Missing C source code.") del name del error return ctypes_wrapped.c_int().value @staticmethod def PyCodec_LookupError(name): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyCodec_LookupError' only predeclared. Body is missing. Missing C source code.") del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_StrictErrors(exc): exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_StrictErrors' only predeclared. Body is missing. Missing C source code.") del exc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_IgnoreErrors(exc): exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_IgnoreErrors' only predeclared. Body is missing. Missing C source code.") del exc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_ReplaceErrors(exc): exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_ReplaceErrors' only predeclared. Body is missing. Missing C source code.") del exc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_XMLCharRefReplaceErrors(exc): exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_XMLCharRefReplaceErrors' only predeclared. Body is missing. Missing C source code.") del exc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCodec_BackslashReplaceErrors(exc): exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCodec_BackslashReplaceErrors' only predeclared. Body is missing. Missing C source code.") del exc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyBaseExceptionObject = structs._anonymous_PyBaseExceptionObject PySyntaxErrorObject = structs._anonymous_PySyntaxErrorObject PySystemExitObject = structs._anonymous_PySystemExitObject PyEnvironmentErrorObject = structs._anonymous_PyEnvironmentErrorObject @staticmethod def PyErr_SetNone(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_SetNone' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyErr_SetObject(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_SetObject' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return @staticmethod def PyErr_SetString(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyErr_SetString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return @staticmethod def PyErr_Occurred(): raise Exception(u"Function 'PyErr_Occurred' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_Clear(): raise Exception(u"Function 'PyErr_Clear' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyErr_Fetch(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes.POINTER(g.PyObject))) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes.POINTER(g.PyObject))) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes.POINTER(g.PyObject))) raise Exception(u"Function 'PyErr_Fetch' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return @staticmethod def PyErr_Restore(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_Restore' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return @staticmethod def PyErr_GivenExceptionMatches(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_GivenExceptionMatches' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyErr_ExceptionMatches(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_ExceptionMatches' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyErr_NormalizeException(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes.POINTER(g.PyObject))) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes.POINTER(g.PyObject))) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes.POINTER(g.PyObject))) raise Exception(u"Function 'PyErr_NormalizeException' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return PyExc_BaseException = ctypes.POINTER(PyObject)() PyExc_Exception = ctypes.POINTER(PyObject)() PyExc_StopIteration = ctypes.POINTER(PyObject)() PyExc_GeneratorExit = ctypes.POINTER(PyObject)() PyExc_StandardError = ctypes.POINTER(PyObject)() PyExc_ArithmeticError = ctypes.POINTER(PyObject)() PyExc_LookupError = ctypes.POINTER(PyObject)() PyExc_AssertionError = ctypes.POINTER(PyObject)() PyExc_AttributeError = ctypes.POINTER(PyObject)() PyExc_EOFError = ctypes.POINTER(PyObject)() PyExc_FloatingPointError = ctypes.POINTER(PyObject)() PyExc_EnvironmentError = ctypes.POINTER(PyObject)() PyExc_IOError = ctypes.POINTER(PyObject)() PyExc_OSError = ctypes.POINTER(PyObject)() PyExc_ImportError = ctypes.POINTER(PyObject)() PyExc_IndexError = ctypes.POINTER(PyObject)() PyExc_KeyError = ctypes.POINTER(PyObject)() PyExc_KeyboardInterrupt = ctypes.POINTER(PyObject)() PyExc_MemoryError = ctypes.POINTER(PyObject)() PyExc_NameError = ctypes.POINTER(PyObject)() PyExc_OverflowError = ctypes.POINTER(PyObject)() PyExc_RuntimeError = ctypes.POINTER(PyObject)() PyExc_NotImplementedError = ctypes.POINTER(PyObject)() PyExc_SyntaxError = ctypes.POINTER(PyObject)() PyExc_IndentationError = ctypes.POINTER(PyObject)() PyExc_TabError = ctypes.POINTER(PyObject)() PyExc_ReferenceError = ctypes.POINTER(PyObject)() PyExc_SystemError = ctypes.POINTER(PyObject)() PyExc_SystemExit = ctypes.POINTER(PyObject)() PyExc_TypeError = ctypes.POINTER(PyObject)() PyExc_UnboundLocalError = ctypes.POINTER(PyObject)() PyExc_UnicodeError = ctypes.POINTER(PyObject)() PyExc_UnicodeEncodeError = ctypes.POINTER(PyObject)() PyExc_UnicodeDecodeError = ctypes.POINTER(PyObject)() PyExc_UnicodeTranslateError = ctypes.POINTER(PyObject)() PyExc_ValueError = ctypes.POINTER(PyObject)() PyExc_ZeroDivisionError = ctypes.POINTER(PyObject)() PyExc_BufferError = ctypes.POINTER(PyObject)() PyExc_MemoryErrorInst = ctypes.POINTER(PyObject)() PyExc_RecursionErrorInst = ctypes.POINTER(PyObject)() PyExc_Warning = ctypes.POINTER(PyObject)() PyExc_UserWarning = ctypes.POINTER(PyObject)() PyExc_DeprecationWarning = ctypes.POINTER(PyObject)() PyExc_PendingDeprecationWarning = ctypes.POINTER(PyObject)() PyExc_SyntaxWarning = ctypes.POINTER(PyObject)() PyExc_RuntimeWarning = ctypes.POINTER(PyObject)() PyExc_FutureWarning = ctypes.POINTER(PyObject)() PyExc_ImportWarning = ctypes.POINTER(PyObject)() PyExc_UnicodeWarning = ctypes.POINTER(PyObject)() PyExc_BytesWarning = ctypes.POINTER(PyObject)() @staticmethod def PyErr_BadArgument(): raise Exception(u"Function 'PyErr_BadArgument' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def PyErr_NoMemory(): raise Exception(u"Function 'PyErr_NoMemory' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_SetFromErrno(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_SetFromErrno' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_SetFromErrnoWithFilenameObject(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_SetFromErrnoWithFilenameObject' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_SetFromErrnoWithFilename(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyErr_SetFromErrnoWithFilename' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_Format(__dummy_a, __dummy_b, *varargs): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyErr_Format' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_BadInternalCall(): raise Exception(u"Function 'PyErr_BadInternalCall' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyErr_BadInternalCall(filename, lineno): filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) lineno = ctypes_wrapped.c_int(int(lineno.value)) raise Exception(u"Function '_PyErr_BadInternalCall' only predeclared. Body is missing. Missing C source code.") del lineno del filename return @staticmethod def PyErr_NewException(name, base, dict_a): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) base = ctypes.cast(base, ctypes.POINTER(g.PyObject)) dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_NewException' only predeclared. Body is missing. Missing C source code.") del dict_a del base del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_NewExceptionWithDoc(name, doc, base, dict_a): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) doc = ctypes.cast(doc, ctypes.POINTER(ctypes_wrapped.c_byte)) base = ctypes.cast(base, ctypes.POINTER(g.PyObject)) dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_NewExceptionWithDoc' only predeclared. Body is missing. Missing C source code.") del doc del dict_a del base del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyErr_WriteUnraisable(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyErr_WriteUnraisable' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyErr_CheckSignals(): raise Exception(u"Function 'PyErr_CheckSignals' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def PyErr_SetInterrupt(): raise Exception(u"Function 'PyErr_SetInterrupt' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PySignal_SetWakeupFd(fd): fd = ctypes_wrapped.c_int(int(fd.value)) raise Exception(u"Function 'PySignal_SetWakeupFd' only predeclared. Body is missing. Missing C source code.") del fd return ctypes_wrapped.c_int().value @staticmethod def PyErr_SyntaxLocation(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyErr_SyntaxLocation' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return @staticmethod def PyErr_ProgramText(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyErr_ProgramText' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyOS_snprintf(str_a, size, format_a, *varargs): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) size = ctypes_wrapped.c_ulong(int(size.value)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyOS_snprintf' only predeclared. Body is missing. Missing C source code.") del str_a del format_a del size return ctypes_wrapped.c_int().value @staticmethod def PyOS_vsnprintf(str_a, size, format_a, va): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) size = ctypes_wrapped.c_ulong(int(size.value)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(va) raise Exception(u"Function 'PyOS_vsnprintf' only predeclared. Body is missing. Missing C source code.") del va del str_a del format_a del size return ctypes_wrapped.c_int().value PyInterpreterState = structs._is Py_tracefunc = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyObject), ctypes.POINTER(structs._frame), ctypes_wrapped.c_int, ctypes.POINTER(PyObject)) PyThreadState = structs._ts PyGILState_STATE = ctypes_wrapped.c_uint32 @staticmethod def PyGILState_Ensure(): raise Exception(u"Function 'PyGILState_Ensure' only predeclared. Body is missing. Missing C source code.") return g.PyGILState_STATE().value @staticmethod def PyGILState_Release(__dummy_a): __dummy_a = g.PyGILState_STATE(__dummy_a.value) raise Exception(u"Function 'PyGILState_Release' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyGILState_GetThisThreadState(): raise Exception(u"Function 'PyGILState_GetThisThreadState' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) PyThreadFrameGetter = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyThreadState)) PyArena = structs._arena @staticmethod def PyArena_New(): raise Exception(u"Function 'PyArena_New' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyArena)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyArena_Free(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyArena)) raise Exception(u"Function 'PyArena_Free' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyArena_Malloc(__dummy_a, size): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyArena)) size = ctypes_wrapped.c_ulong(int(size.value)) raise Exception(u"Function 'PyArena_Malloc' only predeclared. Body is missing. Missing C source code.") del __dummy_a del size return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyArena_AddPyObject(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyArena)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyArena_AddPyObject' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyArg_Parse(__dummy_a, __dummy_b, *varargs): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyArg_Parse' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyArg_ParseTuple(__dummy_a, __dummy_b, *varargs): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyArg_ParseTuple' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyArg_ParseTupleAndKeywords(__dummy_a, __dummy_b, __dummy_c, __dummy_d, *varargs): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) raise Exception(u"Function 'PyArg_ParseTupleAndKeywords' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return ctypes_wrapped.c_int().value @staticmethod def PyArg_UnpackTuple(__dummy_a, __dummy_b, __dummy_c, __dummy_d, *varargs): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = g.Py_ssize_t(int(__dummy_c.value)) __dummy_d = g.Py_ssize_t(int(__dummy_d.value)) raise Exception(u"Function 'PyArg_UnpackTuple' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return ctypes_wrapped.c_int().value @staticmethod def _PyArg_NoKeywords(funcname, kw): funcname = ctypes.cast(funcname, ctypes.POINTER(ctypes_wrapped.c_byte)) kw = ctypes.cast(kw, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_PyArg_NoKeywords' only predeclared. Body is missing. Missing C source code.") del kw del funcname return ctypes_wrapped.c_int().value @staticmethod def PyArg_VaParse(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = helpers.VarArgs(__dummy_c) raise Exception(u"Function 'PyArg_VaParse' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyArg_VaParseTupleAndKeywords(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) __dummy_e = helpers.VarArgs(__dummy_e) raise Exception(u"Function 'PyArg_VaParseTupleAndKeywords' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d del __dummy_e return ctypes_wrapped.c_int().value PyCompilerFlags = structs._anonymous_PyCompilerFlags @staticmethod def Py_GetProgramFullPath(): raise Exception(u"Function 'Py_GetProgramFullPath' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetPrefix(): raise Exception(u"Function 'Py_GetPrefix' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetExecPrefix(): raise Exception(u"Function 'Py_GetExecPrefix' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetPath(): raise Exception(u"Function 'Py_GetPath' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetVersion(): raise Exception(u"Function 'Py_GetVersion' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetPlatform(): raise Exception(u"Function 'Py_GetPlatform' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetCopyright(): raise Exception(u"Function 'Py_GetCopyright' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetCompiler(): raise Exception(u"Function 'Py_GetCompiler' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_GetBuildInfo(): raise Exception(u"Function 'Py_GetBuildInfo' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_svnversion(): raise Exception(u"Function '_Py_svnversion' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_hgidentifier(): raise Exception(u"Function '_Py_hgidentifier' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_hgversion(): raise Exception(u"Function '_Py_hgversion' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyBuiltin_Init(): raise Exception(u"Function '_PyBuiltin_Init' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyImport_Init(): raise Exception(u"Function '_PyImport_Init' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyExc_Init(): raise Exception(u"Function '_PyExc_Init' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyImportHooks_Init(): raise Exception(u"Function '_PyImportHooks_Init' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyFrame_Init(): raise Exception(u"Function '_PyFrame_Init' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def _PyInt_Init(): raise Exception(u"Function '_PyInt_Init' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def _PyLong_Init(): raise Exception(u"Function '_PyLong_Init' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def _PyFloat_Init(): raise Exception(u"Function '_PyFloat_Init' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyByteArray_Init(): raise Exception(u"Function 'PyByteArray_Init' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def _PyExc_Fini(): raise Exception(u"Function '_PyExc_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyImport_Fini(): raise Exception(u"Function '_PyImport_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyMethod_Fini(): raise Exception(u"Function 'PyMethod_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyFrame_Fini(): raise Exception(u"Function 'PyFrame_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PySet_Fini(): raise Exception(u"Function 'PySet_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyInt_Fini(): raise Exception(u"Function 'PyInt_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyFloat_Fini(): raise Exception(u"Function 'PyFloat_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyOS_FiniInterrupts(): raise Exception(u"Function 'PyOS_FiniInterrupts' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyByteArray_Fini(): raise Exception(u"Function 'PyByteArray_Fini' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyOS_Readline(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyOS_Readline' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) PyOS_InputHook = ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int))() PyOS_ReadlineFunctionPointer = ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.POINTER(ctypes_wrapped.c_int), ctypes.POINTER(ctypes_wrapped.c_int), ctypes.POINTER(ctypes_wrapped.c_byte))() _PyOS_ReadlineTState = ctypes.POINTER(PyThreadState)() PyOS_sighandler_t = ctypes.CFUNCTYPE(None, ctypes_wrapped.c_int) @staticmethod def PyOS_InterruptOccurred(): raise Exception(u"Function 'PyOS_InterruptOccurred' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def PyOS_InitInterrupts(): raise Exception(u"Function 'PyOS_InitInterrupts' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyOS_AfterFork(): raise Exception(u"Function 'PyOS_AfterFork' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyImport_GetMagicNumber(): raise Exception(u"Function 'PyImport_GetMagicNumber' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_long().value @staticmethod def PyImport_ExecCodeModule(name, co): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) co = ctypes.cast(co, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyImport_ExecCodeModule' only predeclared. Body is missing. Missing C source code.") del co del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_ExecCodeModuleEx(name, co, pathname): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) co = ctypes.cast(co, ctypes.POINTER(g.PyObject)) pathname = ctypes.cast(pathname, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyImport_ExecCodeModuleEx' only predeclared. Body is missing. Missing C source code.") del pathname del co del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_GetModuleDict(): raise Exception(u"Function 'PyImport_GetModuleDict' only predeclared. Body is missing. Missing C source code.") return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_AddModule(name): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyImport_AddModule' only predeclared. Body is missing. Missing C source code.") del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_ImportModule(name): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyImport_ImportModule' only predeclared. Body is missing. Missing C source code.") del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_ImportModuleNoBlock(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyImport_ImportModuleNoBlock' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_ImportModuleLevel(name, globals_a, locals_a, fromlist, level): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) fromlist = ctypes.cast(fromlist, ctypes.POINTER(g.PyObject)) level = ctypes_wrapped.c_int(int(level.value)) raise Exception(u"Function 'PyImport_ImportModuleLevel' only predeclared. Body is missing. Missing C source code.") del fromlist del globals_a del locals_a del name del level return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_GetImporter(path): path = ctypes.cast(path, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyImport_GetImporter' only predeclared. Body is missing. Missing C source code.") del path return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_Import(name): name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyImport_Import' only predeclared. Body is missing. Missing C source code.") del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_ReloadModule(m): m = ctypes.cast(m, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyImport_ReloadModule' only predeclared. Body is missing. Missing C source code.") del m return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyImport_Cleanup(): raise Exception(u"Function 'PyImport_Cleanup' only predeclared. Body is missing. Missing C source code.") return @staticmethod def PyImport_ImportFrozenModule(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyImport_ImportFrozenModule' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def _PyImport_FindModule(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_d = ctypes_wrapped.c_ulong(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_int))) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(ctypes.POINTER(g.PyObject))) raise Exception(u"Function '_PyImport_FindModule' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(structs.filedescr)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyImport_IsScript(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs.filedescr)) raise Exception(u"Function '_PyImport_IsScript' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def _PyImport_ReInitLock(): raise Exception(u"Function '_PyImport_ReInitLock' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyImport_FindExtension(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function '_PyImport_FindExtension' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyImport_FixupExtension(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function '_PyImport_FixupExtension' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyNullImporter_Type = PyTypeObject() PyImport_Inittab = ctypes.POINTER(structs._inittab)() @staticmethod def PyImport_AppendInittab(name, initfunc): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) initfunc = ctypes.cast(initfunc, ctypes.CFUNCTYPE(helpers.fixReturnType(None))) raise Exception(u"Function 'PyImport_AppendInittab' only predeclared. Body is missing. Missing C source code.") del initfunc del name return ctypes_wrapped.c_int().value @staticmethod def PyImport_ExtendInittab(newtab): newtab = ctypes.cast(newtab, ctypes.POINTER(structs._inittab)) raise Exception(u"Function 'PyImport_ExtendInittab' only predeclared. Body is missing. Missing C source code.") del newtab return ctypes_wrapped.c_int().value PyImport_FrozenModules = ctypes.POINTER(structs._frozen)() @staticmethod def PyBuffer_SizeFromFormat(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyBuffer_SizeFromFormat' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value PyCodeObject = structs._anonymous_PyCodeObject PyCode_Type = PyTypeObject() @staticmethod def PyCode_New(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f, __dummy_g, __dummy_h, __dummy_i, __dummy_j, __dummy_k, __dummy_l, __dummy_m, __dummy_n): __dummy_a = ctypes_wrapped.c_int(int(__dummy_a.value)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(g.PyObject)) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(g.PyObject)) __dummy_g = ctypes.cast(__dummy_g, ctypes.POINTER(g.PyObject)) __dummy_h = ctypes.cast(__dummy_h, ctypes.POINTER(g.PyObject)) __dummy_i = ctypes.cast(__dummy_i, ctypes.POINTER(g.PyObject)) __dummy_j = ctypes.cast(__dummy_j, ctypes.POINTER(g.PyObject)) __dummy_k = ctypes.cast(__dummy_k, ctypes.POINTER(g.PyObject)) __dummy_l = ctypes.cast(__dummy_l, ctypes.POINTER(g.PyObject)) __dummy_m = ctypes_wrapped.c_int(int(__dummy_m.value)) __dummy_n = ctypes.cast(__dummy_n, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCode_New' only predeclared. Body is missing. Missing C source code.") del __dummy_j del __dummy_k del __dummy_h del __dummy_i del __dummy_n del __dummy_l del __dummy_m del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_g del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.PyCodeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCode_NewEmpty(filename, funcname, firstlineno): filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) funcname = ctypes.cast(funcname, ctypes.POINTER(ctypes_wrapped.c_byte)) firstlineno = ctypes_wrapped.c_int(int(firstlineno.value)) raise Exception(u"Function 'PyCode_NewEmpty' only predeclared. Body is missing. Missing C source code.") del firstlineno del funcname del filename return (ctypes.cast(ctypes.POINTER(g.PyCodeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCode_Addr2Line(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyCodeObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyCode_Addr2Line' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value PyAddrPair = structs._addr_pair @staticmethod def _PyCode_CheckLineNumber(co, lasti, bounds): co = ctypes.cast(co, ctypes.POINTER(g.PyCodeObject)) lasti = ctypes_wrapped.c_int(int(lasti.value)) bounds = ctypes.cast(bounds, ctypes.POINTER(g.PyAddrPair)) raise Exception(u"Function '_PyCode_CheckLineNumber' only predeclared. Body is missing. Missing C source code.") del lasti del co del bounds return ctypes_wrapped.c_int().value @staticmethod def PyCode_Optimize(code, consts, names, lineno_obj): code = ctypes.cast(code, ctypes.POINTER(g.PyObject)) consts = ctypes.cast(consts, ctypes.POINTER(g.PyObject)) names = ctypes.cast(names, ctypes.POINTER(g.PyObject)) lineno_obj = ctypes.cast(lineno_obj, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyCode_Optimize' only predeclared. Body is missing. Missing C source code.") del code del names del consts del lineno_obj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNode_Compile(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs._node)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyNode_Compile' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyCodeObject)(), ctypes_wrapped.c_void_p).value or 0) PyFutureFeatures = structs._anonymous_PyFutureFeatures @staticmethod def PyAST_Compile(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs._mod)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyCompilerFlags)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.PyArena)) raise Exception(u"Function 'PyAST_Compile' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return (ctypes.cast(ctypes.POINTER(g.PyCodeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFuture_FromAST(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs._mod)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyFuture_FromAST' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyFutureFeatures)(), ctypes_wrapped.c_void_p).value or 0) _Py_ctype_table = (ctypes_wrapped.c_uint * 256L)() _Py_ctype_tolower = (ctypes_wrapped.c_ubyte * 256L)() _Py_ctype_toupper = (ctypes_wrapped.c_ubyte * 256L)() @staticmethod def PyOS_ascii_strtod(str_a, ptr): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) raise Exception(u"Function 'PyOS_ascii_strtod' only predeclared. Body is missing. Missing C source code.") del str_a del ptr return ctypes_wrapped.c_double().value @staticmethod def PyOS_ascii_atof(str_a): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyOS_ascii_atof' only predeclared. Body is missing. Missing C source code.") del str_a return ctypes_wrapped.c_double().value @staticmethod def PyOS_ascii_formatd(buffer_a, buf_len, format_a, d): buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)) buf_len = ctypes_wrapped.c_ulong(int(buf_len.value)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) d = ctypes_wrapped.c_double(d.value) raise Exception(u"Function 'PyOS_ascii_formatd' only predeclared. Body is missing. Missing C source code.") del buf_len del format_a del buffer_a del d return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyOS_string_to_double(str_a, endptr, overflow_exception): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) endptr = ctypes.cast(endptr, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) overflow_exception = ctypes.cast(overflow_exception, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyOS_string_to_double' only predeclared. Body is missing. Missing C source code.") del str_a del endptr del overflow_exception return ctypes_wrapped.c_double().value @staticmethod def PyOS_double_to_string(val, format_code, precision, flags, type_a): val = ctypes_wrapped.c_double(val.value) format_code = ctypes_wrapped.c_byte(int(format_code.value)) precision = ctypes_wrapped.c_int(int(precision.value)) flags = ctypes_wrapped.c_int(int(flags.value)) type_a = ctypes.cast(type_a, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyOS_double_to_string' only predeclared. Body is missing. Missing C source code.") del format_code del type_a del flags del precision del val return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_parse_inf_or_nan(p, endptr): p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) endptr = ctypes.cast(endptr, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) raise Exception(u"Function '_Py_parse_inf_or_nan' only predeclared. Body is missing. Missing C source code.") del p del endptr return ctypes_wrapped.c_double().value @staticmethod def PyOS_mystrnicmp(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = g.Py_ssize_t(int(__dummy_c.value)) raise Exception(u"Function 'PyOS_mystrnicmp' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyOS_mystricmp(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyOS_mystricmp' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def _Py_Mangle(p, name): p = ctypes.cast(p, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) raise Exception(u"Function '_Py_Mangle' only predeclared. Body is missing. Missing C source code.") del p del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) orig_argv = ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))() orig_argc = ctypes_wrapped.c_int() usage_line = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_line with ctypes.cast(intp._make_string('usage: %s [option] ... [-c cmd | -m mod | file | -] [arg] ...\n'), ctypes.POINTER(ctypes_wrapped.c_byte)) usage_1 = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_1 with ctypes.cast(intp._make_string("Options and arguments (and corresponding environment variables):\n-B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x\n-c cmd : program passed in as string (terminates option list)\n-d : debug output from parser; also PYTHONDEBUG=x\n-E : ignore PYTHON* environment variables (such as PYTHONPATH)\n-h : print this help message and exit (also --help)\n-i : inspect interactively after running script; forces a prompt even\n"), ctypes.POINTER(ctypes_wrapped.c_byte)) usage_2 = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_2 with ctypes.cast(intp._make_string(" if stdin does not appear to be a terminal; also PYTHONINSPECT=x\n-m mod : run library module as a script (terminates option list)\n-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n-OO : remove doc-strings in addition to the -O optimizations\n-R : use a pseudo-random salt to make hash() values of various types be\n unpredictable between separate invocations of the interpreter, as\n a defense against denial-of-service attacks\n-Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n-S : don't imply 'import site' on initialization\n-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n"), ctypes.POINTER(ctypes_wrapped.c_byte)) usage_3 = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_3 with ctypes.cast(intp._make_string("-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x\n see man page for details on internal buffering relating to '-u'\n-v : verbose (trace import statements); also PYTHONVERBOSE=x\n can be supplied multiple times to increase verbosity\n-V : print the Python version number and exit (also --version)\n-W arg : warning control; arg is action:message:category:module:lineno\n also PYTHONWARNINGS=arg\n-x : skip first line of source, allowing use of non-Unix forms of #!cmd\n"), ctypes.POINTER(ctypes_wrapped.c_byte)) usage_4 = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_4 with ctypes.cast(intp._make_string("-3 : warn about Python 3.x incompatibilities that 2to3 cannot trivially fix\nfile : program read from script file\n- : program read from stdin (default; interactive mode if a tty)\narg ...: arguments passed to program in sys.argv[1:]\n\nOther environment variables:\nPYTHONSTARTUP: file executed on interactive startup (no default)\nPYTHONPATH : '%c'-separated list of directories prefixed to the\n default module search path. The result is sys.path.\n"), ctypes.POINTER(ctypes_wrapped.c_byte)) usage_5 = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_5 with ctypes.cast(intp._make_string("PYTHONHOME : alternate directory (or %c).\n The default module search path uses %s.\nPYTHONCASEOK : ignore case in 'import' statements (Windows).\nPYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n"), ctypes.POINTER(ctypes_wrapped.c_byte)) usage_6 = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init usage_6 with ctypes.cast(intp._make_string("PYTHONHASHSEED: if this variable is set to 'random', the effect is the same\n as specifying the -R option: a random value is used to seed the hashes of\n str, bytes and datetime objects. It can also be set to an integer\n in the range [0,4294967295] to get hash values with a predictable seed.\n"), ctypes.POINTER(ctypes_wrapped.c_byte)) @staticmethod def usage(exitcode, program): exitcode = ctypes_wrapped.c_int(int(exitcode.value)) program = ctypes.cast(program, ctypes.POINTER(ctypes_wrapped.c_byte)) f = ctypes.cast((ctypes.cast(values.stderr.value, ctypes.POINTER(ctypes_wrapped.c_int)) if exitcode.value else ctypes.cast(values.stdout.value, ctypes.POINTER(ctypes_wrapped.c_int))), ctypes.POINTER(ctypes_wrapped.c_int)) values.fprintf.value(ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)), g.usage_line, program) if exitcode.value: values.fprintf.value(ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string("Try `python -h' for more information.\n"), ctypes.POINTER(ctypes_wrapped.c_byte))) else: values.fputs.value(g.usage_1, ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int))) values.fputs.value(g.usage_2, ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int))) values.fputs.value(g.usage_3, ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int))) values.fprintf.value(ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)), g.usage_4, ctypes.c_byte(58)) values.fprintf.value(ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)), g.usage_5, ctypes.c_byte(58), intp._make_string('/pythonX.X')) values.fputs.value(g.usage_6, ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int))) return exitcode.value del program del f del exitcode return ctypes_wrapped.c_int().value @staticmethod def RunStartupFile(cf): cf = ctypes.cast(cf, ctypes.POINTER(g.PyCompilerFlags)) startup = ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONSTARTUP')), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(startup, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(startup, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value != ctypes.c_byte(0).value)).value)).value: fp = ctypes.cast(values.fopen.value(startup, ctypes.cast(intp._make_string('r'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(ctypes_wrapped.c_int)) if ctypes_wrapped.c_int(((ctypes.cast(fp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: (ctypes_wrapped.c_int(int(g.PyRun_SimpleFileExFlags(fp, startup, ctypes_wrapped.c_int(int(0L)), cf))), None)[1] g.PyErr_Clear() values.fclose.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) else: save_errno = ctypes_wrapped.c_int() helpers.assign(save_errno, values.errno.value.value) g.PySys_WriteStderr(ctypes.cast(intp._make_string('Could not open PYTHONSTARTUP\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(values.errno.value, save_errno.value) intp._getPtr(g.PyErr_SetFromErrnoWithFilename(g.PyExc_IOError, startup), ctypes.POINTER(g.PyObject)) g.PyErr_Print() g.PyErr_Clear() del save_errno del fp del startup del cf return @staticmethod def RunModule(module, set_argv0): module = ctypes.cast(module, ctypes.POINTER(ctypes_wrapped.c_byte)) set_argv0 = ctypes_wrapped.c_int(int(set_argv0.value)) runpy = ctypes.POINTER(g.PyObject)() runmodule = ctypes.POINTER(g.PyObject)() runargs = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(runpy, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_ImportModule(ctypes.cast(intp._make_string('runpy'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(runpy, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Could not import runpy module\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(runmodule, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(runpy, ctypes.cast(intp._make_string('_run_module_as_main'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(runmodule, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Could not access runpy._run_module_as_main\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(runargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(si)'), ctypes.POINTER(ctypes_wrapped.c_byte)), module, set_argv0), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(runargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Could not create arguments for runpy._run_module_as_main\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(runmodule, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(runmodule, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(runmodule, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(runmodule, runargs, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Print() while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(runpy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(runmodule, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(runmodule, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(runmodule, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(runargs, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(runargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(runargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del set_argv0 del runargs del module del runpy del result del runmodule return ctypes_wrapped.c_int().value @staticmethod def RunMainFromImporter(filename): filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) argv0 = ctypes.POINTER(g.PyObject)() importer = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(argv0, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(filename), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(helpers.assignPtr(importer, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_GetImporter(argv0), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(importer.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyNullImporter_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: sys_path = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(sys_path, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('path'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyList_SetItem(sys_path, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), argv0))).value))).value)).value: helpers.postfixInc(ctypes.cast(argv0, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(importer, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(importer, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(importer, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(sys_path, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.RunModule(ctypes.cast(intp._make_string('__main__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(0L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value del sys_path while True: if ctypes_wrapped.c_int(((ctypes.cast(argv0, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(argv0, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(argv0, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(argv0, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(importer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(importer, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(importer, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(importer, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): g.PyErr_Print() return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del importer del argv0 del filename return ctypes_wrapped.c_int().value @staticmethod def Py_Main(argc, argv): first_iteration = None argc = ctypes_wrapped.c_int(int(argc.value)) argv = ctypes.cast(argv, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) c = ctypes_wrapped.c_int() sts = ctypes_wrapped.c_int() command = ctypes.POINTER(ctypes_wrapped.c_byte)() filename = ctypes.POINTER(ctypes_wrapped.c_byte)() module = ctypes.POINTER(ctypes_wrapped.c_byte)() fp = ctypes.cast(values.stdin.value, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.POINTER(ctypes_wrapped.c_byte)() unbuffered = ctypes_wrapped.c_int() skipfirstline = ctypes_wrapped.c_int() stdin_is_interactive = ctypes_wrapped.c_int() help_a = ctypes_wrapped.c_int() version = ctypes_wrapped.c_int() saw_unbuffered_flag = ctypes_wrapped.c_int() cf = g.PyCompilerFlags() helpers.assign(cf.cf_flags, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(g.orig_argc, argc.value) helpers.assignPtr(g.orig_argv, (ctypes.cast(intp._storePtr(argv), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(g._PyOS_opterr, ctypes_wrapped.c_int(int(0L)).value) while ctypes_wrapped.c_int((helpers.assign(c, ctypes_wrapped.c_int(int(g._PyOS_GetOpt(argc, argv, ctypes.cast(intp._make_string('3bBc:dEhiJm:OQ:RsStuUvVW:xX?'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value).value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes.c_byte(109).value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(99).value)).value)).value: break if True: _switchvalue = None _switchvalue = c.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(69).value)): _switchfallthrough = True helpers.postfixInc(g.Py_IgnoreEnvironmentFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(82).value)): _switchfallthrough = True helpers.postfixInc(g.Py_HashRandomizationFlag) break break del _switchfallthrough del _switchvalue if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not g.Py_HashRandomizationFlag.value))).value and (ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONHASHSEED')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_HashRandomizationFlag, ctypes_wrapped.c_int(int(1L)).value) g._PyRandom_Init() g.PySys_ResetWarnOptions() g._PyOS_ResetGetOpt() while ctypes_wrapped.c_int((helpers.assign(c, ctypes_wrapped.c_int(int(g._PyOS_GetOpt(argc, argv, ctypes.cast(intp._make_string('3bBc:dEhiJm:OQ:RsStuUvVW:xX?'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value).value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int((c.value == ctypes.c_byte(99).value)).value: helpers.assignPtr(command, (ctypes.cast(intp._storePtr(ctypes.cast(values.malloc.value(ctypes_wrapped.c_ulong(int((values.strlen.value(g._PyOS_optarg).value + ctypes_wrapped.c_int(int(2L)).value)))), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('not enough memory to copy -c argument'), ctypes.POINTER(ctypes_wrapped.c_byte))) values.strcpy.value(command, g._PyOS_optarg) values.strcat.value(command, ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) break if ctypes_wrapped.c_int((c.value == ctypes.c_byte(109).value)).value: helpers.assignPtr(module, (ctypes.cast(intp._storePtr(ctypes.cast(values.malloc.value(ctypes_wrapped.c_ulong(int((values.strlen.value(g._PyOS_optarg).value + ctypes_wrapped.c_int(int(2L)).value)))), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('not enough memory to copy -m argument'), ctypes.POINTER(ctypes_wrapped.c_byte))) values.strcpy.value(module, g._PyOS_optarg) break if True: _switchvalue = None _switchvalue = c.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(98).value)): _switchfallthrough = True helpers.postfixInc(g.Py_BytesWarningFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(100).value)): _switchfallthrough = True helpers.postfixInc(g.Py_DebugFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(51).value)): _switchfallthrough = True helpers.postfixInc(g.Py_Py3kWarningFlag) if ctypes_wrapped.c_int(int((not g.Py_DivisionWarningFlag.value))).value: helpers.assign(g.Py_DivisionWarningFlag, ctypes_wrapped.c_int(int(1L)).value) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(81).value)): _switchfallthrough = True if ctypes_wrapped.c_int((values.strcmp.value(g._PyOS_optarg, ctypes.cast(intp._make_string('old'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(g.Py_DivisionWarningFlag, ctypes_wrapped.c_int(int(0L)).value) break if ctypes_wrapped.c_int((values.strcmp.value(g._PyOS_optarg, ctypes.cast(intp._make_string('warn'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(g.Py_DivisionWarningFlag, ctypes_wrapped.c_int(int(1L)).value) break if ctypes_wrapped.c_int((values.strcmp.value(g._PyOS_optarg, ctypes.cast(intp._make_string('warnall'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(g.Py_DivisionWarningFlag, ctypes_wrapped.c_int(int(2L)).value) break if ctypes_wrapped.c_int((values.strcmp.value(g._PyOS_optarg, ctypes.cast(intp._make_string('new'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(cf.cf_flags, u'|=', ctypes_wrapped.c_int(int(8192L)).value) helpers.assign(g._Py_QnewFlag, ctypes_wrapped.c_int(int(1L)).value) break values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string("-Q option should be `-Qold', `-Qwarn', `-Qwarnall', or `-Qnew' only\n"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(g.usage(ctypes_wrapped.c_int(int(2L)), helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents))).value if (_switchfallthrough or (_switchvalue == ctypes.c_byte(105).value)): _switchfallthrough = True helpers.postfixInc(g.Py_InspectFlag) helpers.postfixInc(g.Py_InteractiveFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(79).value)): _switchfallthrough = True helpers.postfixInc(g.Py_OptimizeFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(66).value)): _switchfallthrough = True helpers.postfixInc(g.Py_DontWriteBytecodeFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(115).value)): _switchfallthrough = True helpers.postfixInc(g.Py_NoUserSiteDirectory) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(83).value)): _switchfallthrough = True helpers.postfixInc(g.Py_NoSiteFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(69).value)): _switchfallthrough = True break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(116).value)): _switchfallthrough = True helpers.postfixInc(g.Py_TabcheckFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(117).value)): _switchfallthrough = True helpers.postfixInc(unbuffered) helpers.assign(saw_unbuffered_flag, ctypes_wrapped.c_int(int(1L)).value) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(118).value)): _switchfallthrough = True helpers.postfixInc(g.Py_VerboseFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value)): _switchfallthrough = True helpers.assign(skipfirstline, ctypes_wrapped.c_int(int(1L)).value) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(85).value)): _switchfallthrough = True helpers.postfixInc(g.Py_UnicodeFlag) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(104).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(63).value)): _switchfallthrough = True helpers.postfixInc(help_a) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(86).value)): _switchfallthrough = True helpers.postfixInc(version) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(87).value)): _switchfallthrough = True g.PySys_AddWarnOption(g._PyOS_optarg) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(82).value)): _switchfallthrough = True break if (not _switchfallthrough): return ctypes_wrapped.c_int(int(g.usage(ctypes_wrapped.c_int(int(2L)), helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents))).value break del _switchfallthrough del _switchvalue if help_a.value: return ctypes_wrapped.c_int(int(g.usage(ctypes_wrapped.c_int(int(0L)), helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents))).value if version.value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Python %s\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._make_string('2.7.5')) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int(int((not g.Py_TabcheckFlag.value))).value)).value: helpers.assign(g.Py_TabcheckFlag, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not g.Py_InspectFlag.value))).value and (ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONINSPECT')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_InspectFlag, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not saw_unbuffered_flag.value))).value and (ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONUNBUFFERED')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(unbuffered, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not g.Py_NoUserSiteDirectory.value))).value and (ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONNOUSERSITE')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_NoUserSiteDirectory, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONWARNINGS')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: buf = ctypes.POINTER(ctypes_wrapped.c_byte)() warning = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(buf, (ctypes.cast(intp._storePtr(ctypes.cast(values.malloc.value(ctypes_wrapped.c_ulong(int((values.strlen.value(p).value + ctypes_wrapped.c_int(int(1L)).value)))), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(buf, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('not enough memory to copy PYTHONWARNINGS'), ctypes.POINTER(ctypes_wrapped.c_byte))) values.strcpy.value(buf, p) if True: first_iteration = True helpers.assignPtr(warning, (ctypes.cast(intp._storePtr(values.strtok.value(buf, ctypes.cast(intp._make_string(','), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(warning, (ctypes.cast(intp._storePtr(values.strtok.value(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string(','), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(warning, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break g.PySys_AddWarnOption(warning) values.free.value(buf) del warning del buf if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((g._PyOS_optind.value < argc.value)).value)).value and ctypes_wrapped.c_int((values.strcmp.value(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, ctypes.cast(intp._make_string('-'), ctypes.POINTER(ctypes_wrapped.c_byte))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(filename, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(stdin_is_interactive, ctypes_wrapped.c_int(int(g.Py_FdIsInteractive(ctypes.cast(values.stdin.value, ctypes.POINTER(ctypes_wrapped.c_int)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))))).value) if unbuffered.value: values.setbuf.value(values.stdin.value, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) values.setbuf.value(values.stdout.value, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) values.setbuf.value(values.stderr.value, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) elif g.Py_InteractiveFlag.value: pass g.Py_SetProgramName(helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents) g.Py_Initialize() if ctypes_wrapped.c_int((g.Py_VerboseFlag.value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value and stdin_is_interactive.value)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Python %s on %s\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.Py_GetVersion(), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.Py_GetPlatform(), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(int((not g.Py_NoSiteFlag.value))).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('%s\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._make_string('Type "help", "copyright", "credits" or "license" for more information.')) if ctypes_wrapped.c_int(((ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixDec(g._PyOS_optind) helpers.assignPtr(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, (ctypes.cast(intp._storePtr(intp._make_string('-c')), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixDec(g._PyOS_optind) helpers.assignPtr(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, (ctypes.cast(intp._storePtr(intp._make_string('-c')), ctypes_wrapped.c_void_p).value or 0)) g.PySys_SetArgv(ctypes_wrapped.c_int(int((argc.value - g._PyOS_optind.value))), helpers.ptrArithmetic(argv, u'+', g._PyOS_optind.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((g.Py_InspectFlag.value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value and values.isatty.value(values.fileno.value(values.stdin.value)).value)).value: v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_ImportModule(ctypes.cast(intp._make_string('readline'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del v if (ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0): helpers.assign(sts, ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyRun_SimpleStringFlags(command, ctypes.pointer(cf)))).value != ctypes_wrapped.c_int(int(0L)).value)).value) values.free.value(command) elif (ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0): helpers.assign(sts, ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.RunModule(module, ctypes_wrapped.c_int(int(1L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value) values.free.value(module) else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and stdin_is_interactive.value)).value: helpers.assign(g.Py_InspectFlag, ctypes_wrapped.c_int(int(0L)).value) g.RunStartupFile(ctypes.pointer(cf)) helpers.assign(sts, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(sts, ctypes_wrapped.c_int(int(g.RunMainFromImporter(filename))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((sts.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(fp, (ctypes.cast(intp._storePtr(values.fopen.value(filename, ctypes.cast(intp._make_string('r'), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string("%s: can't open file '%s': [Errno %d] %s\n"), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents, filename, values.errno.value, values.strerror.value(ctypes_wrapped.c_int(values.errno.value.value))) return ctypes_wrapped.c_int(int(2L)).value elif skipfirstline.value: ch = ctypes_wrapped.c_int() while ctypes_wrapped.c_int((helpers.assign(ch, values.getc.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))).value).value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int((ch.value == ctypes.c_byte(10).value)).value: (values.ungetc.value(ch, ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))), None)[1] break del ch sb = structs.stat() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((values.fstat.value(values.fileno.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))), ctypes.pointer(sb)).value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((sb.st_mode.value & ctypes_wrapped.c_int(int(0L)).value))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string("%s: '%s' is a directory, cannot continue\n"), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents, filename) values.fclose.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) return ctypes_wrapped.c_int(int(1L)).value del sb if ctypes_wrapped.c_int((sts.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.Py_MakePendingCalls())).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: g.PyErr_Print() helpers.assign(sts, ctypes_wrapped.c_int(int(1L)).value) else: helpers.assign(sts, ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyRun_AnyFileExFlags(fp, (ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)), ctypes.pointer(cf)))).value != ctypes_wrapped.c_int(int(0L)).value)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not g.Py_InspectFlag.value))).value and (ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONINSPECT')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_InspectFlag, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((g.Py_InspectFlag.value and stdin_is_interactive.value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(command, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.assign(g.Py_InspectFlag, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(sts, ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyRun_AnyFileExFlags(ctypes.cast(values.stdin.value, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(0L)), ctypes.pointer(cf)))).value != ctypes_wrapped.c_int(int(0L)).value)).value) g.Py_Finalize() return sts.value del fp del c del version del saw_unbuffered_flag del stdin_is_interactive del cf del argv del filename del p del help_a del command del module del sts del unbuffered del argc del skipfirstline return ctypes_wrapped.c_int().value @staticmethod def Py_GetArgcArgv(argc, argv): argc = ctypes.cast(argc, ctypes.POINTER(ctypes_wrapped.c_int)) argv = ctypes.cast(argv, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte)))) helpers.assign(argc.contents, g.orig_argc.value) helpers.assignPtr(argv.contents, (ctypes.cast(intp._storePtr(g.orig_argv), ctypes_wrapped.c_void_p).value or 0)) del argc del argv return PyTryBlock = structs._anonymous_PyTryBlock PyFrameObject = structs._frame PyFrame_Type = PyTypeObject() @staticmethod def PyFrame_New(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyThreadState)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyCodeObject)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyObject)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyFrame_New' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return (ctypes.cast(ctypes.POINTER(g.PyFrameObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFrame_BlockSetup(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFrameObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) raise Exception(u"Function 'PyFrame_BlockSetup' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return @staticmethod def PyFrame_BlockPop(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFrameObject)) raise Exception(u"Function 'PyFrame_BlockPop' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyTryBlock)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFrame_ExtendStack(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFrameObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyFrame_ExtendStack' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(ctypes.POINTER(g.PyObject))(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyFrame_LocalsToFast(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFrameObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyFrame_LocalsToFast' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return @staticmethod def PyFrame_FastToLocals(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFrameObject)) raise Exception(u"Function 'PyFrame_FastToLocals' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyFrame_ClearFreeList(): raise Exception(u"Function 'PyFrame_ClearFreeList' only predeclared. Body is missing. Missing C source code.") return ctypes_wrapped.c_int().value @staticmethod def PyFrame_GetLineNumber(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyFrameObject)) raise Exception(u"Function 'PyFrame_GetLineNumber' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value cmp_op = ctypes_wrapped.c_uint32 PyMemberDef = structs.PyMemberDef @staticmethod def PyMember_Get(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(structs.memberlist)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'PyMember_Get' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMember_Set(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(structs.memberlist)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMember_Set' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return ctypes_wrapped.c_int().value @staticmethod def PyMember_GetOne(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(structs.PyMemberDef)) raise Exception(u"Function 'PyMember_GetOne' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMember_SetOne(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(structs.PyMemberDef)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyMember_SetOne' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_int().value callproc = ctypes.CFUNCTYPE(ctypes_wrapped.c_void_p, ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)) @staticmethod def PyEval_GetCallStats(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_SaveThread(): tstate = ctypes.cast(intp._getPtr(g.PyThreadState_Swap(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyThreadState))), ctypes.POINTER(g.PyThreadState)), ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyEval_SaveThread: NULL tstate'), ctypes.POINTER(ctypes_wrapped.c_byte))) return (ctypes.cast(intp._storePtr(tstate), ctypes_wrapped.c_void_p).value or 0) del tstate return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_RestoreThread(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyEval_RestoreThread: NULL tstate'), ctypes.POINTER(ctypes_wrapped.c_byte))) intp._getPtr(g.PyThreadState_Swap(tstate), ctypes.POINTER(g.PyThreadState)) del tstate return class _class_struct__local__anonymous_57(ctypes.Structure): pass structs._local__anonymous_57 = _class_struct__local__anonymous_57 _class_struct__local__anonymous_57.fields = [ ('func', ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes_wrapped.c_void_p)), ('arg', ctypes_wrapped.c_void_p)] del _class_struct__local__anonymous_57 values.anonymous_value = cparser.CWrapValue(structs._local__anonymous_57) pendingcalls = (values.anonymous_value.value * 32L)() pendingfirst = ctypes_wrapped.c_int() pendinglast = ctypes_wrapped.c_int() pendingcalls_to_do = ctypes_wrapped.c_int() @staticmethod def Py_AddPendingCall(func, arg): func = ctypes.cast(func, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes_wrapped.c_void_p)) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) busy = ctypes_wrapped.c_int() i = ctypes_wrapped.c_int() j = ctypes_wrapped.c_int() if busy.value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(busy, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(i, g.pendinglast.value) helpers.assign(j, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value % ctypes_wrapped.c_int(int(32L)).value))).value) if ctypes_wrapped.c_int((j.value == g.pendingfirst.value)).value: helpers.assign(busy, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(helpers.ptrArithmetic(g.pendingcalls, '+', i.value).contents.func, (ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(g.pendingcalls, '+', i.value).contents.arg, (ctypes.cast(intp._storePtr(arg), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(g.pendinglast, j.value) helpers.assign(g._Py_Ticker, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(g.pendingcalls_to_do, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(busy, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del i del busy del j del func del arg return ctypes_wrapped.c_int().value @staticmethod def Py_MakePendingCalls(): first_iteration = None busy = ctypes_wrapped.c_int() if busy.value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(busy, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(g.pendingcalls_to_do, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True while True: if first_iteration: first_iteration = False i = ctypes_wrapped.c_int() func = ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes_wrapped.c_void_p)() arg = ctypes_wrapped.c_void_p() helpers.assign(i, g.pendingfirst.value) if ctypes_wrapped.c_int((i.value == g.pendinglast.value)).value: break helpers.assignPtr(func, (ctypes.cast(helpers.ptrArithmetic(g.pendingcalls, '+', i.value).contents.func, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.pendingcalls, '+', i.value).contents.arg), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(g.pendingfirst, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value % ctypes_wrapped.c_int(int(32L)).value))).value) if ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(func, arg).value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(busy, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(g.pendingcalls_to_do, ctypes_wrapped.c_int(int(1L)).value) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del i del func del arg helpers.assign(busy, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del busy return ctypes_wrapped.c_int().value recursion_limit = ctypes_wrapped.c_int() # TODO init recursion_limit with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1000L)).value)) _Py_CheckRecursionLimit = ctypes_wrapped.c_int() # TODO init _Py_CheckRecursionLimit with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1000L)).value)) @staticmethod def Py_GetRecursionLimit(): return g.recursion_limit.value return ctypes_wrapped.c_int().value @staticmethod def Py_SetRecursionLimit(new_limit): new_limit = ctypes_wrapped.c_int(int(new_limit.value)) helpers.assign(g.recursion_limit, new_limit.value) helpers.assign(g._Py_CheckRecursionLimit, g.recursion_limit.value) del new_limit return @staticmethod def _Py_CheckRecursiveCall(where): where = ctypes.cast(where, ctypes.POINTER(ctypes_wrapped.c_byte)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int((tstate.contents.recursion_depth.value > g.recursion_limit.value)).value: helpers.prefixDec(tstate.contents.recursion_depth) intp._getPtr(g.PyErr_Format(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('maximum recursion depth exceeded%s'), ctypes.POINTER(ctypes_wrapped.c_byte)), where), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(g._Py_CheckRecursionLimit, g.recursion_limit.value) return ctypes_wrapped.c_int(int(0L)).value del where del tstate return ctypes_wrapped.c_int().value why_code = ctypes_wrapped.c_uint32 _Py_TracingPossible = ctypes_wrapped.c_int() _Py_CheckInterval = ctypes_wrapped.c_int() # TODO init _Py_CheckInterval with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(100L)).value)) _Py_Ticker = ctypes_wrapped.c_int() @staticmethod def PyEval_EvalCode(co, globals_a, locals_a): co = ctypes.cast(co, ctypes.POINTER(g.PyCodeObject)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalCodeEx(co, globals_a, locals_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del globals_a del co del locals_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_EvalFrame(f): f = ctypes.cast(f, ctypes.POINTER(g.PyFrameObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalFrameEx(f, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del f return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_EvalFrameEx(f, throwflag): goto = None while True: if (goto is None): first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None f = ctypes.cast(f, ctypes.POINTER(g.PyFrameObject)) throwflag = ctypes_wrapped.c_int(int(throwflag.value)) stack_pointer = ctypes.POINTER(ctypes.POINTER(g.PyObject))() next_instr = ctypes.POINTER(ctypes_wrapped.c_ubyte)() opcode = ctypes_wrapped.c_int() oparg = ctypes_wrapped.c_int() why = ctypes_wrapped.c_uint() err = ctypes_wrapped.c_int() x = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() u = ctypes.POINTER(g.PyObject)() t = ctypes.POINTER(g.PyObject)() stream = ctypes.POINTER(g.PyObject)() fastlocals = ctypes.POINTER(ctypes.POINTER(g.PyObject))() freevars = ctypes.POINTER(ctypes.POINTER(g.PyObject))() retval = ctypes.POINTER(g.PyObject)() tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) co = ctypes.POINTER(g.PyCodeObject)() instr_ub = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) instr_lb = ctypes_wrapped.c_int() instr_prev = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) first_instr = ctypes.POINTER(ctypes_wrapped.c_ubyte)() names = ctypes.POINTER(g.PyObject)() consts = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assignPtr(tstate.contents.frame, (ctypes.cast(intp._storePtr(f), ctypes_wrapped.c_void_p).value or 0)) if (not tstate.contents.use_tracing.value): goto = 3 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue if (not ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_tracefunc, tstate.contents.c_traceobj, f, ctypes_wrapped.c_int(int(0L)), ctypes.pointer(g._Py_NoneStruct)))).value): goto = 5 continue goto = u'exit_eval_frame' continue if (goto == 5): goto = None if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue if (not ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, f, ctypes_wrapped.c_int(int(0L)), ctypes.pointer(g._Py_NoneStruct)))).value): goto = 7 continue goto = u'exit_eval_frame' continue if (goto == 7): goto = None if (goto == 6): goto = None if (goto == 3): goto = None if (goto is None): helpers.assignPtr(co, (ctypes.cast(intp._storePtr(f.contents.f_code), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(names, (ctypes.cast(intp._storePtr(co.contents.co_names), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(consts, (ctypes.cast(intp._storePtr(co.contents.co_consts), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(fastlocals, (ctypes.cast(intp._storePtr(f.contents.f_localsplus), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(freevars, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(f.contents.f_localsplus, u'+', co.contents.co_nlocals.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(first_instr, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(co.contents.co_code, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(first_instr, u'+', f.contents.f_lasti.value), u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(stack_pointer, (ctypes.cast(intp._storePtr(f.contents.f_stacktop), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(f.contents.f_stacktop, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(why, ctypes_wrapped.c_uint(1L).value) helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value) if (not throwflag.value): goto = 8 continue helpers.assign(why, ctypes_wrapped.c_uint(2L).value) goto = u'on_error' continue if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue first_iteration = True if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not first_iteration): goto = 12 continue first_iteration = False if (goto == 12): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)) / 8)).value)).value <= co.contents.co_stacksize.value))) if (not ctypes_wrapped.c_int((helpers.prefixDec(g._Py_Ticker).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(122L)).value)).value): goto = 14 continue goto = u'fast_next_opcode' continue if (goto == 14): goto = None if (goto is None): helpers.assign(g._Py_Ticker, g._Py_CheckInterval.value) helpers.postfixInc(tstate.contents.tick_counter) if (not g.pendingcalls_to_do.value): goto = 15 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.Py_MakePendingCalls())).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue helpers.assign(why, ctypes_wrapped.c_uint(2L).value) goto = u'on_error' continue if (goto == 16): goto = None if (goto is None): if (not g.pendingcalls_to_do.value): goto = 17 continue helpers.assign(g._Py_Ticker, ctypes_wrapped.c_int(int(0L)).value) if (goto == 17): goto = None if (goto == 15): goto = None if (goto == 13): goto = None if (goto == u'fast_next_opcode'): goto = None if (goto is None): helpers.assign(f.contents.f_lasti, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(next_instr, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(first_instr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((g._Py_TracingPossible.value and ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(int((not tstate.contents.tracing.value))).value)).value): goto = 18 continue helpers.assignPtr(f.contents.f_stacktop, (ctypes.cast(intp._storePtr(stack_pointer), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.maybe_call_line_trace(tstate.contents.c_tracefunc, tstate.contents.c_traceobj, f, ctypes.pointer(instr_lb), ctypes.pointer(instr_ub), ctypes.pointer(instr_prev)))).value) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', f.contents.f_lasti.value)), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(f.contents.f_stacktop, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue helpers.assignPtr(stack_pointer, (ctypes.cast(intp._storePtr(f.contents.f_stacktop), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(f.contents.f_stacktop, ctypes_wrapped.c_int(int(0L)).value) if (goto == 19): goto = None if (goto is None): if (not err.value): goto = 20 continue goto = u'on_error' continue if (goto == 20): goto = None if (goto == 18): goto = None if (goto is None): helpers.assign(opcode, helpers.postfixIncPtr(next_instr).contents.value) helpers.assign(oparg, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int((opcode.value >= ctypes_wrapped.c_int(int(90L)).value)).value): goto = 21 continue helpers.assign(oparg, (helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(2L)).value), ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents.value))))[1].value) if (goto == 21): goto = None if (goto == u'dispatch_opcode'): goto = None if (goto is None): if (not True): goto = 22 continue _switchvalue = None _switchvalue = opcode.value _switchfallthrough = None _switchfallthrough = False if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(9L)).value))): goto = 25 continue _switchfallthrough = True goto = u'fast_next_opcode' continue if (goto == 25): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(124L)).value))): goto = 26 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents goto = u'fast_next_opcode' continue if (goto == 27): goto = None if (goto is None): g.format_exc_check_arg(g.PyExc_UnboundLocalError, ctypes.cast(intp._make_string("local variable '%.200s' referenced before assignment"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyTuple_GetItem(co.contents.co_varnames, g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))) goto = 24 continue if (goto == 26): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(100L)).value))): goto = 28 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(consts, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents goto = u'fast_next_opcode' continue if (goto == u'PRED_125'): goto = None if (goto is None): helpers.assign(oparg, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value) helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(3L)).value) if (goto == 28): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(125L)).value))): goto = 29 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 30): goto = None if (goto is None): if (not True): goto = 31 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 43 continue continue goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 33 continue if (goto == 42): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 45 continue continue goto = 44 continue if (goto == 45): goto = None if (goto is None): goto = 31 continue if (goto == 44): goto = None if (goto is None): goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = u'fast_next_opcode' continue if (goto == 29): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value))): goto = 46 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 47): goto = None if (goto is None): if (not True): goto = 48 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue pass goto = 49 continue if (goto == 50): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 49): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 52 continue continue goto = 51 continue if (goto == 52): goto = None if (goto is None): goto = 48 continue if (goto == 51): goto = None if (goto is None): goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = u'fast_next_opcode' continue if (goto == 46): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value))): goto = 53 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 53): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value))): goto = 54 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 54): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value))): goto = 55 continue _switchfallthrough = True helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value).contents, (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 55): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value))): goto = 56 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)).contents goto = u'fast_next_opcode' continue if (goto == 56): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(99L)).value))): goto = 57 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((oparg.value == ctypes_wrapped.c_int(int(2L)).value)).value): goto = 59 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int(2L)).value) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue goto = 58 continue if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int((oparg.value == ctypes_wrapped.c_int(int(3L)).value)).value): goto = 60 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int(3L)).value) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 60): goto = None if (goto == 58): goto = None if (goto is None): g.Py_FatalError(ctypes.cast(intp._make_string('invalid argument to DUP_TOPX (bytecode corruption?)'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = 24 continue if (goto == 57): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(10L)).value))): goto = 61 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Positive(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 62): goto = None if (goto is None): if (not True): goto = 63 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 65 continue pass goto = 64 continue if (goto == 65): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 64): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 67 continue continue goto = 66 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 66): goto = None if (goto is None): goto = 62 continue if (goto == 63): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 68 continue continue if (goto == 68): goto = None if (goto is None): goto = 24 continue if (goto == 61): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(11L)).value))): goto = 69 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Negative(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 70): goto = None if (goto is None): if (not True): goto = 71 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 73 continue pass goto = 72 continue if (goto == 73): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 72): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 75 continue continue goto = 74 continue if (goto == 75): goto = None if (goto is None): goto = 71 continue if (goto == 74): goto = None if (goto is None): goto = 70 continue if (goto == 71): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 76 continue continue if (goto == 76): goto = None if (goto is None): goto = 24 continue if (goto == 69): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(12L)).value))): goto = 77 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(v))).value) if (goto == 78): goto = None if (goto is None): if (not True): goto = 79 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 81 continue pass goto = 80 continue if (goto == 81): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 80): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 83 continue continue goto = 82 continue if (goto == 83): goto = None if (goto is None): goto = 79 continue if (goto == 82): goto = None if (goto is None): goto = 78 continue if (goto == 79): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 85 continue helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) continue goto = 84 continue if (goto == 85): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 86 continue helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) continue if (goto == 86): goto = None if (goto == 84): goto = None if (goto is None): helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) goto = 24 continue if (goto == 77): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(13L)).value))): goto = 87 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 88): goto = None if (goto is None): if (not True): goto = 89 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 91 continue pass goto = 90 continue if (goto == 91): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 90): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 93 continue continue goto = 92 continue if (goto == 93): goto = None if (goto is None): goto = 89 continue if (goto == 92): goto = None if (goto is None): goto = 88 continue if (goto == 89): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 94 continue continue if (goto == 94): goto = None if (goto is None): goto = 24 continue if (goto == 87): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(15L)).value))): goto = 95 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Invert(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 96): goto = None if (goto is None): if (not True): goto = 97 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 99 continue pass goto = 98 continue if (goto == 99): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 98): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 101 continue continue goto = 100 continue if (goto == 101): goto = None if (goto is None): goto = 97 continue if (goto == 100): goto = None if (goto is None): goto = 96 continue if (goto == 97): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 102 continue continue if (goto == 102): goto = None if (goto is None): goto = 24 continue if (goto == 95): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(19L)).value))): goto = 103 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Power(v, w, ctypes.pointer(g._Py_NoneStruct)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 104): goto = None if (goto is None): if (not True): goto = 105 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 107 continue pass goto = 106 continue if (goto == 107): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 106): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 109 continue continue goto = 108 continue if (goto == 109): goto = None if (goto is None): goto = 105 continue if (goto == 108): goto = None if (goto is None): goto = 104 continue if (goto == 105): goto = None if (goto == 110): goto = None if (goto is None): if (not True): goto = 111 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 113 continue pass goto = 112 continue if (goto == 113): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 112): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 115 continue continue goto = 114 continue if (goto == 115): goto = None if (goto is None): goto = 111 continue if (goto == 114): goto = None if (goto is None): goto = 110 continue if (goto == 111): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 116 continue continue if (goto == 116): goto = None if (goto is None): goto = 24 continue if (goto == 103): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(20L)).value))): goto = 117 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Multiply(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 118): goto = None if (goto is None): if (not True): goto = 119 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 121 continue pass goto = 120 continue if (goto == 121): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 120): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 123 continue continue goto = 122 continue if (goto == 123): goto = None if (goto is None): goto = 119 continue if (goto == 122): goto = None if (goto is None): goto = 118 continue if (goto == 119): goto = None if (goto == 124): goto = None if (goto is None): if (not True): goto = 125 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 127 continue pass goto = 126 continue if (goto == 127): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 126): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 129 continue continue goto = 128 continue if (goto == 129): goto = None if (goto is None): goto = 125 continue if (goto == 128): goto = None if (goto is None): goto = 124 continue if (goto == 125): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 130 continue continue if (goto == 130): goto = None if (goto is None): goto = 24 continue if (goto == 117): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(21L)).value))): goto = 131 continue _switchfallthrough = True if (not ctypes_wrapped.c_int(int((not g._Py_QnewFlag.value))).value): goto = 132 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Divide(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 133): goto = None if (goto is None): if (not True): goto = 134 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 136 continue pass goto = 135 continue if (goto == 136): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 135): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 138 continue continue goto = 137 continue if (goto == 138): goto = None if (goto is None): goto = 134 continue if (goto == 137): goto = None if (goto is None): goto = 133 continue if (goto == 134): goto = None if (goto == 139): goto = None if (goto is None): if (not True): goto = 140 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 142 continue pass goto = 141 continue if (goto == 142): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 141): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 144 continue continue goto = 143 continue if (goto == 144): goto = None if (goto is None): goto = 140 continue if (goto == 143): goto = None if (goto is None): goto = 139 continue if (goto == 140): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 145 continue continue if (goto == 145): goto = None if (goto is None): goto = 24 continue if (goto == 132): goto = None if (goto == 131): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(27L)).value))): goto = 146 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_TrueDivide(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 147): goto = None if (goto is None): if (not True): goto = 148 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 150 continue pass goto = 149 continue if (goto == 150): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 149): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 152 continue continue goto = 151 continue if (goto == 152): goto = None if (goto is None): goto = 148 continue if (goto == 151): goto = None if (goto is None): goto = 147 continue if (goto == 148): goto = None if (goto == 153): goto = None if (goto is None): if (not True): goto = 154 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 156 continue pass goto = 155 continue if (goto == 156): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 155): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 158 continue continue goto = 157 continue if (goto == 158): goto = None if (goto is None): goto = 154 continue if (goto == 157): goto = None if (goto is None): goto = 153 continue if (goto == 154): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 159 continue continue if (goto == 159): goto = None if (goto is None): goto = 24 continue if (goto == 146): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(26L)).value))): goto = 160 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_FloorDivide(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 161): goto = None if (goto is None): if (not True): goto = 162 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 164 continue pass goto = 163 continue if (goto == 164): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 163): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 166 continue continue goto = 165 continue if (goto == 166): goto = None if (goto is None): goto = 162 continue if (goto == 165): goto = None if (goto is None): goto = 161 continue if (goto == 162): goto = None if (goto == 167): goto = None if (goto is None): if (not True): goto = 168 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 170 continue pass goto = 169 continue if (goto == 170): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 169): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 172 continue continue goto = 171 continue if (goto == 172): goto = None if (goto is None): goto = 168 continue if (goto == 171): goto = None if (goto is None): goto = 167 continue if (goto == 168): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 173 continue continue if (goto == 173): goto = None if (goto is None): goto = 24 continue if (goto == 160): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(22L)).value))): goto = 174 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 176 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_Format(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 175 continue if (goto == 176): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Remainder(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 175): goto = None if (goto == 177): goto = None if (goto is None): if (not True): goto = 178 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 180 continue pass goto = 179 continue if (goto == 180): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 179): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 182 continue continue goto = 181 continue if (goto == 182): goto = None if (goto is None): goto = 178 continue if (goto == 181): goto = None if (goto is None): goto = 177 continue if (goto == 178): goto = None if (goto == 183): goto = None if (goto is None): if (not True): goto = 184 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 186 continue pass goto = 185 continue if (goto == 186): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 185): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 188 continue continue goto = 187 continue if (goto == 188): goto = None if (goto is None): goto = 184 continue if (goto == 187): goto = None if (goto is None): goto = 183 continue if (goto == 184): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 189 continue continue if (goto == 189): goto = None if (goto is None): goto = 24 continue if (goto == 174): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(23L)).value))): goto = 190 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 192 continue a = ctypes_wrapped.c_long() b = ctypes_wrapped.c_long() i = ctypes_wrapped.c_long() helpers.assign(a, ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(b, ctypes.cast(w, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(i, ctypes_wrapped.c_long(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(a.value)).value + b.value))).value)).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ a.value))).value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ b.value))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 193 continue goto = u'slow_add' continue if (goto == 193): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del a del i del b goto = 191 continue if (goto == 192): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 195 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.string_concatenate(v, w, f, next_instr), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'skip_decref_vx' continue goto = 194 continue if (goto == 195): goto = None if (goto == u'slow_add'): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Add(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 194): goto = None if (goto == 191): goto = None if (goto == 196): goto = None if (goto is None): if (not True): goto = 197 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 199 continue pass goto = 198 continue if (goto == 199): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 198): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 201 continue continue goto = 200 continue if (goto == 201): goto = None if (goto is None): goto = 197 continue if (goto == 200): goto = None if (goto is None): goto = 196 continue if (goto == 197): goto = None if (goto == u'skip_decref_vx'): goto = None if (goto == 202): goto = None if (goto is None): if (not True): goto = 203 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 205 continue pass goto = 204 continue if (goto == 205): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 204): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 207 continue continue goto = 206 continue if (goto == 207): goto = None if (goto is None): goto = 203 continue if (goto == 206): goto = None if (goto is None): goto = 202 continue if (goto == 203): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 208 continue continue if (goto == 208): goto = None if (goto is None): goto = 24 continue if (goto == 190): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(24L)).value))): goto = 209 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 211 continue a = ctypes_wrapped.c_long() b = ctypes_wrapped.c_long() i = ctypes_wrapped.c_long() helpers.assign(a, ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(b, ctypes.cast(w, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(i, ctypes_wrapped.c_long(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(a.value)).value - b.value))).value)).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ a.value))).value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ ctypes_wrapped.c_long(int((~ b.value))).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 212 continue goto = u'slow_sub' continue if (goto == 212): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del a del i del b goto = 210 continue if (goto == 211): goto = None if (goto == u'slow_sub'): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Subtract(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 210): goto = None if (goto == 213): goto = None if (goto is None): if (not True): goto = 214 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 216 continue pass goto = 215 continue if (goto == 216): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 215): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 218 continue continue goto = 217 continue if (goto == 218): goto = None if (goto is None): goto = 214 continue if (goto == 217): goto = None if (goto is None): goto = 213 continue if (goto == 214): goto = None if (goto == 219): goto = None if (goto is None): if (not True): goto = 220 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 222 continue pass goto = 221 continue if (goto == 222): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 221): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 224 continue continue goto = 223 continue if (goto == 224): goto = None if (goto is None): goto = 220 continue if (goto == 223): goto = None if (goto is None): goto = 219 continue if (goto == 220): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 225 continue continue if (goto == 225): goto = None if (goto is None): goto = 24 continue if (goto == 209): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(25L)).value))): goto = 226 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyList_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 228 continue i = g.Py_ssize_t(int(g.Py_ssize_t(int(g.PyInt_AsSsize_t(w))).value)) if (not ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 229 continue helpers.augAssign(i, u'+=', ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (goto == 229): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((i.value < ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value): goto = 231 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) goto = 230 continue if (goto == 231): goto = None if (goto is None): goto = u'slow_get' continue if (goto == 230): goto = None if (goto is None): del i goto = 227 continue if (goto == 228): goto = None if (goto == u'slow_get'): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 227): goto = None if (goto == 232): goto = None if (goto is None): if (not True): goto = 233 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 235 continue pass goto = 234 continue if (goto == 235): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 234): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 237 continue continue goto = 236 continue if (goto == 237): goto = None if (goto is None): goto = 233 continue if (goto == 236): goto = None if (goto is None): goto = 232 continue if (goto == 233): goto = None if (goto == 238): goto = None if (goto is None): if (not True): goto = 239 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 241 continue pass goto = 240 continue if (goto == 241): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 240): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 243 continue continue goto = 242 continue if (goto == 243): goto = None if (goto is None): goto = 239 continue if (goto == 242): goto = None if (goto is None): goto = 238 continue if (goto == 239): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 244 continue continue if (goto == 244): goto = None if (goto is None): goto = 24 continue if (goto == 226): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(62L)).value))): goto = 245 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Lshift(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 246): goto = None if (goto is None): if (not True): goto = 247 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 249 continue pass goto = 248 continue if (goto == 249): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 248): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 251 continue continue goto = 250 continue if (goto == 251): goto = None if (goto is None): goto = 247 continue if (goto == 250): goto = None if (goto is None): goto = 246 continue if (goto == 247): goto = None if (goto == 252): goto = None if (goto is None): if (not True): goto = 253 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 255 continue pass goto = 254 continue if (goto == 255): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 254): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 257 continue continue goto = 256 continue if (goto == 257): goto = None if (goto is None): goto = 253 continue if (goto == 256): goto = None if (goto is None): goto = 252 continue if (goto == 253): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 258 continue continue if (goto == 258): goto = None if (goto is None): goto = 24 continue if (goto == 245): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(63L)).value))): goto = 259 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Rshift(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 260): goto = None if (goto is None): if (not True): goto = 261 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 263 continue pass goto = 262 continue if (goto == 263): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 262): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 265 continue continue goto = 264 continue if (goto == 265): goto = None if (goto is None): goto = 261 continue if (goto == 264): goto = None if (goto is None): goto = 260 continue if (goto == 261): goto = None if (goto == 266): goto = None if (goto is None): if (not True): goto = 267 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 269 continue pass goto = 268 continue if (goto == 269): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 268): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 271 continue continue goto = 270 continue if (goto == 271): goto = None if (goto is None): goto = 267 continue if (goto == 270): goto = None if (goto is None): goto = 266 continue if (goto == 267): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 272 continue continue if (goto == 272): goto = None if (goto is None): goto = 24 continue if (goto == 259): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(64L)).value))): goto = 273 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_And(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 274): goto = None if (goto is None): if (not True): goto = 275 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 277 continue pass goto = 276 continue if (goto == 277): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 276): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 279 continue continue goto = 278 continue if (goto == 279): goto = None if (goto is None): goto = 275 continue if (goto == 278): goto = None if (goto is None): goto = 274 continue if (goto == 275): goto = None if (goto == 280): goto = None if (goto is None): if (not True): goto = 281 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 283 continue pass goto = 282 continue if (goto == 283): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 282): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 285 continue continue goto = 284 continue if (goto == 285): goto = None if (goto is None): goto = 281 continue if (goto == 284): goto = None if (goto is None): goto = 280 continue if (goto == 281): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 286 continue continue if (goto == 286): goto = None if (goto is None): goto = 24 continue if (goto == 273): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(65L)).value))): goto = 287 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Xor(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 288): goto = None if (goto is None): if (not True): goto = 289 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 291 continue pass goto = 290 continue if (goto == 291): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 290): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 293 continue continue goto = 292 continue if (goto == 293): goto = None if (goto is None): goto = 289 continue if (goto == 292): goto = None if (goto is None): goto = 288 continue if (goto == 289): goto = None if (goto == 294): goto = None if (goto is None): if (not True): goto = 295 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 297 continue pass goto = 296 continue if (goto == 297): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 296): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 299 continue continue goto = 298 continue if (goto == 299): goto = None if (goto is None): goto = 295 continue if (goto == 298): goto = None if (goto is None): goto = 294 continue if (goto == 295): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 300 continue continue if (goto == 300): goto = None if (goto is None): goto = 24 continue if (goto == 287): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(66L)).value))): goto = 301 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Or(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 302): goto = None if (goto is None): if (not True): goto = 303 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 305 continue pass goto = 304 continue if (goto == 305): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 304): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 307 continue continue goto = 306 continue if (goto == 307): goto = None if (goto is None): goto = 303 continue if (goto == 306): goto = None if (goto is None): goto = 302 continue if (goto == 303): goto = None if (goto == 308): goto = None if (goto is None): if (not True): goto = 309 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 311 continue pass goto = 310 continue if (goto == 311): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 310): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 313 continue continue goto = 312 continue if (goto == 313): goto = None if (goto is None): goto = 309 continue if (goto == 312): goto = None if (goto is None): goto = 308 continue if (goto == 309): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 314 continue continue if (goto == 314): goto = None if (goto is None): goto = 24 continue if (goto == 301): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(94L)).value))): goto = 315 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- oparg.value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyList_Append(v, w))).value) if (goto == 316): goto = None if (goto is None): if (not True): goto = 317 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 319 continue pass goto = 318 continue if (goto == 319): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 318): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 321 continue continue goto = 320 continue if (goto == 321): goto = None if (goto is None): goto = 317 continue if (goto == 320): goto = None if (goto is None): goto = 316 continue if (goto == 317): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 322 continue if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(113L)).value)).value): goto = 323 continue goto = u'PRED_113' continue if (goto == 323): goto = None if (goto is None): continue if (goto == 322): goto = None if (goto is None): goto = 24 continue if (goto == 315): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(146L)).value))): goto = 324 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- oparg.value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PySet_Add(v, w))).value) if (goto == 325): goto = None if (goto is None): if (not True): goto = 326 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 328 continue pass goto = 327 continue if (goto == 328): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 327): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 330 continue continue goto = 329 continue if (goto == 330): goto = None if (goto is None): goto = 326 continue if (goto == 329): goto = None if (goto is None): goto = 325 continue if (goto == 326): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 331 continue if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(113L)).value)).value): goto = 332 continue goto = u'PRED_113' continue if (goto == 332): goto = None if (goto is None): continue if (goto == 331): goto = None if (goto is None): goto = 24 continue if (goto == 324): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(67L)).value))): goto = 333 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlacePower(v, w, ctypes.pointer(g._Py_NoneStruct)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 334): goto = None if (goto is None): if (not True): goto = 335 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 337 continue pass goto = 336 continue if (goto == 337): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 336): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 339 continue continue goto = 338 continue if (goto == 339): goto = None if (goto is None): goto = 335 continue if (goto == 338): goto = None if (goto is None): goto = 334 continue if (goto == 335): goto = None if (goto == 340): goto = None if (goto is None): if (not True): goto = 341 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 343 continue pass goto = 342 continue if (goto == 343): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 342): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 345 continue continue goto = 344 continue if (goto == 345): goto = None if (goto is None): goto = 341 continue if (goto == 344): goto = None if (goto is None): goto = 340 continue if (goto == 341): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 346 continue continue if (goto == 346): goto = None if (goto is None): goto = 24 continue if (goto == 333): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(57L)).value))): goto = 347 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceMultiply(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 348): goto = None if (goto is None): if (not True): goto = 349 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 351 continue pass goto = 350 continue if (goto == 351): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 350): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 353 continue continue goto = 352 continue if (goto == 353): goto = None if (goto is None): goto = 349 continue if (goto == 352): goto = None if (goto is None): goto = 348 continue if (goto == 349): goto = None if (goto == 354): goto = None if (goto is None): if (not True): goto = 355 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 357 continue pass goto = 356 continue if (goto == 357): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 356): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 359 continue continue goto = 358 continue if (goto == 359): goto = None if (goto is None): goto = 355 continue if (goto == 358): goto = None if (goto is None): goto = 354 continue if (goto == 355): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 360 continue continue if (goto == 360): goto = None if (goto is None): goto = 24 continue if (goto == 347): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(58L)).value))): goto = 361 continue _switchfallthrough = True if (not ctypes_wrapped.c_int(int((not g._Py_QnewFlag.value))).value): goto = 362 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceDivide(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 363): goto = None if (goto is None): if (not True): goto = 364 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 366 continue pass goto = 365 continue if (goto == 366): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 365): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 368 continue continue goto = 367 continue if (goto == 368): goto = None if (goto is None): goto = 364 continue if (goto == 367): goto = None if (goto is None): goto = 363 continue if (goto == 364): goto = None if (goto == 369): goto = None if (goto is None): if (not True): goto = 370 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 372 continue pass goto = 371 continue if (goto == 372): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 371): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 374 continue continue goto = 373 continue if (goto == 374): goto = None if (goto is None): goto = 370 continue if (goto == 373): goto = None if (goto is None): goto = 369 continue if (goto == 370): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 375 continue continue if (goto == 375): goto = None if (goto is None): goto = 24 continue if (goto == 362): goto = None if (goto == 361): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(29L)).value))): goto = 376 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceTrueDivide(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 377): goto = None if (goto is None): if (not True): goto = 378 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 380 continue pass goto = 379 continue if (goto == 380): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 379): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 382 continue continue goto = 381 continue if (goto == 382): goto = None if (goto is None): goto = 378 continue if (goto == 381): goto = None if (goto is None): goto = 377 continue if (goto == 378): goto = None if (goto == 383): goto = None if (goto is None): if (not True): goto = 384 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 386 continue pass goto = 385 continue if (goto == 386): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 385): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 388 continue continue goto = 387 continue if (goto == 388): goto = None if (goto is None): goto = 384 continue if (goto == 387): goto = None if (goto is None): goto = 383 continue if (goto == 384): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 389 continue continue if (goto == 389): goto = None if (goto is None): goto = 24 continue if (goto == 376): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(28L)).value))): goto = 390 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceFloorDivide(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 391): goto = None if (goto is None): if (not True): goto = 392 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 394 continue pass goto = 393 continue if (goto == 394): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 393): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 396 continue continue goto = 395 continue if (goto == 396): goto = None if (goto is None): goto = 392 continue if (goto == 395): goto = None if (goto is None): goto = 391 continue if (goto == 392): goto = None if (goto == 397): goto = None if (goto is None): if (not True): goto = 398 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 400 continue pass goto = 399 continue if (goto == 400): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 399): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 402 continue continue goto = 401 continue if (goto == 402): goto = None if (goto is None): goto = 398 continue if (goto == 401): goto = None if (goto is None): goto = 397 continue if (goto == 398): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 403 continue continue if (goto == 403): goto = None if (goto is None): goto = 24 continue if (goto == 390): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(59L)).value))): goto = 404 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceRemainder(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 405): goto = None if (goto is None): if (not True): goto = 406 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 408 continue pass goto = 407 continue if (goto == 408): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 407): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 410 continue continue goto = 409 continue if (goto == 410): goto = None if (goto is None): goto = 406 continue if (goto == 409): goto = None if (goto is None): goto = 405 continue if (goto == 406): goto = None if (goto == 411): goto = None if (goto is None): if (not True): goto = 412 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 414 continue pass goto = 413 continue if (goto == 414): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 413): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 416 continue continue goto = 415 continue if (goto == 416): goto = None if (goto is None): goto = 412 continue if (goto == 415): goto = None if (goto is None): goto = 411 continue if (goto == 412): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 417 continue continue if (goto == 417): goto = None if (goto is None): goto = 24 continue if (goto == 404): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(55L)).value))): goto = 418 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 420 continue a = ctypes_wrapped.c_long() b = ctypes_wrapped.c_long() i = ctypes_wrapped.c_long() helpers.assign(a, ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(b, ctypes.cast(w, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(i, ctypes_wrapped.c_long(int((a.value + b.value))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ a.value))).value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ b.value))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 421 continue goto = u'slow_iadd' continue if (goto == 421): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del a del i del b goto = 419 continue if (goto == 420): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 423 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.string_concatenate(v, w, f, next_instr), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'skip_decref_v' continue goto = 422 continue if (goto == 423): goto = None if (goto == u'slow_iadd'): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceAdd(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 422): goto = None if (goto == 419): goto = None if (goto == 424): goto = None if (goto is None): if (not True): goto = 425 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 427 continue pass goto = 426 continue if (goto == 427): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 426): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 429 continue continue goto = 428 continue if (goto == 429): goto = None if (goto is None): goto = 425 continue if (goto == 428): goto = None if (goto is None): goto = 424 continue if (goto == 425): goto = None if (goto == u'skip_decref_v'): goto = None if (goto == 430): goto = None if (goto is None): if (not True): goto = 431 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 433 continue pass goto = 432 continue if (goto == 433): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 432): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 435 continue continue goto = 434 continue if (goto == 435): goto = None if (goto is None): goto = 431 continue if (goto == 434): goto = None if (goto is None): goto = 430 continue if (goto == 431): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 436 continue continue if (goto == 436): goto = None if (goto is None): goto = 24 continue if (goto == 418): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(56L)).value))): goto = 437 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 439 continue a = ctypes_wrapped.c_long() b = ctypes_wrapped.c_long() i = ctypes_wrapped.c_long() helpers.assign(a, ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(b, ctypes.cast(w, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(i, ctypes_wrapped.c_long(int((a.value - b.value))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ a.value))).value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((i.value ^ ctypes_wrapped.c_long(int((~ b.value))).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 440 continue goto = u'slow_isub' continue if (goto == 440): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del a del i del b goto = 438 continue if (goto == 439): goto = None if (goto == u'slow_isub'): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceSubtract(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 438): goto = None if (goto == 441): goto = None if (goto is None): if (not True): goto = 442 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 444 continue pass goto = 443 continue if (goto == 444): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 443): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 446 continue continue goto = 445 continue if (goto == 446): goto = None if (goto is None): goto = 442 continue if (goto == 445): goto = None if (goto is None): goto = 441 continue if (goto == 442): goto = None if (goto == 447): goto = None if (goto is None): if (not True): goto = 448 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 450 continue pass goto = 449 continue if (goto == 450): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 449): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 452 continue continue goto = 451 continue if (goto == 452): goto = None if (goto is None): goto = 448 continue if (goto == 451): goto = None if (goto is None): goto = 447 continue if (goto == 448): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 453 continue continue if (goto == 453): goto = None if (goto is None): goto = 24 continue if (goto == 437): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(75L)).value))): goto = 454 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceLshift(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 455): goto = None if (goto is None): if (not True): goto = 456 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 458 continue pass goto = 457 continue if (goto == 458): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 457): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 460 continue continue goto = 459 continue if (goto == 460): goto = None if (goto is None): goto = 456 continue if (goto == 459): goto = None if (goto is None): goto = 455 continue if (goto == 456): goto = None if (goto == 461): goto = None if (goto is None): if (not True): goto = 462 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 464 continue pass goto = 463 continue if (goto == 464): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 463): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 466 continue continue goto = 465 continue if (goto == 466): goto = None if (goto is None): goto = 462 continue if (goto == 465): goto = None if (goto is None): goto = 461 continue if (goto == 462): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 467 continue continue if (goto == 467): goto = None if (goto is None): goto = 24 continue if (goto == 454): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(76L)).value))): goto = 468 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceRshift(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 469): goto = None if (goto is None): if (not True): goto = 470 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 472 continue pass goto = 471 continue if (goto == 472): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 471): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 474 continue continue goto = 473 continue if (goto == 474): goto = None if (goto is None): goto = 470 continue if (goto == 473): goto = None if (goto is None): goto = 469 continue if (goto == 470): goto = None if (goto == 475): goto = None if (goto is None): if (not True): goto = 476 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 478 continue pass goto = 477 continue if (goto == 478): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 477): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 480 continue continue goto = 479 continue if (goto == 480): goto = None if (goto is None): goto = 476 continue if (goto == 479): goto = None if (goto is None): goto = 475 continue if (goto == 476): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 481 continue continue if (goto == 481): goto = None if (goto is None): goto = 24 continue if (goto == 468): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(77L)).value))): goto = 482 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceAnd(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 483): goto = None if (goto is None): if (not True): goto = 484 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 486 continue pass goto = 485 continue if (goto == 486): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 485): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 488 continue continue goto = 487 continue if (goto == 488): goto = None if (goto is None): goto = 484 continue if (goto == 487): goto = None if (goto is None): goto = 483 continue if (goto == 484): goto = None if (goto == 489): goto = None if (goto is None): if (not True): goto = 490 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 492 continue pass goto = 491 continue if (goto == 492): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 491): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 494 continue continue goto = 493 continue if (goto == 494): goto = None if (goto is None): goto = 490 continue if (goto == 493): goto = None if (goto is None): goto = 489 continue if (goto == 490): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 495 continue continue if (goto == 495): goto = None if (goto is None): goto = 24 continue if (goto == 482): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(78L)).value))): goto = 496 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceXor(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 497): goto = None if (goto is None): if (not True): goto = 498 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 500 continue pass goto = 499 continue if (goto == 500): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 499): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 502 continue continue goto = 501 continue if (goto == 502): goto = None if (goto is None): goto = 498 continue if (goto == 501): goto = None if (goto is None): goto = 497 continue if (goto == 498): goto = None if (goto == 503): goto = None if (goto is None): if (not True): goto = 504 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 506 continue pass goto = 505 continue if (goto == 506): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 505): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 508 continue continue goto = 507 continue if (goto == 508): goto = None if (goto is None): goto = 504 continue if (goto == 507): goto = None if (goto is None): goto = 503 continue if (goto == 504): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 509 continue continue if (goto == 509): goto = None if (goto is None): goto = 24 continue if (goto == 496): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(79L)).value))): goto = 510 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_InPlaceOr(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 511): goto = None if (goto is None): if (not True): goto = 512 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 514 continue pass goto = 513 continue if (goto == 514): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 513): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 516 continue continue goto = 515 continue if (goto == 516): goto = None if (goto is None): goto = 512 continue if (goto == 515): goto = None if (goto is None): goto = 511 continue if (goto == 512): goto = None if (goto == 517): goto = None if (goto is None): if (not True): goto = 518 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 520 continue pass goto = 519 continue if (goto == 520): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 519): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 522 continue continue goto = 521 continue if (goto == 522): goto = None if (goto is None): goto = 518 continue if (goto == 521): goto = None if (goto is None): goto = 517 continue if (goto == 518): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 523 continue continue if (goto == 523): goto = None if (goto is None): goto = 24 continue if (goto == 510): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(30L)).value + ctypes_wrapped.c_int(int(0L)).value))).value))): goto = 524 continue _switchfallthrough = True if (goto == 524): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(30L)).value + ctypes_wrapped.c_int(int(1L)).value))).value))): goto = 525 continue _switchfallthrough = True if (goto == 525): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(30L)).value + ctypes_wrapped.c_int(int(2L)).value))).value))): goto = 526 continue _switchfallthrough = True if (goto == 526): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(30L)).value + ctypes_wrapped.c_int(int(3L)).value))).value))): goto = 527 continue _switchfallthrough = True if (not ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(30L)).value))).value & ctypes_wrapped.c_int(int(2L)).value))).value): goto = 529 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 528 continue if (goto == 529): goto = None if (goto is None): helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value) if (goto == 528): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(30L)).value))).value & ctypes_wrapped.c_int(int(1L)).value))).value): goto = 531 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 530 continue if (goto == 531): goto = None if (goto is None): helpers.assignPtr(v, ctypes_wrapped.c_int(int(0L)).value) if (goto == 530): goto = None if (goto is None): helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.apply_slice(u, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 532): goto = None if (goto is None): if (not True): goto = 533 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 535 continue pass goto = 534 continue if (goto == 535): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 534): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 537 continue continue goto = 536 continue if (goto == 537): goto = None if (goto is None): goto = 533 continue if (goto == 536): goto = None if (goto is None): goto = 532 continue if (goto == 533): goto = None if (goto == 538): goto = None if (goto is None): if (not True): goto = 539 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 541 continue pass goto = 540 continue if (goto == 541): goto = None if (goto == 542): goto = None if (goto is None): if (not True): goto = 543 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 545 continue pass goto = 544 continue if (goto == 545): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 544): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 547 continue continue goto = 546 continue if (goto == 547): goto = None if (goto is None): goto = 543 continue if (goto == 546): goto = None if (goto is None): goto = 542 continue if (goto == 543): goto = None if (goto == 540): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 549 continue continue goto = 548 continue if (goto == 549): goto = None if (goto is None): goto = 539 continue if (goto == 548): goto = None if (goto is None): goto = 538 continue if (goto == 539): goto = None if (goto == 550): goto = None if (goto is None): if (not True): goto = 551 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 553 continue pass goto = 552 continue if (goto == 553): goto = None if (goto == 554): goto = None if (goto is None): if (not True): goto = 555 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 557 continue pass goto = 556 continue if (goto == 557): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 556): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 559 continue continue goto = 558 continue if (goto == 559): goto = None if (goto is None): goto = 555 continue if (goto == 558): goto = None if (goto is None): goto = 554 continue if (goto == 555): goto = None if (goto == 552): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 561 continue continue goto = 560 continue if (goto == 561): goto = None if (goto is None): goto = 551 continue if (goto == 560): goto = None if (goto is None): goto = 550 continue if (goto == 551): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 562 continue continue if (goto == 562): goto = None if (goto is None): goto = 24 continue if (goto == 527): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(40L)).value + ctypes_wrapped.c_int(int(0L)).value))).value))): goto = 563 continue _switchfallthrough = True if (goto == 563): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(40L)).value + ctypes_wrapped.c_int(int(1L)).value))).value))): goto = 564 continue _switchfallthrough = True if (goto == 564): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(40L)).value + ctypes_wrapped.c_int(int(2L)).value))).value))): goto = 565 continue _switchfallthrough = True if (goto == 565): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(40L)).value + ctypes_wrapped.c_int(int(3L)).value))).value))): goto = 566 continue _switchfallthrough = True if (not ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(40L)).value))).value & ctypes_wrapped.c_int(int(2L)).value))).value): goto = 568 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 567 continue if (goto == 568): goto = None if (goto is None): helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value) if (goto == 567): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(40L)).value))).value & ctypes_wrapped.c_int(int(1L)).value))).value): goto = 570 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 569 continue if (goto == 570): goto = None if (goto is None): helpers.assignPtr(v, ctypes_wrapped.c_int(int(0L)).value) if (goto == 569): goto = None if (goto is None): helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(t, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.assign_slice(u, v, w, t))).value) if (goto == 571): goto = None if (goto is None): if (not True): goto = 572 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(t, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 574 continue pass goto = 573 continue if (goto == 574): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(t, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(t, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 573): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 576 continue continue goto = 575 continue if (goto == 576): goto = None if (goto is None): goto = 572 continue if (goto == 575): goto = None if (goto is None): goto = 571 continue if (goto == 572): goto = None if (goto == 577): goto = None if (goto is None): if (not True): goto = 578 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 580 continue pass goto = 579 continue if (goto == 580): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 579): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 582 continue continue goto = 581 continue if (goto == 582): goto = None if (goto is None): goto = 578 continue if (goto == 581): goto = None if (goto is None): goto = 577 continue if (goto == 578): goto = None if (goto == 583): goto = None if (goto is None): if (not True): goto = 584 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 586 continue pass goto = 585 continue if (goto == 586): goto = None if (goto == 587): goto = None if (goto is None): if (not True): goto = 588 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 590 continue pass goto = 589 continue if (goto == 590): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 589): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 592 continue continue goto = 591 continue if (goto == 592): goto = None if (goto is None): goto = 588 continue if (goto == 591): goto = None if (goto is None): goto = 587 continue if (goto == 588): goto = None if (goto == 585): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 594 continue continue goto = 593 continue if (goto == 594): goto = None if (goto is None): goto = 584 continue if (goto == 593): goto = None if (goto is None): goto = 583 continue if (goto == 584): goto = None if (goto == 595): goto = None if (goto is None): if (not True): goto = 596 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 598 continue pass goto = 597 continue if (goto == 598): goto = None if (goto == 599): goto = None if (goto is None): if (not True): goto = 600 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 602 continue pass goto = 601 continue if (goto == 602): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 601): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 604 continue continue goto = 603 continue if (goto == 604): goto = None if (goto is None): goto = 600 continue if (goto == 603): goto = None if (goto is None): goto = 599 continue if (goto == 600): goto = None if (goto == 597): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 606 continue continue goto = 605 continue if (goto == 606): goto = None if (goto is None): goto = 596 continue if (goto == 605): goto = None if (goto is None): goto = 595 continue if (goto == 596): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 607 continue continue if (goto == 607): goto = None if (goto is None): goto = 24 continue if (goto == 566): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(50L)).value + ctypes_wrapped.c_int(int(0L)).value))).value))): goto = 608 continue _switchfallthrough = True if (goto == 608): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(50L)).value + ctypes_wrapped.c_int(int(1L)).value))).value))): goto = 609 continue _switchfallthrough = True if (goto == 609): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(50L)).value + ctypes_wrapped.c_int(int(2L)).value))).value))): goto = 610 continue _switchfallthrough = True if (goto == 610): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(50L)).value + ctypes_wrapped.c_int(int(3L)).value))).value))): goto = 611 continue _switchfallthrough = True if (not ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(50L)).value))).value & ctypes_wrapped.c_int(int(2L)).value))).value): goto = 613 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 612 continue if (goto == 613): goto = None if (goto is None): helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value) if (goto == 612): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(50L)).value))).value & ctypes_wrapped.c_int(int(1L)).value))).value): goto = 615 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 614 continue if (goto == 615): goto = None if (goto is None): helpers.assignPtr(v, ctypes_wrapped.c_int(int(0L)).value) if (goto == 614): goto = None if (goto is None): helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.assign_slice(u, v, w, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value) if (goto == 616): goto = None if (goto is None): if (not True): goto = 617 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 619 continue pass goto = 618 continue if (goto == 619): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 618): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 621 continue continue goto = 620 continue if (goto == 621): goto = None if (goto is None): goto = 617 continue if (goto == 620): goto = None if (goto is None): goto = 616 continue if (goto == 617): goto = None if (goto == 622): goto = None if (goto is None): if (not True): goto = 623 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 625 continue pass goto = 624 continue if (goto == 625): goto = None if (goto == 626): goto = None if (goto is None): if (not True): goto = 627 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 629 continue pass goto = 628 continue if (goto == 629): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 628): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 631 continue continue goto = 630 continue if (goto == 631): goto = None if (goto is None): goto = 627 continue if (goto == 630): goto = None if (goto is None): goto = 626 continue if (goto == 627): goto = None if (goto == 624): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 633 continue continue goto = 632 continue if (goto == 633): goto = None if (goto is None): goto = 623 continue if (goto == 632): goto = None if (goto is None): goto = 622 continue if (goto == 623): goto = None if (goto == 634): goto = None if (goto is None): if (not True): goto = 635 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 637 continue pass goto = 636 continue if (goto == 637): goto = None if (goto == 638): goto = None if (goto is None): if (not True): goto = 639 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 641 continue pass goto = 640 continue if (goto == 641): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 640): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 643 continue continue goto = 642 continue if (goto == 643): goto = None if (goto is None): goto = 639 continue if (goto == 642): goto = None if (goto is None): goto = 638 continue if (goto == 639): goto = None if (goto == 636): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 645 continue continue goto = 644 continue if (goto == 645): goto = None if (goto is None): goto = 635 continue if (goto == 644): goto = None if (goto is None): goto = 634 continue if (goto == 635): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 646 continue continue if (goto == 646): goto = None if (goto is None): goto = 24 continue if (goto == 611): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(60L)).value))): goto = 647 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_SetItem(v, w, u))).value) if (goto == 648): goto = None if (goto is None): if (not True): goto = 649 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 651 continue pass goto = 650 continue if (goto == 651): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 650): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 653 continue continue goto = 652 continue if (goto == 653): goto = None if (goto is None): goto = 649 continue if (goto == 652): goto = None if (goto is None): goto = 648 continue if (goto == 649): goto = None if (goto == 654): goto = None if (goto is None): if (not True): goto = 655 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 657 continue pass goto = 656 continue if (goto == 657): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 656): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 659 continue continue goto = 658 continue if (goto == 659): goto = None if (goto is None): goto = 655 continue if (goto == 658): goto = None if (goto is None): goto = 654 continue if (goto == 655): goto = None if (goto == 660): goto = None if (goto is None): if (not True): goto = 661 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 663 continue pass goto = 662 continue if (goto == 663): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 662): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 665 continue continue goto = 664 continue if (goto == 665): goto = None if (goto is None): goto = 661 continue if (goto == 664): goto = None if (goto is None): goto = 660 continue if (goto == 661): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 666 continue continue if (goto == 666): goto = None if (goto is None): goto = 24 continue if (goto == 647): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(61L)).value))): goto = 667 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_DelItem(v, w))).value) if (goto == 668): goto = None if (goto is None): if (not True): goto = 669 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 671 continue pass goto = 670 continue if (goto == 671): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 670): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 673 continue continue goto = 672 continue if (goto == 673): goto = None if (goto is None): goto = 669 continue if (goto == 672): goto = None if (goto is None): goto = 668 continue if (goto == 669): goto = None if (goto == 674): goto = None if (goto is None): if (not True): goto = 675 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 677 continue pass goto = 676 continue if (goto == 677): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 676): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 679 continue continue goto = 678 continue if (goto == 679): goto = None if (goto is None): goto = 675 continue if (goto == 678): goto = None if (goto is None): goto = 674 continue if (goto == 675): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 680 continue continue if (goto == 680): goto = None if (goto is None): goto = 24 continue if (goto == 667): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(70L)).value))): goto = 681 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('displayhook'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 682 continue g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('lost sys.displayhook'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) if (goto == 682): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 683 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 684 continue helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 684): goto = None if (goto == 683): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 685 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(w, x, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 686): goto = None if (goto is None): if (not True): goto = 687 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 689 continue pass goto = 688 continue if (goto == 689): goto = None if (goto == 690): goto = None if (goto is None): if (not True): goto = 691 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 693 continue pass goto = 692 continue if (goto == 693): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 692): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 695 continue continue goto = 694 continue if (goto == 695): goto = None if (goto is None): goto = 691 continue if (goto == 694): goto = None if (goto is None): goto = 690 continue if (goto == 691): goto = None if (goto == 688): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 697 continue continue goto = 696 continue if (goto == 697): goto = None if (goto is None): goto = 687 continue if (goto == 696): goto = None if (goto is None): goto = 686 continue if (goto == 687): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 698 continue helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 698): goto = None if (goto == 685): goto = None if (goto == 699): goto = None if (goto is None): if (not True): goto = 700 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 702 continue pass goto = 701 continue if (goto == 702): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 701): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 704 continue continue goto = 703 continue if (goto == 704): goto = None if (goto is None): goto = 700 continue if (goto == 703): goto = None if (goto is None): goto = 699 continue if (goto == 700): goto = None if (goto == 705): goto = None if (goto is None): if (not True): goto = 706 continue if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 708 continue pass goto = 707 continue if (goto == 708): goto = None if (goto == 709): goto = None if (goto is None): if (not True): goto = 710 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 712 continue pass goto = 711 continue if (goto == 712): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 711): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 714 continue continue goto = 713 continue if (goto == 714): goto = None if (goto is None): goto = 710 continue if (goto == 713): goto = None if (goto is None): goto = 709 continue if (goto == 710): goto = None if (goto == 707): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 716 continue continue goto = 715 continue if (goto == 716): goto = None if (goto is None): goto = 706 continue if (goto == 715): goto = None if (goto is None): goto = 705 continue if (goto == 706): goto = None if (goto is None): goto = 24 continue if (goto == 681): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(73L)).value))): goto = 717 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.assignPtr(stream, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 717): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(71L)).value))): goto = 718 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(stream, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(stream, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 719 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 720 continue g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('lost sys.stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 720): goto = None if (goto == 719): goto = None if (goto == 721): goto = None if (goto is None): if (not True): goto = 722 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 724 continue pass goto = 723 continue if (goto == 724): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 723): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 726 continue continue goto = 725 continue if (goto == 726): goto = None if (goto is None): goto = 722 continue if (goto == 725): goto = None if (goto is None): goto = 721 continue if (goto == 722): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyFile_SoftSpace(w, ctypes_wrapped.c_int(int(0L))))).value)).value): goto = 727 continue helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(' '), ctypes.POINTER(ctypes_wrapped.c_byte)), w))).value) if (goto == 727): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 728 continue helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteObject(v, w, ctypes_wrapped.c_int(int(1L))))).value) if (goto == 728): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 729 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 731 continue s = ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((len_a.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not values.isspace.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_ulong(int((len_a.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_ulong(int((len_a.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value == ctypes.c_byte(32).value)).value)).value): goto = 732 continue ctypes_wrapped.c_int(int(g.PyFile_SoftSpace(w, ctypes_wrapped.c_int(int(1L))))) if (goto == 732): goto = None if (goto is None): del s del len_a goto = 730 continue if (goto == 731): goto = None if (goto is None): ctypes_wrapped.c_int(int(g.PyFile_SoftSpace(w, ctypes_wrapped.c_int(int(1L))))) if (goto == 730): goto = None if (goto == 729): goto = None if (goto == 733): goto = None if (goto is None): if (not True): goto = 734 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 736 continue pass goto = 735 continue if (goto == 736): goto = None if (goto == 737): goto = None if (goto is None): if (not True): goto = 738 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 740 continue pass goto = 739 continue if (goto == 740): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 739): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 742 continue continue goto = 741 continue if (goto == 742): goto = None if (goto is None): goto = 738 continue if (goto == 741): goto = None if (goto is None): goto = 737 continue if (goto == 738): goto = None if (goto == 735): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 744 continue continue goto = 743 continue if (goto == 744): goto = None if (goto is None): goto = 734 continue if (goto == 743): goto = None if (goto is None): goto = 733 continue if (goto == 734): goto = None if (goto == 745): goto = None if (goto is None): if (not True): goto = 746 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 748 continue pass goto = 747 continue if (goto == 748): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 747): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 750 continue continue goto = 749 continue if (goto == 750): goto = None if (goto is None): goto = 746 continue if (goto == 749): goto = None if (goto is None): goto = 745 continue if (goto == 746): goto = None if (goto == 751): goto = None if (goto is None): if (not True): goto = 752 continue if (not ctypes_wrapped.c_int(((ctypes.cast(stream, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 754 continue pass goto = 753 continue if (goto == 754): goto = None if (goto == 755): goto = None if (goto is None): if (not True): goto = 756 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(stream, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 758 continue pass goto = 757 continue if (goto == 758): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(stream, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(stream, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 757): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 760 continue continue goto = 759 continue if (goto == 760): goto = None if (goto is None): goto = 756 continue if (goto == 759): goto = None if (goto is None): goto = 755 continue if (goto == 756): goto = None if (goto == 753): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 762 continue continue goto = 761 continue if (goto == 762): goto = None if (goto is None): goto = 752 continue if (goto == 761): goto = None if (goto is None): goto = 751 continue if (goto == 752): goto = None if (goto is None): helpers.assignPtr(stream, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 763 continue continue if (goto == 763): goto = None if (goto is None): goto = 24 continue if (goto == 718): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(74L)).value))): goto = 764 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.assignPtr(stream, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 764): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(72L)).value))): goto = 765 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(stream, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(stream, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 766 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 767 continue g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('lost sys.stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 767): goto = None if (goto == 766): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 768 continue helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), w))).value) if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 769 continue ctypes_wrapped.c_int(int(g.PyFile_SoftSpace(w, ctypes_wrapped.c_int(int(0L))))) if (goto == 769): goto = None if (goto == 770): goto = None if (goto is None): if (not True): goto = 771 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 773 continue pass goto = 772 continue if (goto == 773): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 772): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 775 continue continue goto = 774 continue if (goto == 775): goto = None if (goto is None): goto = 771 continue if (goto == 774): goto = None if (goto is None): goto = 770 continue if (goto == 771): goto = None if (goto == 768): goto = None if (goto == 776): goto = None if (goto is None): if (not True): goto = 777 continue if (not ctypes_wrapped.c_int(((ctypes.cast(stream, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 779 continue pass goto = 778 continue if (goto == 779): goto = None if (goto == 780): goto = None if (goto is None): if (not True): goto = 781 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(stream, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 783 continue pass goto = 782 continue if (goto == 783): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(stream, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(stream, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 782): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 785 continue continue goto = 784 continue if (goto == 785): goto = None if (goto is None): goto = 781 continue if (goto == 784): goto = None if (goto is None): goto = 780 continue if (goto == 781): goto = None if (goto == 778): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 787 continue continue goto = 786 continue if (goto == 787): goto = None if (goto is None): goto = 777 continue if (goto == 786): goto = None if (goto is None): goto = 776 continue if (goto == 777): goto = None if (goto is None): helpers.assignPtr(stream, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 765): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(130L)).value))): goto = 788 continue _switchfallthrough = True helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 789 continue _switchvalue_a = None _switchvalue_a = oparg.value _switchfallthrough_a = None _switchfallthrough_a = False if (goto == 790): goto = None if (goto is None): if (not True): goto = 791 continue if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_int(int(3L)).value))): goto = 792 continue _switchfallthrough_a = True helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 792): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_int(int(2L)).value))): goto = 793 continue _switchfallthrough_a = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 793): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_int(int(1L)).value))): goto = 794 continue _switchfallthrough_a = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 794): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_int(int(0L)).value))): goto = 795 continue _switchfallthrough_a = True helpers.assign(why, ctypes_wrapped.c_uint(g.do_raise(w, v, u)).value) goto = 791 continue if (goto == 795): goto = None if (goto is None): if (not (not _switchfallthrough_a)): goto = 796 continue g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('bad RAISE_VARARGS oparg'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) goto = 791 continue if (goto == 796): goto = None if (goto is None): goto = 791 continue goto = 790 continue if (goto == 791): goto = None if (goto is None): del _switchfallthrough_a del _switchvalue_a if (goto == 789): goto = None if (goto is None): goto = 24 continue if (goto == 788): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(82L)).value))): goto = 797 continue _switchfallthrough = True if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(x, (ctypes.cast(intp._storePtr(f.contents.f_locals), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 798 continue helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 798): goto = None if (goto is None): g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('no locals'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = 24 continue if (goto == 797): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(83L)).value))): goto = 799 continue _switchfallthrough = True helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(why, ctypes_wrapped.c_uint(8L).value) goto = u'fast_block_end' continue if (goto == 799): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(86L)).value))): goto = 800 continue _switchfallthrough = True helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(f.contents.f_stacktop, (ctypes.cast(intp._storePtr(stack_pointer), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(why, ctypes_wrapped.c_uint(64L).value) goto = u'fast_yield' continue if (goto == 800): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(85L)).value))): goto = 801 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assign(err, ctypes_wrapped.c_int(int(g.exec_statement(f, u, v, w))).value) if (goto == 802): goto = None if (goto is None): if (not True): goto = 803 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 805 continue pass goto = 804 continue if (goto == 805): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 804): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 807 continue continue goto = 806 continue if (goto == 807): goto = None if (goto is None): goto = 803 continue if (goto == 806): goto = None if (goto is None): goto = 802 continue if (goto == 803): goto = None if (goto == 808): goto = None if (goto is None): if (not True): goto = 809 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 811 continue pass goto = 810 continue if (goto == 811): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 810): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 813 continue continue goto = 812 continue if (goto == 813): goto = None if (goto is None): goto = 809 continue if (goto == 812): goto = None if (goto is None): goto = 808 continue if (goto == 809): goto = None if (goto == 814): goto = None if (goto is None): if (not True): goto = 815 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 817 continue pass goto = 816 continue if (goto == 817): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 816): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 819 continue continue goto = 818 continue if (goto == 819): goto = None if (goto is None): goto = 815 continue if (goto == 818): goto = None if (goto is None): goto = 814 continue if (goto == 815): goto = None if (goto is None): goto = 24 continue if (goto == 801): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(87L)).value))): goto = 820 continue _switchfallthrough = True b = ctypes.cast(intp._getPtr(g.PyFrame_BlockPop(f), ctypes.POINTER(g.PyTryBlock)), ctypes.POINTER(g.PyTryBlock)) if (goto == 821): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)) / 8)).value)).value > b.contents.b_level.value)).value): goto = 822 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 823): goto = None if (goto is None): if (not True): goto = 824 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 826 continue pass goto = 825 continue if (goto == 826): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 825): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 828 continue continue goto = 827 continue if (goto == 828): goto = None if (goto is None): goto = 824 continue if (goto == 827): goto = None if (goto is None): goto = 823 continue if (goto == 824): goto = None if (goto is None): goto = 821 continue if (goto == 822): goto = None if (goto is None): del b continue if (goto == u'PRED_88'): goto = None if (goto is None): helpers.postfixIncPtr(next_instr) if (goto == 820): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(88L)).value))): goto = 829 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 831 continue helpers.assign(why, ctypes_wrapped.c_uint(ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value).value) values.assert_a.value(ctypes_wrapped.c_int((why.value != ctypes_wrapped.c_uint(64L).value))) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(8L).value)).value or ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(32L).value)).value)).value): goto = 832 continue helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 832): goto = None if (goto is None): goto = 830 continue if (goto == 831): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyTypeObject)).contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 834 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyErr_Restore(v, w, u) helpers.assign(why, ctypes_wrapped.c_uint(4L).value) goto = 24 continue goto = 833 continue if (goto == 834): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 835 continue g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string("'finally' pops bad exception"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 835): goto = None if (goto == 833): goto = None if (goto == 830): goto = None if (goto == 836): goto = None if (goto is None): if (not True): goto = 837 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 839 continue pass goto = 838 continue if (goto == 839): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 838): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 841 continue continue goto = 840 continue if (goto == 841): goto = None if (goto is None): goto = 837 continue if (goto == 840): goto = None if (goto is None): goto = 836 continue if (goto == 837): goto = None if (goto is None): goto = 24 continue if (goto == 829): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(89L)).value))): goto = 842 continue _switchfallthrough = True helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.build_class(u, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (goto == 843): goto = None if (goto is None): if (not True): goto = 844 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 846 continue pass goto = 845 continue if (goto == 846): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 845): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 848 continue continue goto = 847 continue if (goto == 848): goto = None if (goto is None): goto = 844 continue if (goto == 847): goto = None if (goto is None): goto = 843 continue if (goto == 844): goto = None if (goto == 849): goto = None if (goto is None): if (not True): goto = 850 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 852 continue pass goto = 851 continue if (goto == 852): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 851): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 854 continue continue goto = 853 continue if (goto == 854): goto = None if (goto is None): goto = 850 continue if (goto == 853): goto = None if (goto is None): goto = 849 continue if (goto == 850): goto = None if (goto == 855): goto = None if (goto is None): if (not True): goto = 856 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 858 continue pass goto = 857 continue if (goto == 858): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 857): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 860 continue continue goto = 859 continue if (goto == 860): goto = None if (goto is None): goto = 856 continue if (goto == 859): goto = None if (goto is None): goto = 855 continue if (goto == 856): goto = None if (goto is None): goto = 24 continue if (goto == 842): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(90L)).value))): goto = 861 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(x, (ctypes.cast(intp._storePtr(f.contents.f_locals), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 862 continue if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 864 continue helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(x, w, v))).value) goto = 863 continue if (goto == 864): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_SetItem(x, w, v))).value) if (goto == 863): goto = None if (goto == 865): goto = None if (goto is None): if (not True): goto = 866 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 868 continue pass goto = 867 continue if (goto == 868): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 867): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 870 continue continue goto = 869 continue if (goto == 870): goto = None if (goto is None): goto = 866 continue if (goto == 869): goto = None if (goto is None): goto = 865 continue if (goto == 866): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 871 continue continue if (goto == 871): goto = None if (goto is None): goto = 24 continue if (goto == 862): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_SystemError, ctypes.cast(intp._make_string('no locals found when storing %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._getPtr(g.PyObject_Repr(w), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) goto = 24 continue if (goto == 861): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(91L)).value))): goto = 872 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(x, (ctypes.cast(intp._storePtr(f.contents.f_locals), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 873 continue if (not ctypes_wrapped.c_int((helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_DelItem(x, w))).value).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 874 continue g.format_exc_check_arg(g.PyExc_NameError, ctypes.cast(intp._make_string("name '%.200s' is not defined"), ctypes.POINTER(ctypes_wrapped.c_byte)), w) if (goto == 874): goto = None if (goto is None): goto = 24 continue if (goto == 873): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_SystemError, ctypes.cast(intp._make_string('no locals when deleting %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._getPtr(g.PyObject_Repr(w), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) goto = 24 continue if (goto == u'PRED_92'): goto = None if (goto is None): helpers.assign(oparg, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value) helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(3L)).value) if (goto == 872): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(92L)).value))): goto = 875 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == oparg.value)).value)).value): goto = 877 continue items = ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if (goto == 878): goto = None if (goto is None): if (not helpers.postfixDec(oparg).value): goto = 879 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(items, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)).contents goto = 878 continue if (goto == 879): goto = None if (goto == 880): goto = None if (goto is None): if (not True): goto = 881 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 883 continue pass goto = 882 continue if (goto == 883): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 882): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 885 continue continue goto = 884 continue if (goto == 885): goto = None if (goto is None): goto = 881 continue if (goto == 884): goto = None if (goto is None): goto = 880 continue if (goto == 881): goto = None if (goto is None): continue del items goto = 876 continue if (goto == 877): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyList_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == oparg.value)).value)).value): goto = 887 continue items = ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if (goto == 888): goto = None if (goto is None): if (not helpers.postfixDec(oparg).value): goto = 889 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(items, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)).contents goto = 888 continue if (goto == 889): goto = None if (goto is None): del items goto = 886 continue if (goto == 887): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.unpack_iterable(v, oparg, helpers.ptrArithmetic(stack_pointer, u'+', oparg.value)))).value): goto = 891 continue helpers.augAssignPtr(stack_pointer, u'+=', oparg.value) goto = 890 continue if (goto == 891): goto = None if (goto is None): helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 890): goto = None if (goto == 886): goto = None if (goto == 876): goto = None if (goto == 892): goto = None if (goto is None): if (not True): goto = 893 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 895 continue pass goto = 894 continue if (goto == 895): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 894): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 897 continue continue goto = 896 continue if (goto == 897): goto = None if (goto is None): goto = 893 continue if (goto == 896): goto = None if (goto is None): goto = 892 continue if (goto == 893): goto = None if (goto is None): goto = 24 continue if (goto == 875): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(95L)).value))): goto = 898 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_SetAttr(v, w, u))).value) if (goto == 899): goto = None if (goto is None): if (not True): goto = 900 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 902 continue pass goto = 901 continue if (goto == 902): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 901): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 904 continue continue goto = 903 continue if (goto == 904): goto = None if (goto is None): goto = 900 continue if (goto == 903): goto = None if (goto is None): goto = 899 continue if (goto == 900): goto = None if (goto == 905): goto = None if (goto is None): if (not True): goto = 906 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 908 continue pass goto = 907 continue if (goto == 908): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 907): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 910 continue continue goto = 909 continue if (goto == 910): goto = None if (goto is None): goto = 906 continue if (goto == 909): goto = None if (goto is None): goto = 905 continue if (goto == 906): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 911 continue continue if (goto == 911): goto = None if (goto is None): goto = 24 continue if (goto == 898): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(96L)).value))): goto = 912 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_SetAttr(v, w, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value) if (goto == 913): goto = None if (goto is None): if (not True): goto = 914 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 916 continue pass goto = 915 continue if (goto == 916): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 915): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 918 continue continue goto = 917 continue if (goto == 918): goto = None if (goto is None): goto = 914 continue if (goto == 917): goto = None if (goto is None): goto = 913 continue if (goto == 914): goto = None if (goto is None): goto = 24 continue if (goto == 912): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(97L)).value))): goto = 919 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(f.contents.f_globals, w, v))).value) if (goto == 920): goto = None if (goto is None): if (not True): goto = 921 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 923 continue pass goto = 922 continue if (goto == 923): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 922): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 925 continue continue goto = 924 continue if (goto == 925): goto = None if (goto is None): goto = 921 continue if (goto == 924): goto = None if (goto is None): goto = 920 continue if (goto == 921): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 926 continue continue if (goto == 926): goto = None if (goto is None): goto = 24 continue if (goto == 919): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(98L)).value))): goto = 927 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_DelItem(f.contents.f_globals, w))).value).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 928 continue g.format_exc_check_arg(g.PyExc_NameError, ctypes.cast(intp._make_string("global name '%.200s' is not defined"), ctypes.POINTER(ctypes_wrapped.c_byte)), w) if (goto == 928): goto = None if (goto is None): goto = 24 continue if (goto == 927): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(101L)).value))): goto = 929 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(v, (ctypes.cast(intp._storePtr(f.contents.f_locals), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 930 continue intp._getPtr(g.PyErr_Format(g.PyExc_SystemError, ctypes.cast(intp._make_string('no locals when loading %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._getPtr(g.PyObject_Repr(w), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) goto = 24 continue if (goto == 930): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 932 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 933): goto = None if (goto is None): if (not True): goto = 934 continue if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 936 continue pass goto = 935 continue if (goto == 936): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 935): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 938 continue continue goto = 937 continue if (goto == 938): goto = None if (goto is None): goto = 934 continue if (goto == 937): goto = None if (goto is None): goto = 933 continue if (goto == 934): goto = None if (goto is None): goto = 931 continue if (goto == 932): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 939 continue if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_KeyError))).value))).value): goto = 940 continue goto = 24 continue if (goto == 940): goto = None if (goto is None): g.PyErr_Clear() if (goto == 939): goto = None if (goto == 931): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 941 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(f.contents.f_globals, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 942 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(f.contents.f_builtins, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 943 continue g.format_exc_check_arg(g.PyExc_NameError, ctypes.cast(intp._make_string("name '%.200s' is not defined"), ctypes.POINTER(ctypes_wrapped.c_byte)), w) goto = 24 continue if (goto == 943): goto = None if (goto == 942): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 941): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 929): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(116L)).value))): goto = 944 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 945 continue hash_a = ctypes_wrapped.c_long(int(ctypes.cast(w, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value)) if (not ctypes_wrapped.c_int((hash_a.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 946 continue d = ctypes.POINTER(g.PyDictObject)() e = ctypes.POINTER(g.PyDictEntry)() helpers.assignPtr(d, (ctypes.cast(intp._storePtr(ctypes.cast(f.contents.f_globals, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(d.contents.ma_lookup, d, w, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 947 continue helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 947): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(e.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 948 continue helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 948): goto = None if (goto is None): helpers.assignPtr(d, (ctypes.cast(intp._storePtr(ctypes.cast(f.contents.f_builtins, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(d.contents.ma_lookup, d, w, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 949 continue helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 949): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(e.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 950 continue helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 950): goto = None if (goto is None): goto = u'load_global_error' continue del e del d if (goto == 946): goto = None if (goto is None): del hash_a if (goto == 945): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(f.contents.f_globals, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 951 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(f.contents.f_builtins, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 952 continue if (goto == u'load_global_error'): goto = None if (goto is None): g.format_exc_check_arg(g.PyExc_NameError, ctypes.cast(intp._make_string("global name '%.200s' is not defined"), ctypes.POINTER(ctypes_wrapped.c_byte)), w) goto = 24 continue if (goto == 952): goto = None if (goto == 951): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 944): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(126L)).value))): goto = 953 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 954 continue if (goto == 955): goto = None if (goto is None): if (not True): goto = 956 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, ctypes_wrapped.c_int(int(0L)).value) if (goto == 957): goto = None if (goto is None): if (not True): goto = 958 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 960 continue pass goto = 959 continue if (goto == 960): goto = None if (goto == 961): goto = None if (goto is None): if (not True): goto = 962 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 964 continue pass goto = 963 continue if (goto == 964): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 963): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 966 continue continue goto = 965 continue if (goto == 966): goto = None if (goto is None): goto = 962 continue if (goto == 965): goto = None if (goto is None): goto = 961 continue if (goto == 962): goto = None if (goto == 959): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 968 continue continue goto = 967 continue if (goto == 968): goto = None if (goto is None): goto = 958 continue if (goto == 967): goto = None if (goto is None): goto = 957 continue if (goto == 958): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 970 continue continue goto = 969 continue if (goto == 970): goto = None if (goto is None): goto = 956 continue if (goto == 969): goto = None if (goto is None): goto = 955 continue if (goto == 956): goto = None if (goto is None): continue if (goto == 954): goto = None if (goto is None): g.format_exc_check_arg(g.PyExc_UnboundLocalError, ctypes.cast(intp._make_string("local variable '%.200s' referenced before assignment"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyTuple_GetItem(co.contents.co_varnames, g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))) goto = 24 continue if (goto == 953): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(135L)).value))): goto = 971 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(freevars, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 972 continue continue if (goto == 972): goto = None if (goto is None): goto = 24 continue if (goto == 971): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(136L)).value))): goto = 973 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(freevars, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCell_Get(x), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 974 continue helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 974): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 975 continue goto = 24 continue if (goto == 975): goto = None if (goto is None): if (not ctypes_wrapped.c_int((oparg.value < ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 977 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) g.format_exc_check_arg(g.PyExc_UnboundLocalError, ctypes.cast(intp._make_string("local variable '%.200s' referenced before assignment"), ctypes.POINTER(ctypes_wrapped.c_byte)), v) goto = 976 continue if (goto == 977): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(co.contents.co_freevars, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_long(int((oparg.value - ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.format_exc_check_arg(g.PyExc_NameError, ctypes.cast(intp._make_string("free variable '%.200s' referenced before assignment in enclosing scope"), ctypes.POINTER(ctypes_wrapped.c_byte)), v) if (goto == 976): goto = None if (goto is None): goto = 24 continue if (goto == 973): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(137L)).value))): goto = 978 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(freevars, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) ctypes_wrapped.c_int(int(g.PyCell_Set(x, w))) if (goto == 979): goto = None if (goto is None): if (not True): goto = 980 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 982 continue pass goto = 981 continue if (goto == 982): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 981): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 984 continue continue goto = 983 continue if (goto == 984): goto = None if (goto is None): goto = 980 continue if (goto == 983): goto = None if (goto is None): goto = 979 continue if (goto == 980): goto = None if (goto is None): continue if (goto == 978): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(102L)).value))): goto = 985 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 986 continue if (not True): goto = 987 continue first_iteration_a = True if (goto == 988): goto = None if (goto is None): if (not True): goto = 989 continue if (not first_iteration_a): goto = 990 continue first_iteration_a = False if (goto == 990): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(oparg).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 992 continue pass goto = 991 continue if (goto == 992): goto = None if (goto is None): goto = 989 continue if (goto == 991): goto = None if (goto is None): helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(x, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) goto = 988 continue if (goto == 989): goto = None if (goto == 987): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 986): goto = None if (goto is None): goto = 24 continue if (goto == 985): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(103L)).value))): goto = 993 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 994 continue if (not True): goto = 995 continue first_iteration_b = True if (goto == 996): goto = None if (goto is None): if (not True): goto = 997 continue if (not first_iteration_b): goto = 998 continue first_iteration_b = False if (goto == 998): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(oparg).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1000 continue pass goto = 999 continue if (goto == 1000): goto = None if (goto is None): goto = 997 continue if (goto == 999): goto = None if (goto is None): helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(x, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', oparg.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) goto = 996 continue if (goto == 997): goto = None if (goto == 995): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 994): goto = None if (goto is None): goto = 24 continue if (goto == 993): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(104L)).value))): goto = 1001 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySet_New(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1002 continue if (not True): goto = 1003 continue first_iteration_c = True if (goto == 1004): goto = None if (goto is None): if (not True): goto = 1005 continue if (not first_iteration_c): goto = 1006 continue first_iteration_c = False if (goto == 1006): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(oparg).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1008 continue pass goto = 1007 continue if (goto == 1008): goto = None if (goto is None): goto = 1005 continue if (goto == 1007): goto = None if (goto is None): helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1009 continue helpers.assign(err, ctypes_wrapped.c_int(int(g.PySet_Add(x, w))).value) if (goto == 1009): goto = None if (goto == 1010): goto = None if (goto is None): if (not True): goto = 1011 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1013 continue pass goto = 1012 continue if (goto == 1013): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1012): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1015 continue continue goto = 1014 continue if (goto == 1015): goto = None if (goto is None): goto = 1011 continue if (goto == 1014): goto = None if (goto is None): goto = 1010 continue if (goto == 1011): goto = None if (goto is None): goto = 1004 continue if (goto == 1005): goto = None if (goto == 1003): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1016 continue if (goto == 1017): goto = None if (goto is None): if (not True): goto = 1018 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1020 continue pass goto = 1019 continue if (goto == 1020): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1019): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1022 continue continue goto = 1021 continue if (goto == 1022): goto = None if (goto is None): goto = 1018 continue if (goto == 1021): goto = None if (goto is None): goto = 1017 continue if (goto == 1018): goto = None if (goto is None): goto = 24 continue if (goto == 1016): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue if (goto == 1002): goto = None if (goto is None): goto = 24 continue if (goto == 1001): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(105L)).value))): goto = 1023 continue _switchfallthrough = True helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyDict_NewPresized(g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1024 continue continue if (goto == 1024): goto = None if (goto is None): goto = 24 continue if (goto == 1023): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(54L)).value))): goto = 1025 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(v, w, u))).value) if (goto == 1026): goto = None if (goto is None): if (not True): goto = 1027 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1029 continue pass goto = 1028 continue if (goto == 1029): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1028): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1031 continue continue goto = 1030 continue if (goto == 1031): goto = None if (goto is None): goto = 1027 continue if (goto == 1030): goto = None if (goto is None): goto = 1026 continue if (goto == 1027): goto = None if (goto == 1032): goto = None if (goto is None): if (not True): goto = 1033 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1035 continue pass goto = 1034 continue if (goto == 1035): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1034): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1037 continue continue goto = 1036 continue if (goto == 1037): goto = None if (goto is None): goto = 1033 continue if (goto == 1036): goto = None if (goto is None): goto = 1032 continue if (goto == 1033): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1038 continue continue if (goto == 1038): goto = None if (goto is None): goto = 24 continue if (goto == 1025): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(147L)).value))): goto = 1039 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- oparg.value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(v, w, u))).value) if (goto == 1040): goto = None if (goto is None): if (not True): goto = 1041 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1043 continue pass goto = 1042 continue if (goto == 1043): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1042): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1045 continue continue goto = 1044 continue if (goto == 1045): goto = None if (goto is None): goto = 1041 continue if (goto == 1044): goto = None if (goto is None): goto = 1040 continue if (goto == 1041): goto = None if (goto == 1046): goto = None if (goto is None): if (not True): goto = 1047 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1049 continue pass goto = 1048 continue if (goto == 1049): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1048): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1051 continue continue goto = 1050 continue if (goto == 1051): goto = None if (goto is None): goto = 1047 continue if (goto == 1050): goto = None if (goto is None): goto = 1046 continue if (goto == 1047): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1052 continue if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(113L)).value)).value): goto = 1053 continue goto = u'PRED_113' continue if (goto == 1053): goto = None if (goto is None): continue if (goto == 1052): goto = None if (goto is None): goto = 24 continue if (goto == 1039): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(106L)).value))): goto = 1054 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1055): goto = None if (goto is None): if (not True): goto = 1056 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1058 continue pass goto = 1057 continue if (goto == 1058): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1057): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1060 continue continue goto = 1059 continue if (goto == 1060): goto = None if (goto is None): goto = 1056 continue if (goto == 1059): goto = None if (goto is None): goto = 1055 continue if (goto == 1056): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1061 continue continue if (goto == 1061): goto = None if (goto is None): goto = 24 continue if (goto == 1054): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(107L)).value))): goto = 1062 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 1064 continue a = ctypes_wrapped.c_long() b = ctypes_wrapped.c_long() res = ctypes_wrapped.c_int() helpers.assign(a, ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) helpers.assign(b, ctypes.cast(w, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) if (not True): goto = 1065 continue _switchvalue_a = None _switchvalue_a = oparg.value _switchfallthrough_a = None _switchfallthrough_a = False if (goto == 1066): goto = None if (goto is None): if (not True): goto = 1067 continue if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(0L).value))): goto = 1068 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int((a.value < b.value)).value) goto = 1067 continue if (goto == 1068): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(1L).value))): goto = 1069 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int((a.value <= b.value)).value) goto = 1067 continue if (goto == 1069): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(2L).value))): goto = 1070 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int((a.value == b.value)).value) goto = 1067 continue if (goto == 1070): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(3L).value))): goto = 1071 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int((a.value != b.value)).value) goto = 1067 continue if (goto == 1071): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(4L).value))): goto = 1072 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int((a.value > b.value)).value) goto = 1067 continue if (goto == 1072): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(5L).value))): goto = 1073 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int((a.value >= b.value)).value) goto = 1067 continue if (goto == 1073): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(8L).value))): goto = 1074 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value) goto = 1067 continue if (goto == 1074): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(9L).value))): goto = 1075 continue _switchfallthrough_a = True helpers.assign(res, ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value) goto = 1067 continue if (goto == 1075): goto = None if (goto is None): if (not (not _switchfallthrough_a)): goto = 1076 continue goto = u'slow_compare' continue if (goto == 1076): goto = None if (goto is None): goto = 1067 continue goto = 1066 continue if (goto == 1067): goto = None if (goto is None): del _switchfallthrough_a del _switchvalue_a if (goto == 1065): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if res.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del a del res del b goto = 1063 continue if (goto == 1064): goto = None if (goto == u'slow_compare'): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.cmp_outcome(oparg, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1063): goto = None if (goto == 1077): goto = None if (goto is None): if (not True): goto = 1078 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1080 continue pass goto = 1079 continue if (goto == 1080): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1079): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1082 continue continue goto = 1081 continue if (goto == 1082): goto = None if (goto is None): goto = 1078 continue if (goto == 1081): goto = None if (goto is None): goto = 1077 continue if (goto == 1078): goto = None if (goto == 1083): goto = None if (goto is None): if (not True): goto = 1084 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1086 continue pass goto = 1085 continue if (goto == 1086): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1085): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1088 continue continue goto = 1087 continue if (goto == 1088): goto = None if (goto is None): goto = 1084 continue if (goto == 1087): goto = None if (goto is None): goto = 1083 continue if (goto == 1084): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1089 continue goto = 24 continue if (goto == 1089): goto = None if (goto is None): if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(114L)).value)).value): goto = 1090 continue goto = u'PRED_114' continue if (goto == 1090): goto = None if (goto is None): if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(115L)).value)).value): goto = 1091 continue goto = u'PRED_115' continue if (goto == 1091): goto = None if (goto is None): continue if (goto == 1062): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(108L)).value))): goto = 1092 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(f.contents.f_builtins, ctypes.cast(intp._make_string('__import__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1093 continue g.PyErr_SetString(g.PyExc_ImportError, ctypes.cast(intp._make_string('__import__ not found'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = 24 continue if (goto == 1093): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long(int(g.PyInt_AsLong(u))).value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value or (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1095 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(5L)).value)), w, f.contents.f_globals, (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(f.contents.f_locals, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(f.contents.f_locals, ctypes.POINTER(g.PyObject))), v, u), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 1094 continue if (goto == 1095): goto = None if (goto is None): helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(4L)).value)), w, f.contents.f_globals, (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(f.contents.f_locals, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(f.contents.f_locals, ctypes.POINTER(g.PyObject))), v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1094): goto = None if (goto == 1096): goto = None if (goto is None): if (not True): goto = 1097 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1099 continue pass goto = 1098 continue if (goto == 1099): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1098): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1101 continue continue goto = 1100 continue if (goto == 1101): goto = None if (goto is None): goto = 1097 continue if (goto == 1100): goto = None if (goto is None): goto = 1096 continue if (goto == 1097): goto = None if (goto == 1102): goto = None if (goto is None): if (not True): goto = 1103 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1105 continue pass goto = 1104 continue if (goto == 1105): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1104): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1107 continue continue goto = 1106 continue if (goto == 1107): goto = None if (goto is None): goto = 1103 continue if (goto == 1106): goto = None if (goto is None): goto = 1102 continue if (goto == 1103): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1108 continue helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1109): goto = None if (goto is None): if (not True): goto = 1110 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1112 continue pass goto = 1111 continue if (goto == 1112): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1111): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1114 continue continue goto = 1113 continue if (goto == 1114): goto = None if (goto is None): goto = 1110 continue if (goto == 1113): goto = None if (goto is None): goto = 1109 continue if (goto == 1110): goto = None if (goto is None): helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 1108): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(v, w, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1115): goto = None if (goto is None): if (not True): goto = 1116 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1118 continue pass goto = 1117 continue if (goto == 1118): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1117): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1120 continue continue goto = 1119 continue if (goto == 1120): goto = None if (goto is None): goto = 1116 continue if (goto == 1119): goto = None if (goto is None): goto = 1115 continue if (goto == 1116): goto = None if (goto == 1121): goto = None if (goto is None): if (not True): goto = 1122 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1124 continue pass goto = 1123 continue if (goto == 1124): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1123): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1126 continue continue goto = 1125 continue if (goto == 1126): goto = None if (goto is None): goto = 1122 continue if (goto == 1125): goto = None if (goto is None): goto = 1121 continue if (goto == 1122): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1127 continue continue if (goto == 1127): goto = None if (goto is None): goto = 24 continue if (goto == 1092): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(84L)).value))): goto = 1128 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyFrame_FastToLocals(f) if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(x, (ctypes.cast(intp._storePtr(f.contents.f_locals), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1129 continue g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string("no locals found during 'import *'"), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = 24 continue if (goto == 1129): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.import_all_from(x, v))).value) g.PyFrame_LocalsToFast(f, ctypes_wrapped.c_int(int(0L))) if (goto == 1130): goto = None if (goto is None): if (not True): goto = 1131 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1133 continue pass goto = 1132 continue if (goto == 1133): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1132): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1135 continue continue goto = 1134 continue if (goto == 1135): goto = None if (goto is None): goto = 1131 continue if (goto == 1134): goto = None if (goto is None): goto = 1130 continue if (goto == 1131): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1136 continue continue if (goto == 1136): goto = None if (goto is None): goto = 24 continue if (goto == 1128): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(109L)).value))): goto = 1137 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.import_from(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1138 continue continue if (goto == 1138): goto = None if (goto is None): goto = 24 continue if (goto == 1137): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(110L)).value))): goto = 1139 continue _switchfallthrough = True helpers.augAssignPtr(next_instr, u'+=', oparg.value) goto = u'fast_next_opcode' continue if (goto == u'PRED_114'): goto = None if (goto is None): helpers.assign(oparg, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value) helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(3L)).value) if (goto == 1139): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(114L)).value))): goto = 1140 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1141 continue if (goto == 1142): goto = None if (goto is None): if (not True): goto = 1143 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1145 continue pass goto = 1144 continue if (goto == 1145): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1144): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1147 continue continue goto = 1146 continue if (goto == 1147): goto = None if (goto is None): goto = 1143 continue if (goto == 1146): goto = None if (goto is None): goto = 1142 continue if (goto == 1143): goto = None if (goto is None): goto = u'fast_next_opcode' continue if (goto == 1141): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1148 continue if (goto == 1149): goto = None if (goto is None): if (not True): goto = 1150 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1152 continue pass goto = 1151 continue if (goto == 1152): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1151): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1154 continue continue goto = 1153 continue if (goto == 1154): goto = None if (goto is None): goto = 1150 continue if (goto == 1153): goto = None if (goto is None): goto = 1149 continue if (goto == 1150): goto = None if (goto is None): helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 1148): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(w))).value) if (goto == 1155): goto = None if (goto is None): if (not True): goto = 1156 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1158 continue pass goto = 1157 continue if (goto == 1158): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1157): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1160 continue continue goto = 1159 continue if (goto == 1160): goto = None if (goto is None): goto = 1156 continue if (goto == 1159): goto = None if (goto is None): goto = 1155 continue if (goto == 1156): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1162 continue helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) goto = 1161 continue if (goto == 1162): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1164 continue helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = 1163 continue if (goto == 1164): goto = None if (goto is None): goto = 24 continue if (goto == 1163): goto = None if (goto == 1161): goto = None if (goto is None): continue if (goto == u'PRED_115'): goto = None if (goto is None): helpers.assign(oparg, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value) helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(3L)).value) if (goto == 1140): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(115L)).value))): goto = 1165 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1166 continue if (goto == 1167): goto = None if (goto is None): if (not True): goto = 1168 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1170 continue pass goto = 1169 continue if (goto == 1170): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1169): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1172 continue continue goto = 1171 continue if (goto == 1172): goto = None if (goto is None): goto = 1168 continue if (goto == 1171): goto = None if (goto is None): goto = 1167 continue if (goto == 1168): goto = None if (goto is None): goto = u'fast_next_opcode' continue if (goto == 1166): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1173 continue if (goto == 1174): goto = None if (goto is None): if (not True): goto = 1175 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1177 continue pass goto = 1176 continue if (goto == 1177): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1176): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1179 continue continue goto = 1178 continue if (goto == 1179): goto = None if (goto is None): goto = 1175 continue if (goto == 1178): goto = None if (goto is None): goto = 1174 continue if (goto == 1175): goto = None if (goto is None): helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 1173): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(w))).value) if (goto == 1180): goto = None if (goto is None): if (not True): goto = 1181 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1183 continue pass goto = 1182 continue if (goto == 1183): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1182): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1185 continue continue goto = 1184 continue if (goto == 1185): goto = None if (goto is None): goto = 1181 continue if (goto == 1184): goto = None if (goto is None): goto = 1180 continue if (goto == 1181): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1187 continue helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = 1186 continue if (goto == 1187): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1189 continue pass goto = 1188 continue if (goto == 1189): goto = None if (goto is None): goto = 24 continue if (goto == 1188): goto = None if (goto == 1186): goto = None if (goto is None): continue if (goto == 1165): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(111L)).value))): goto = 1190 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1191 continue helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 1192): goto = None if (goto is None): if (not True): goto = 1193 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1195 continue pass goto = 1194 continue if (goto == 1195): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1194): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1197 continue continue goto = 1196 continue if (goto == 1197): goto = None if (goto is None): goto = 1193 continue if (goto == 1196): goto = None if (goto is None): goto = 1192 continue if (goto == 1193): goto = None if (goto is None): goto = u'fast_next_opcode' continue if (goto == 1191): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1198 continue helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 1198): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(w))).value) if (not ctypes_wrapped.c_int((err.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1200 continue helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 1201): goto = None if (goto is None): if (not True): goto = 1202 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1204 continue pass goto = 1203 continue if (goto == 1204): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1203): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1206 continue continue goto = 1205 continue if (goto == 1206): goto = None if (goto is None): goto = 1202 continue if (goto == 1205): goto = None if (goto is None): goto = 1201 continue if (goto == 1202): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) goto = 1199 continue if (goto == 1200): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1208 continue helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = 1207 continue if (goto == 1208): goto = None if (goto is None): goto = 24 continue if (goto == 1207): goto = None if (goto == 1199): goto = None if (goto is None): continue if (goto == 1190): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(112L)).value))): goto = 1209 continue _switchfallthrough = True helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1210 continue helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 1211): goto = None if (goto is None): if (not True): goto = 1212 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1214 continue pass goto = 1213 continue if (goto == 1214): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1213): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1216 continue continue goto = 1215 continue if (goto == 1216): goto = None if (goto is None): goto = 1212 continue if (goto == 1215): goto = None if (goto is None): goto = 1211 continue if (goto == 1212): goto = None if (goto is None): goto = u'fast_next_opcode' continue if (goto == 1210): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1217 continue helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = u'fast_next_opcode' continue if (goto == 1217): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(w))).value) if (not ctypes_wrapped.c_int((err.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1219 continue helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) goto = 1218 continue if (goto == 1219): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1221 continue helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 1222): goto = None if (goto is None): if (not True): goto = 1223 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1225 continue pass goto = 1224 continue if (goto == 1225): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1224): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1227 continue continue goto = 1226 continue if (goto == 1227): goto = None if (goto is None): goto = 1223 continue if (goto == 1226): goto = None if (goto is None): goto = 1222 continue if (goto == 1223): goto = None if (goto is None): goto = 1220 continue if (goto == 1221): goto = None if (goto is None): goto = 24 continue if (goto == 1220): goto = None if (goto == 1218): goto = None if (goto is None): continue if (goto == u'PRED_113'): goto = None if (goto is None): helpers.assign(oparg, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value) helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(3L)).value) if (goto == 1209): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(113L)).value))): goto = 1228 continue _switchfallthrough = True helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', oparg.value)), ctypes_wrapped.c_void_p).value or 0)) continue if (goto == 1228): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(68L)).value))): goto = 1229 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1230): goto = None if (goto is None): if (not True): goto = 1231 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1233 continue pass goto = 1232 continue if (goto == 1233): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1232): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1235 continue continue goto = 1234 continue if (goto == 1235): goto = None if (goto is None): goto = 1231 continue if (goto == 1234): goto = None if (goto is None): goto = 1230 continue if (goto == 1231): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1236 continue helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(93L)).value)).value): goto = 1237 continue goto = u'PRED_93' continue if (goto == 1237): goto = None if (goto is None): continue if (goto == 1236): goto = None if (goto is None): helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) goto = 24 continue if (goto == u'PRED_93'): goto = None if (goto is None): helpers.assign(oparg, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value) helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(3L)).value) if (goto == 1229): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(93L)).value))): goto = 1238 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(v.contents.ob_type.contents.tp_iternext, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1239 continue helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(125L)).value)).value): goto = 1240 continue goto = u'PRED_125' continue if (goto == 1240): goto = None if (goto is None): if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(92L)).value)).value): goto = 1241 continue goto = u'PRED_92' continue if (goto == 1241): goto = None if (goto is None): continue if (goto == 1239): goto = None if (goto is None): if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 1242 continue if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_StopIteration))).value))).value): goto = 1243 continue goto = 24 continue if (goto == 1243): goto = None if (goto is None): g.PyErr_Clear() if (goto == 1242): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1244): goto = None if (goto is None): if (not True): goto = 1245 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1247 continue pass goto = 1246 continue if (goto == 1247): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1246): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1249 continue continue goto = 1248 continue if (goto == 1249): goto = None if (goto is None): goto = 1245 continue if (goto == 1248): goto = None if (goto is None): goto = 1244 continue if (goto == 1245): goto = None if (goto is None): helpers.augAssignPtr(next_instr, u'+=', oparg.value) continue if (goto == 1238): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(80L)).value))): goto = 1250 continue _switchfallthrough = True helpers.assign(why, ctypes_wrapped.c_uint(16L).value) goto = u'fast_block_end' continue if (goto == 1250): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(119L)).value))): goto = 1251 continue _switchfallthrough = True helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(oparg.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(retval, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1252 continue helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 1252): goto = None if (goto is None): helpers.assign(why, ctypes_wrapped.c_uint(32L).value) goto = u'fast_block_end' continue if (goto == 1251): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(120L)).value))): goto = 1253 continue _switchfallthrough = True if (goto == 1253): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(121L)).value))): goto = 1254 continue _switchfallthrough = True if (goto == 1254): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(122L)).value))): goto = 1255 continue _switchfallthrough = True g.PyFrame_BlockSetup(f, opcode, ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(next_instr, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(first_instr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)).value + oparg.value))), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)) / 8)).value))) continue if (goto == 1255): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(143L)).value))): goto = 1256 continue _switchfallthrough = True exit_a = ctypes.POINTER(g.PyObject)() enter = ctypes.POINTER(g.PyObject)() helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.special_lookup(w, ctypes.cast(intp._make_string('__exit__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(exit_a)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1257 continue goto = 24 continue if (goto == 1257): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(intp._getPtr(g.special_lookup(w, ctypes.cast(intp._make_string('__enter__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(enter)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1258): goto = None if (goto is None): if (not True): goto = 1259 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1261 continue pass goto = 1260 continue if (goto == 1261): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1260): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1263 continue continue goto = 1262 continue if (goto == 1263): goto = None if (goto is None): goto = 1259 continue if (goto == 1262): goto = None if (goto is None): goto = 1258 continue if (goto == 1259): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not (ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1264 continue helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 1264): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(u, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1265): goto = None if (goto is None): if (not True): goto = 1266 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1268 continue pass goto = 1267 continue if (goto == 1268): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1267): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1270 continue continue goto = 1269 continue if (goto == 1270): goto = None if (goto is None): goto = 1266 continue if (goto == 1269): goto = None if (goto is None): goto = 1265 continue if (goto == 1266): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not (ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1271 continue goto = 24 continue if (goto == 1271): goto = None if (goto is None): g.PyFrame_BlockSetup(f, ctypes_wrapped.c_int(int(143L)), ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(next_instr, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(first_instr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)).value + oparg.value))), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)) / 8)).value))) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents continue del exit_a del enter if (goto == 1256): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(81L)).value))): goto = 1272 continue _switchfallthrough = True exit_func = ctypes.POINTER(g.PyObject)() helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1274 continue helpers.assignPtr(exit_func, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.assignPtr(w, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) goto = 1273 continue if (goto == 1274): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((u.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1276 continue if (not True): goto = 1277 continue _switchvalue_a = None _switchvalue_a = ctypes.cast(u, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value _switchfallthrough_a = None _switchfallthrough_a = False if (goto == 1278): goto = None if (goto is None): if (not True): goto = 1279 continue if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(8L).value))): goto = 1280 continue _switchfallthrough_a = True if (goto == 1280): goto = None if (goto is None): if (not (_switchfallthrough_a or (_switchvalue_a == ctypes_wrapped.c_uint(32L).value))): goto = 1281 continue _switchfallthrough_a = True helpers.assignPtr(exit_func, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0)) goto = 1279 continue if (goto == 1281): goto = None if (goto is None): if (not (not _switchfallthrough_a)): goto = 1282 continue helpers.assignPtr(exit_func, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0)) goto = 1279 continue if (goto == 1282): goto = None if (goto is None): goto = 1279 continue goto = 1278 continue if (goto == 1279): goto = None if (goto is None): del _switchfallthrough_a del _switchvalue_a if (goto == 1277): goto = None if (goto is None): helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.assignPtr(w, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) goto = 1275 continue if (goto == 1276): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(exit_func, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1275): goto = None if (goto == 1273): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(exit_func, u, v, w, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1283): goto = None if (goto is None): if (not True): goto = 1284 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(exit_func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1286 continue pass goto = 1285 continue if (goto == 1286): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(exit_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(exit_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1285): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1288 continue continue goto = 1287 continue if (goto == 1288): goto = None if (goto is None): goto = 1284 continue if (goto == 1287): goto = None if (goto is None): goto = 1283 continue if (goto == 1284): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1289 continue goto = 24 continue if (goto == 1289): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1291 continue helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(x))).value) goto = 1290 continue if (goto == 1291): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) if (goto == 1290): goto = None if (goto == 1292): goto = None if (goto is None): if (not True): goto = 1293 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1295 continue pass goto = 1294 continue if (goto == 1295): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1294): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1297 continue continue goto = 1296 continue if (goto == 1297): goto = None if (goto is None): goto = 1293 continue if (goto == 1296): goto = None if (goto is None): goto = 1292 continue if (goto == 1293): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1299 continue goto = 24 continue goto = 1298 continue if (goto == 1299): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1301 continue helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) helpers.augAssignPtr(stack_pointer, u'+=', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1302): goto = None if (goto is None): if (not True): goto = 1303 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1305 continue pass goto = 1304 continue if (goto == 1305): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1304): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1307 continue continue goto = 1306 continue if (goto == 1307): goto = None if (goto is None): goto = 1303 continue if (goto == 1306): goto = None if (goto is None): goto = 1302 continue if (goto == 1303): goto = None if (goto == 1308): goto = None if (goto is None): if (not True): goto = 1309 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1311 continue pass goto = 1310 continue if (goto == 1311): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1310): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1313 continue continue goto = 1312 continue if (goto == 1313): goto = None if (goto is None): goto = 1309 continue if (goto == 1312): goto = None if (goto is None): goto = 1308 continue if (goto == 1309): goto = None if (goto == 1314): goto = None if (goto is None): if (not True): goto = 1315 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1317 continue pass goto = 1316 continue if (goto == 1317): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1316): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1319 continue continue goto = 1318 continue if (goto == 1319): goto = None if (goto is None): goto = 1315 continue if (goto == 1318): goto = None if (goto is None): goto = 1314 continue if (goto == 1315): goto = None if (goto is None): goto = 1300 continue if (goto == 1301): goto = None if (goto is None): pass if (goto == 1300): goto = None if (goto == 1298): goto = None if (goto is None): if (not ctypes_wrapped.c_int((next_instr.contents.value == ctypes_wrapped.c_int(int(88L)).value)).value): goto = 1320 continue goto = u'PRED_88' continue if (goto == 1320): goto = None if (goto is None): goto = 24 continue del exit_func if (goto == 1272): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(131L)).value))): goto = 1321 continue _switchfallthrough = True sp = ctypes.POINTER(ctypes.POINTER(g.PyObject))() helpers.assignPtr(sp, (ctypes.cast(intp._storePtr(stack_pointer), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_function(ctypes.pointer(sp), oparg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(stack_pointer, (ctypes.cast(intp._storePtr(sp), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1322 continue continue if (goto == 1322): goto = None if (goto is None): goto = 24 continue del sp if (goto == 1321): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(140L)).value))): goto = 1323 continue _switchfallthrough = True if (goto == 1323): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(141L)).value))): goto = 1324 continue _switchfallthrough = True if (goto == 1324): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(142L)).value))): goto = 1325 continue _switchfallthrough = True na = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((oparg.value & ctypes_wrapped.c_int(int(255L)).value))).value)) nk = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int((oparg.value >> ctypes_wrapped.c_int(int(8L)).value))).value & ctypes_wrapped.c_int(int(255L)).value))).value)) flags = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((opcode.value - ctypes_wrapped.c_int(int(131L)).value))).value & ctypes_wrapped.c_int(int(3L)).value))).value)) n = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((na.value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(2L)).value * nk.value))).value))).value)) pfunc = ctypes.POINTER(ctypes.POINTER(g.PyObject))() func = ctypes.POINTER(g.PyObject)() sp = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(1L)).value))).value): goto = 1326 continue helpers.postfixInc(n) if (goto == 1326): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(2L)).value))).value): goto = 1327 continue helpers.postfixInc(n) if (goto == 1327): goto = None if (goto is None): helpers.assignPtr(pfunc, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(stack_pointer, u'-', n.value), u'-', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(func, (ctypes.cast(intp._storePtr(pfunc.contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyMethod_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_self, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1329 continue self = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_self, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(func, (ctypes.cast(intp._storePtr(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_func), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 1330): goto = None if (goto is None): if (not True): goto = 1331 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1333 continue pass goto = 1332 continue if (goto == 1333): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1332): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1335 continue continue goto = 1334 continue if (goto == 1335): goto = None if (goto is None): goto = 1331 continue if (goto == 1334): goto = None if (goto is None): goto = 1330 continue if (goto == 1331): goto = None if (goto is None): helpers.assignPtr(pfunc.contents, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(na) del self goto = 1328 continue if (goto == 1329): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 1328): goto = None if (goto is None): helpers.assignPtr(sp, (ctypes.cast(intp._storePtr(stack_pointer), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.ext_do_call(func, ctypes.pointer(sp), flags, na, nk), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(stack_pointer, (ctypes.cast(intp._storePtr(sp), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1336): goto = None if (goto is None): if (not True): goto = 1337 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1339 continue pass goto = 1338 continue if (goto == 1339): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1338): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1341 continue continue goto = 1340 continue if (goto == 1341): goto = None if (goto is None): goto = 1337 continue if (goto == 1340): goto = None if (goto is None): goto = 1336 continue if (goto == 1337): goto = None if (goto == 1342): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) > (ctypes.cast(pfunc, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1343 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1344): goto = None if (goto is None): if (not True): goto = 1345 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1347 continue pass goto = 1346 continue if (goto == 1347): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1346): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1349 continue continue goto = 1348 continue if (goto == 1349): goto = None if (goto is None): goto = 1345 continue if (goto == 1348): goto = None if (goto is None): goto = 1344 continue if (goto == 1345): goto = None if (goto is None): goto = 1342 continue if (goto == 1343): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1350 continue continue if (goto == 1350): goto = None if (goto is None): goto = 24 continue del nk del pfunc del na del sp del n del flags del func if (goto == 1325): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(132L)).value))): goto = 1351 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFunction_New(v, f.contents.f_globals), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1352): goto = None if (goto is None): if (not True): goto = 1353 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1355 continue pass goto = 1354 continue if (goto == 1355): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1354): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1357 continue continue goto = 1356 continue if (goto == 1357): goto = None if (goto is None): goto = 1353 continue if (goto == 1356): goto = None if (goto is None): goto = 1352 continue if (goto == 1353): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((oparg.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1358 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1359 continue if (goto == 1360): goto = None if (goto is None): if (not True): goto = 1361 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1363 continue pass goto = 1362 continue if (goto == 1363): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1362): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1365 continue continue goto = 1364 continue if (goto == 1365): goto = None if (goto is None): goto = 1361 continue if (goto == 1364): goto = None if (goto is None): goto = 1360 continue if (goto == 1361): goto = None if (goto is None): helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 1359): goto = None if (goto == 1366): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(oparg).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1367 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) goto = 1366 continue if (goto == 1367): goto = None if (goto is None): helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFunction_SetDefaults(x, v))).value) if (goto == 1368): goto = None if (goto is None): if (not True): goto = 1369 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1371 continue pass goto = 1370 continue if (goto == 1371): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1370): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1373 continue continue goto = 1372 continue if (goto == 1373): goto = None if (goto is None): goto = 1369 continue if (goto == 1372): goto = None if (goto is None): goto = 1368 continue if (goto == 1369): goto = None if (goto == 1358): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents goto = 24 continue if (goto == 1351): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(134L)).value))): goto = 1374 continue _switchfallthrough = True helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFunction_New(v, f.contents.f_globals), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1375): goto = None if (goto is None): if (not True): goto = 1376 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1378 continue pass goto = 1377 continue if (goto == 1378): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1377): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1380 continue continue goto = 1379 continue if (goto == 1380): goto = None if (goto is None): goto = 1376 continue if (goto == 1379): goto = None if (goto is None): goto = 1375 continue if (goto == 1376): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1381 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyFunction_SetClosure(x, v))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1382 continue helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 1382): goto = None if (goto == 1383): goto = None if (goto is None): if (not True): goto = 1384 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1386 continue pass goto = 1385 continue if (goto == 1386): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1385): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1388 continue continue goto = 1387 continue if (goto == 1388): goto = None if (goto is None): goto = 1384 continue if (goto == 1387): goto = None if (goto is None): goto = 1383 continue if (goto == 1384): goto = None if (goto == 1381): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((oparg.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1389 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(oparg.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1390 continue if (goto == 1391): goto = None if (goto is None): if (not True): goto = 1392 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1394 continue pass goto = 1393 continue if (goto == 1394): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1393): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1396 continue continue goto = 1395 continue if (goto == 1396): goto = None if (goto is None): goto = 1392 continue if (goto == 1395): goto = None if (goto is None): goto = 1391 continue if (goto == 1392): goto = None if (goto is None): helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 1390): goto = None if (goto == 1397): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(oparg).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1398 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', oparg.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) goto = 1397 continue if (goto == 1398): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyFunction_SetDefaults(x, v))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1399 continue helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 1399): goto = None if (goto == 1400): goto = None if (goto is None): if (not True): goto = 1401 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1403 continue pass goto = 1402 continue if (goto == 1403): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1402): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1405 continue continue goto = 1404 continue if (goto == 1405): goto = None if (goto is None): goto = 1401 continue if (goto == 1404): goto = None if (goto is None): goto = 1400 continue if (goto == 1401): goto = None if (goto == 1389): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)).contents goto = 24 continue if (goto == 1374): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(133L)).value))): goto = 1406 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((oparg.value == ctypes_wrapped.c_int(int(3L)).value)).value): goto = 1408 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) goto = 1407 continue if (goto == 1408): goto = None if (goto is None): helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value) if (goto == 1407): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySlice_New(u, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1409): goto = None if (goto is None): if (not True): goto = 1410 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1412 continue pass goto = 1411 continue if (goto == 1412): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1411): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1414 continue continue goto = 1413 continue if (goto == 1414): goto = None if (goto is None): goto = 1410 continue if (goto == 1413): goto = None if (goto is None): goto = 1409 continue if (goto == 1410): goto = None if (goto == 1415): goto = None if (goto is None): if (not True): goto = 1416 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1418 continue pass goto = 1417 continue if (goto == 1418): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1417): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1420 continue continue goto = 1419 continue if (goto == 1420): goto = None if (goto is None): goto = 1416 continue if (goto == 1419): goto = None if (goto is None): goto = 1415 continue if (goto == 1416): goto = None if (goto == 1421): goto = None if (goto is None): if (not True): goto = 1422 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1424 continue pass goto = 1423 continue if (goto == 1424): goto = None if (goto == 1425): goto = None if (goto is None): if (not True): goto = 1426 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1428 continue pass goto = 1427 continue if (goto == 1428): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1427): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1430 continue continue goto = 1429 continue if (goto == 1430): goto = None if (goto is None): goto = 1426 continue if (goto == 1429): goto = None if (goto is None): goto = 1425 continue if (goto == 1426): goto = None if (goto == 1423): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1432 continue continue goto = 1431 continue if (goto == 1432): goto = None if (goto is None): goto = 1422 continue if (goto == 1431): goto = None if (goto is None): goto = 1421 continue if (goto == 1422): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(stack_pointer, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1433 continue continue if (goto == 1433): goto = None if (goto is None): goto = 24 continue if (goto == 1406): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(145L)).value))): goto = 1434 continue _switchfallthrough = True helpers.assign(opcode, helpers.postfixIncPtr(next_instr).contents.value) helpers.assign(oparg, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int((oparg.value << ctypes_wrapped.c_int(int(16L)).value))).value | (helpers.augAssignPtr(next_instr, u'+=', ctypes_wrapped.c_int(int(2L)).value), ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value).contents.value))))[1].value))).value) goto = u'dispatch_opcode' continue if (goto == 1434): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 1435 continue values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('XXX lineno: %d, opcode: %d\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(g.PyFrame_GetLineNumber(f))), opcode) g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('unknown opcode'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) goto = 24 continue if (goto == 1435): goto = None if (goto is None): goto = 24 continue goto = 23 continue if (goto == 24): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 22): goto = None if (goto == u'on_error'): goto = None if (goto is None): if (not ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(1L).value)).value): goto = 1436 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1437 continue continue if (goto == 1437): goto = None if (goto is None): helpers.assign(why, ctypes_wrapped.c_uint(2L).value) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value) if (goto == 1436): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(2L).value)).value or ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(4L).value)).value)).value): goto = 1438 continue if (not ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 1439 continue g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('error return without exception set'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 1439): goto = None if (goto == 1438): goto = None if (goto is None): if (not ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(2L).value)).value): goto = 1440 continue ctypes_wrapped.c_int(int(g.PyTraceBack_Here(f))) if (not ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1441 continue g.call_exc_trace(tstate.contents.c_tracefunc, tstate.contents.c_traceobj, f) if (goto == 1441): goto = None if (goto == 1440): goto = None if (goto is None): if (not ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(4L).value)).value): goto = 1442 continue helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 1442): goto = None if (goto == u'fast_block_end'): goto = None if (goto == 1443): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((why.value != ctypes_wrapped.c_uint(1L).value)).value and ctypes_wrapped.c_int((f.contents.f_iblock.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1444 continue b = ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(f.contents.f_blockstack, '+', ctypes_wrapped.c_uint(int((f.contents.f_iblock.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes.POINTER(g.PyTryBlock)) values.assert_a.value(ctypes_wrapped.c_int((why.value != ctypes_wrapped.c_uint(64L).value))) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(120L)).value)).value and ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(32L).value)).value)).value): goto = 1445 continue helpers.assign(why, ctypes_wrapped.c_uint(1L).value) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', ctypes.cast(retval, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value)), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1446): goto = None if (goto is None): if (not True): goto = 1447 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(retval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1449 continue pass goto = 1448 continue if (goto == 1449): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(retval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(retval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1448): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1451 continue continue goto = 1450 continue if (goto == 1451): goto = None if (goto is None): goto = 1447 continue if (goto == 1450): goto = None if (goto is None): goto = 1446 continue if (goto == 1447): goto = None if (goto is None): goto = 1444 continue if (goto == 1445): goto = None if (goto is None): helpers.postfixDec(f.contents.f_iblock) if (goto == 1452): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)) / 8)).value)).value > b.contents.b_level.value)).value): goto = 1453 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1454): goto = None if (goto is None): if (not True): goto = 1455 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1457 continue pass goto = 1456 continue if (goto == 1457): goto = None if (goto == 1458): goto = None if (goto is None): if (not True): goto = 1459 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1461 continue pass goto = 1460 continue if (goto == 1461): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1460): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1463 continue continue goto = 1462 continue if (goto == 1463): goto = None if (goto is None): goto = 1459 continue if (goto == 1462): goto = None if (goto is None): goto = 1458 continue if (goto == 1459): goto = None if (goto == 1456): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1465 continue continue goto = 1464 continue if (goto == 1465): goto = None if (goto is None): goto = 1455 continue if (goto == 1464): goto = None if (goto is None): goto = 1454 continue if (goto == 1455): goto = None if (goto is None): goto = 1452 continue if (goto == 1453): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(120L)).value)).value and ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(16L).value)).value)).value): goto = 1466 continue helpers.assign(why, ctypes_wrapped.c_uint(1L).value) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', b.contents.b_handler.value)), ctypes_wrapped.c_void_p).value or 0)) goto = 1444 continue if (goto == 1466): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(122L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(121L)).value)).value and ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(2L).value)).value)).value)).value or ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(143L)).value)).value)).value): goto = 1467 continue if (not ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(2L).value)).value): goto = 1469 continue exc = ctypes.POINTER(g.PyObject)() val = ctypes.POINTER(g.PyObject)() tb = ctypes.POINTER(g.PyObject)() g.PyErr_Fetch(ctypes.pointer(exc), ctypes.pointer(val), ctypes.pointer(tb)) if (not ctypes_wrapped.c_int(((ctypes.cast(val, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1470 continue helpers.assignPtr(val, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(val, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 1470): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(121L)).value)).value or ctypes_wrapped.c_int((b.contents.b_type.value == ctypes_wrapped.c_int(int(143L)).value)).value)).value): goto = 1471 continue g.PyErr_NormalizeException(ctypes.pointer(exc), ctypes.pointer(val), ctypes.pointer(tb)) g.set_exc_info(tstate, exc, val, tb) if (goto == 1471): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1473 continue helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)).contents goto = 1472 continue if (goto == 1473): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(tb), ctypes_wrapped.c_void_p).value or 0)).contents if (goto == 1472): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(val), ctypes_wrapped.c_void_p).value or 0)).contents helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(exc), ctypes_wrapped.c_void_p).value or 0)).contents del tb del exc del val goto = 1468 continue if (goto == 1469): goto = None if (goto is None): if (not ctypes_wrapped.c_uint((why.value & ctypes_wrapped.c_uint((ctypes_wrapped.c_uint(8L).value | ctypes_wrapped.c_uint(32L).value)).value)).value): goto = 1474 continue helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0)).contents if (goto == 1474): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(why.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.postfixIncPtr(stack_pointer), (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)).contents if (goto == 1468): goto = None if (goto is None): helpers.assign(why, ctypes_wrapped.c_uint(1L).value) helpers.assignPtr(next_instr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(first_instr, u'+', b.contents.b_handler.value)), ctypes_wrapped.c_void_p).value or 0)) goto = 1444 continue if (goto == 1467): goto = None if (goto is None): del b goto = 1443 continue if (goto == 1444): goto = None if (goto is None): if (not ctypes_wrapped.c_int((why.value != ctypes_wrapped.c_uint(1L).value)).value): goto = 1475 continue goto = 11 continue if (goto == 1475): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((why.value != ctypes_wrapped.c_uint(64L).value))) if (goto == 1476): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(stack_pointer, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(f.contents.f_valuestack, ctypes_wrapped.c_void_p).value or 0)) / 8)).value)).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1477 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(stack_pointer).contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1478): goto = None if (goto is None): if (not True): goto = 1479 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1481 continue pass goto = 1480 continue if (goto == 1481): goto = None if (goto == 1482): goto = None if (goto is None): if (not True): goto = 1483 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1485 continue pass goto = 1484 continue if (goto == 1485): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1484): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1487 continue continue goto = 1486 continue if (goto == 1487): goto = None if (goto is None): goto = 1483 continue if (goto == 1486): goto = None if (goto is None): goto = 1482 continue if (goto == 1483): goto = None if (goto == 1480): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1489 continue continue goto = 1488 continue if (goto == 1489): goto = None if (goto is None): goto = 1479 continue if (goto == 1488): goto = None if (goto is None): goto = 1478 continue if (goto == 1479): goto = None if (goto is None): goto = 1476 continue if (goto == 1477): goto = None if (goto is None): if (not ctypes_wrapped.c_int((why.value != ctypes_wrapped.c_uint(8L).value)).value): goto = 1490 continue helpers.assignPtr(retval, ctypes_wrapped.c_int(int(0L)).value) if (goto == 1490): goto = None if (goto == u'fast_yield'): goto = None if (goto is None): if (not tstate.contents.use_tracing.value): goto = 1491 continue if (not (ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0)): goto = 1492 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(8L).value)).value or ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(64L).value)).value)).value): goto = 1494 continue if (not ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_tracefunc, tstate.contents.c_traceobj, f, ctypes_wrapped.c_int(int(3L)), retval))).value): goto = 1495 continue if (goto == 1496): goto = None if (goto is None): if (not True): goto = 1497 continue if (not ctypes_wrapped.c_int(((ctypes.cast(retval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1499 continue pass goto = 1498 continue if (goto == 1499): goto = None if (goto == 1500): goto = None if (goto is None): if (not True): goto = 1501 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(retval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1503 continue pass goto = 1502 continue if (goto == 1503): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(retval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(retval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1502): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1505 continue continue goto = 1504 continue if (goto == 1505): goto = None if (goto is None): goto = 1501 continue if (goto == 1504): goto = None if (goto is None): goto = 1500 continue if (goto == 1501): goto = None if (goto == 1498): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1507 continue continue goto = 1506 continue if (goto == 1507): goto = None if (goto is None): goto = 1497 continue if (goto == 1506): goto = None if (goto is None): goto = 1496 continue if (goto == 1497): goto = None if (goto is None): helpers.assignPtr(retval, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 1495): goto = None if (goto is None): goto = 1493 continue if (goto == 1494): goto = None if (goto is None): if (not ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(2L).value)).value): goto = 1508 continue ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_tracefunc, tstate.contents.c_traceobj, f, ctypes_wrapped.c_int(int(3L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))) if (goto == 1508): goto = None if (goto == 1493): goto = None if (goto == 1492): goto = None if (goto is None): if (not (ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0)): goto = 1509 continue if (not ctypes_wrapped.c_int((why.value == ctypes_wrapped.c_uint(2L).value)).value): goto = 1511 continue ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, f, ctypes_wrapped.c_int(int(3L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))) goto = 1510 continue if (goto == 1511): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, f, ctypes_wrapped.c_int(int(3L)), retval))).value): goto = 1512 continue if (goto == 1513): goto = None if (goto is None): if (not True): goto = 1514 continue if (not ctypes_wrapped.c_int(((ctypes.cast(retval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1516 continue pass goto = 1515 continue if (goto == 1516): goto = None if (goto == 1517): goto = None if (goto is None): if (not True): goto = 1518 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(retval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1520 continue pass goto = 1519 continue if (goto == 1520): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(retval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(retval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 1519): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1522 continue continue goto = 1521 continue if (goto == 1522): goto = None if (goto is None): goto = 1518 continue if (goto == 1521): goto = None if (goto is None): goto = 1517 continue if (goto == 1518): goto = None if (goto == 1515): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 1524 continue continue goto = 1523 continue if (goto == 1524): goto = None if (goto is None): goto = 1514 continue if (goto == 1523): goto = None if (goto is None): goto = 1513 continue if (goto == 1514): goto = None if (goto is None): helpers.assignPtr(retval, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(why, ctypes_wrapped.c_uint(2L).value) if (goto == 1512): goto = None if (goto == 1510): goto = None if (goto == 1509): goto = None if (goto == 1491): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.frame.contents.f_exc_type, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1526 continue g.reset_exc_info(tstate) goto = 1525 continue if (goto == 1526): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.frame.contents.f_exc_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.frame.contents.f_exc_traceback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value))) if (goto == 1525): goto = None if (goto == u'exit_eval_frame'): goto = None if (goto is None): helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) helpers.assignPtr(tstate.contents.frame, (ctypes.cast(intp._storePtr(f.contents.f_back), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del stack_pointer del co del stream del fastlocals del names del throwflag del why del oparg del opcode del first_instr del instr_ub del consts del next_instr del tstate del instr_lb del freevars del err del f del u del t del w del v del instr_prev del x del retval return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyEval_EvalCodeEx(co, globals_a, locals_a, args, argcount, kws, kwcount, defs, defcount, closure): goto = None while True: if (goto is None): first_iteration_j = None first_iteration_i = None first_iteration_h = None first_iteration_g = None first_iteration_f = None first_iteration_e = None first_iteration_d = None first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None co = ctypes.cast(co, ctypes.POINTER(g.PyCodeObject)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(ctypes.POINTER(g.PyObject))) argcount = ctypes_wrapped.c_int(int(argcount.value)) kws = ctypes.cast(kws, ctypes.POINTER(ctypes.POINTER(g.PyObject))) kwcount = ctypes_wrapped.c_int(int(kwcount.value)) defs = ctypes.cast(defs, ctypes.POINTER(ctypes.POINTER(g.PyObject))) defcount = ctypes_wrapped.c_int(int(defcount.value)) closure = ctypes.cast(closure, ctypes.POINTER(g.PyObject)) f = ctypes.POINTER(g.PyFrameObject)() retval = ctypes.POINTER(g.PyObject)() fastlocals = ctypes.POINTER(ctypes.POINTER(g.PyObject))() freevars = ctypes.POINTER(ctypes.POINTER(g.PyObject))() tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) x = ctypes.POINTER(g.PyObject)() u = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(globals_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('PyEval_EvalCodeEx: NULL globals'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(globals_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(f, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFrame_New(tstate, co, globals_a, locals_a), ctypes.POINTER(g.PyFrameObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assignPtr(fastlocals, (ctypes.cast(intp._storePtr(f.contents.f_localsplus), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(freevars, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(f.contents.f_localsplus, u'+', co.contents.co_nlocals.value)), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((co.contents.co_argcount.value > ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(4L)).value | ctypes_wrapped.c_int(int(8L)).value))).value))).value)).value): goto = 4 continue i = ctypes_wrapped.c_int() n = ctypes_wrapped.c_int(int(argcount.value)) kwdict = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(8L)).value))).value): goto = 5 continue helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = u'fail' continue if (goto == 6): goto = None if (goto is None): helpers.assign(i, co.contents.co_argcount.value) if (not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(4L)).value))).value): goto = 7 continue helpers.postfixInc(i) if (goto == 7): goto = None if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', i.value).contents, (ctypes.cast(intp._storePtr(kwdict), ctypes_wrapped.c_void_p).value or 0)) if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue pass goto = 12 continue if (goto == 13): goto = None if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 21 continue continue goto = 20 continue if (goto == 21): goto = None if (goto is None): goto = 11 continue if (goto == 20): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 23 continue continue goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 9 continue if (goto == 22): goto = None if (goto is None): goto = 8 continue if (goto == 9): goto = None if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((argcount.value > co.contents.co_argcount.value)).value): goto = 24 continue if (not ctypes_wrapped.c_uint(int((not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(4L)).value))).value))).value): goto = 25 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes %s %d argument%s (%d given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(co.contents.co_name), ctypes.POINTER(ctypes_wrapped.c_byte)), ((ctypes_wrapped.c_byte * 8)(*intp._make_string('at most')) if defcount.value else (ctypes_wrapped.c_byte * 8)(*intp._make_string('exactly'))), co.contents.co_argcount, (ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((co.contents.co_argcount.value == ctypes_wrapped.c_int(int(1L)).value)).value else ctypes.cast(intp._make_string('s'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_int(int((argcount.value + kwcount.value)))), ctypes.POINTER(g.PyObject)) goto = u'fail' continue if (goto == 25): goto = None if (goto is None): helpers.assign(n, co.contents.co_argcount.value) if (goto == 24): goto = None if (goto is None): if (not True): goto = 26 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not first_iteration): goto = 30 continue first_iteration = False goto = 29 continue if (goto == 30): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 32 continue pass goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 31): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(args, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 33): goto = None if (goto is None): if (not True): goto = 34 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', i.value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) if (goto == 35): goto = None if (goto is None): if (not True): goto = 36 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue pass goto = 37 continue if (goto == 38): goto = None if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 44 continue continue goto = 43 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 46 continue continue goto = 45 continue if (goto == 46): goto = None if (goto is None): goto = 36 continue if (goto == 45): goto = None if (goto is None): goto = 35 continue if (goto == 36): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 34 continue if (goto == 47): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(4L)).value))).value): goto = 49 continue helpers.assignPtr(u, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int((argcount.value - n.value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue goto = u'fail' continue if (goto == 50): goto = None if (goto == 51): goto = None if (goto is None): if (not True): goto = 52 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', co.contents.co_argcount.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', co.contents.co_argcount.value).contents, (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0)) if (goto == 53): goto = None if (goto is None): if (not True): goto = 54 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue pass goto = 55 continue if (goto == 56): goto = None if (goto == 57): goto = None if (goto is None): if (not True): goto = 58 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 60 continue pass goto = 59 continue if (goto == 60): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 62 continue continue goto = 61 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 61): goto = None if (goto is None): goto = 57 continue if (goto == 58): goto = None if (goto == 55): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 64 continue continue goto = 63 continue if (goto == 64): goto = None if (goto is None): goto = 54 continue if (goto == 63): goto = None if (goto is None): goto = 53 continue if (goto == 54): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 66 continue continue goto = 65 continue if (goto == 66): goto = None if (goto is None): goto = 52 continue if (goto == 65): goto = None if (goto is None): goto = 51 continue if (goto == 52): goto = None if (goto is None): if (not True): goto = 67 continue first_iteration_a = True helpers.assign(i, n.value) if (goto == 68): goto = None if (goto is None): if (not True): goto = 69 continue if (not first_iteration_a): goto = 71 continue first_iteration_a = False goto = 70 continue if (goto == 71): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 70): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < argcount.value)).value): goto = 73 continue pass goto = 72 continue if (goto == 73): goto = None if (goto is None): goto = 69 continue if (goto == 72): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(args, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(u, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int((i.value - n.value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) goto = 68 continue if (goto == 69): goto = None if (goto == 67): goto = None if (goto == 49): goto = None if (goto is None): if (not True): goto = 74 continue first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 75): goto = None if (goto is None): if (not True): goto = 76 continue if (not first_iteration_b): goto = 78 continue first_iteration_b = False goto = 77 continue if (goto == 78): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 77): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < kwcount.value)).value): goto = 80 continue pass goto = 79 continue if (goto == 80): goto = None if (goto is None): goto = 76 continue if (goto == 79): goto = None if (goto is None): co_varnames = ctypes.POINTER(ctypes.POINTER(g.PyObject))() keyword = ctypes.cast(helpers.ptrArithmetic(kws, '+', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(2L)).value * i.value))).value).contents, ctypes.POINTER(g.PyObject)) value = ctypes.cast(helpers.ptrArithmetic(kws, '+', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(2L)).value * i.value))).value + ctypes_wrapped.c_int(int(1L)).value))).value).contents, ctypes.POINTER(g.PyObject)) j = ctypes_wrapped.c_int() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(keyword, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(keyword, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 81 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() keywords must be strings'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(co.contents.co_name), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) goto = u'fail' continue if (goto == 81): goto = None if (goto is None): helpers.assignPtr(co_varnames, (ctypes.cast(intp._storePtr(ctypes.cast(co.contents.co_varnames, ctypes.POINTER(g.PyTupleObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 82 continue first_iteration_c = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 83): goto = None if (goto is None): if (not True): goto = 84 continue if (not first_iteration_c): goto = 86 continue first_iteration_c = False goto = 85 continue if (goto == 86): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 85): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < co.contents.co_argcount.value)).value): goto = 88 continue pass goto = 87 continue if (goto == 88): goto = None if (goto is None): goto = 84 continue if (goto == 87): goto = None if (goto is None): nm = ctypes.cast(helpers.ptrArithmetic(co_varnames, '+', j.value).contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(nm, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(keyword, ctypes_wrapped.c_void_p).value or 0))).value): goto = 89 continue goto = u'kw_found' continue if (goto == 89): goto = None if (goto is None): del nm goto = 83 continue if (goto == 84): goto = None if (goto == 82): goto = None if (goto is None): if (not True): goto = 90 continue first_iteration_d = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 91): goto = None if (goto is None): if (not True): goto = 92 continue if (not first_iteration_d): goto = 94 continue first_iteration_d = False goto = 93 continue if (goto == 94): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 93): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < co.contents.co_argcount.value)).value): goto = 96 continue pass goto = 95 continue if (goto == 96): goto = None if (goto is None): goto = 92 continue if (goto == 95): goto = None if (goto is None): nm = ctypes.cast(helpers.ptrArithmetic(co_varnames, '+', j.value).contents, ctypes.POINTER(g.PyObject)) cmp_a = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(keyword, nm, ctypes_wrapped.c_int(int(2L))))).value)) if (not ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 98 continue goto = u'kw_found' continue goto = 97 continue if (goto == 98): goto = None if (goto is None): if (not ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 99 continue goto = u'fail' continue if (goto == 99): goto = None if (goto == 97): goto = None if (goto is None): del nm del cmp_a goto = 91 continue if (goto == 92): goto = None if (goto == 90): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 100 continue kwd_str = ctypes.cast(intp._getPtr(g.kwd_as_string(keyword), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not (ctypes.cast(kwd_str, ctypes_wrapped.c_void_p).value or 0)): goto = 101 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%.200s() got an unexpected keyword argument '%.400s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(co.contents.co_name), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(kwd_str), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) if (goto == 102): goto = None if (goto is None): if (not True): goto = 103 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwd_str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 105 continue pass goto = 104 continue if (goto == 105): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwd_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwd_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 104): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 107 continue continue goto = 106 continue if (goto == 107): goto = None if (goto is None): goto = 103 continue if (goto == 106): goto = None if (goto is None): goto = 102 continue if (goto == 103): goto = None if (goto == 101): goto = None if (goto is None): goto = u'fail' continue del kwd_str if (goto == 100): goto = None if (goto is None): ctypes_wrapped.c_int(int(g.PyDict_SetItem(kwdict, keyword, value))) continue if (goto == u'kw_found'): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', j.value).contents, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 108 continue kwd_str = ctypes.cast(intp._getPtr(g.kwd_as_string(keyword), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not (ctypes.cast(kwd_str, ctypes_wrapped.c_void_p).value or 0)): goto = 109 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%.200s() got multiple values for keyword argument '%.400s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(co.contents.co_name), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(kwd_str), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) if (goto == 110): goto = None if (goto is None): if (not True): goto = 111 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwd_str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 113 continue pass goto = 112 continue if (goto == 113): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwd_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwd_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 112): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 115 continue continue goto = 114 continue if (goto == 115): goto = None if (goto is None): goto = 111 continue if (goto == 114): goto = None if (goto is None): goto = 110 continue if (goto == 111): goto = None if (goto == 109): goto = None if (goto is None): goto = u'fail' continue del kwd_str if (goto == 108): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 116): goto = None if (goto is None): if (not True): goto = 117 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', j.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', j.value).contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) if (goto == 118): goto = None if (goto is None): if (not True): goto = 119 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 121 continue pass goto = 120 continue if (goto == 121): goto = None if (goto == 122): goto = None if (goto is None): if (not True): goto = 123 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 125 continue pass goto = 124 continue if (goto == 125): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 124): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 127 continue continue goto = 126 continue if (goto == 127): goto = None if (goto is None): goto = 123 continue if (goto == 126): goto = None if (goto is None): goto = 122 continue if (goto == 123): goto = None if (goto == 120): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 129 continue continue goto = 128 continue if (goto == 129): goto = None if (goto is None): goto = 119 continue if (goto == 128): goto = None if (goto is None): goto = 118 continue if (goto == 119): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 131 continue continue goto = 130 continue if (goto == 131): goto = None if (goto is None): goto = 117 continue if (goto == 130): goto = None if (goto is None): goto = 116 continue if (goto == 117): goto = None if (goto is None): del j del value del keyword del co_varnames goto = 75 continue if (goto == 76): goto = None if (goto == 74): goto = None if (goto is None): if (not ctypes_wrapped.c_int((argcount.value < co.contents.co_argcount.value)).value): goto = 132 continue m = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((co.contents.co_argcount.value - defcount.value))).value)) if (not True): goto = 133 continue first_iteration_e = True helpers.assign(i, argcount.value) if (goto == 134): goto = None if (goto is None): if (not True): goto = 135 continue if (not first_iteration_e): goto = 137 continue first_iteration_e = False goto = 136 continue if (goto == 137): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 136): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < m.value)).value): goto = 139 continue pass goto = 138 continue if (goto == 139): goto = None if (goto is None): goto = 135 continue if (goto == 138): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 140 continue j = ctypes_wrapped.c_int() given = ctypes_wrapped.c_int() if (not True): goto = 141 continue first_iteration_f = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 142): goto = None if (goto is None): if (not True): goto = 143 continue if (not first_iteration_f): goto = 145 continue first_iteration_f = False goto = 144 continue if (goto == 145): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 144): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < co.contents.co_argcount.value)).value): goto = 147 continue pass goto = 146 continue if (goto == 147): goto = None if (goto is None): goto = 143 continue if (goto == 146): goto = None if (goto is None): if (not (ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', j.value).contents, ctypes_wrapped.c_void_p).value or 0)): goto = 148 continue helpers.postfixInc(given) if (goto == 148): goto = None if (goto is None): goto = 142 continue if (goto == 143): goto = None if (goto == 141): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes %s %d argument%s (%d given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(co.contents.co_name), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(intp._make_string('at least'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(4L)).value))).value or defcount.value)).value else ctypes.cast(intp._make_string('exactly'), ctypes.POINTER(ctypes_wrapped.c_byte))), m, (ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((m.value == ctypes_wrapped.c_int(int(1L)).value)).value else ctypes.cast(intp._make_string('s'), ctypes.POINTER(ctypes_wrapped.c_byte))), given), ctypes.POINTER(g.PyObject)) goto = u'fail' continue del given del j if (goto == 140): goto = None if (goto is None): goto = 134 continue if (goto == 135): goto = None if (goto == 133): goto = None if (goto is None): if (not ctypes_wrapped.c_int((n.value > m.value)).value): goto = 150 continue helpers.assign(i, ctypes_wrapped.c_int(int((n.value - m.value))).value) goto = 149 continue if (goto == 150): goto = None if (goto is None): helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 149): goto = None if (goto is None): if (not True): goto = 151 continue first_iteration_g = True if (goto == 152): goto = None if (goto is None): if (not True): goto = 153 continue if (not first_iteration_g): goto = 155 continue first_iteration_g = False goto = 154 continue if (goto == 155): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 154): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < defcount.value)).value): goto = 157 continue pass goto = 156 continue if (goto == 157): goto = None if (goto is None): goto = 153 continue if (goto == 156): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', ctypes_wrapped.c_int(int((m.value + i.value))).value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 158 continue def_a = ctypes.cast(helpers.ptrArithmetic(defs, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(def_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 159): goto = None if (goto is None): if (not True): goto = 160 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', ctypes_wrapped.c_int(int((m.value + i.value))).value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', ctypes_wrapped.c_int(int((m.value + i.value))).value).contents, (ctypes.cast(intp._storePtr(def_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 161): goto = None if (goto is None): if (not True): goto = 162 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 164 continue pass goto = 163 continue if (goto == 164): goto = None if (goto == 165): goto = None if (goto is None): if (not True): goto = 166 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 168 continue pass goto = 167 continue if (goto == 168): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 167): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 170 continue continue goto = 169 continue if (goto == 170): goto = None if (goto is None): goto = 166 continue if (goto == 169): goto = None if (goto is None): goto = 165 continue if (goto == 166): goto = None if (goto == 163): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 172 continue continue goto = 171 continue if (goto == 172): goto = None if (goto is None): goto = 162 continue if (goto == 171): goto = None if (goto is None): goto = 161 continue if (goto == 162): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 174 continue continue goto = 173 continue if (goto == 174): goto = None if (goto is None): goto = 160 continue if (goto == 173): goto = None if (goto is None): goto = 159 continue if (goto == 160): goto = None if (goto is None): del def_a if (goto == 158): goto = None if (goto is None): goto = 152 continue if (goto == 153): goto = None if (goto == 151): goto = None if (goto is None): del m if (goto == 132): goto = None if (goto is None): del i del kwdict del n goto = 3 continue if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((argcount.value > ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((kwcount.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 175 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes no arguments (%d given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(co.contents.co_name), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int((argcount.value + kwcount.value)))), ctypes.POINTER(g.PyObject)) goto = u'fail' continue if (goto == 175): goto = None if (goto == 3): goto = None if (goto is None): if (not ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value): goto = 176 continue i = ctypes_wrapped.c_int() j = ctypes_wrapped.c_int() nargs = ctypes_wrapped.c_int() found = ctypes_wrapped.c_int() cellname = ctypes.POINTER(ctypes_wrapped.c_byte)() argname = ctypes.POINTER(ctypes_wrapped.c_byte)() c = ctypes.POINTER(g.PyObject)() helpers.assign(nargs, co.contents.co_argcount.value) if (not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(4L)).value))).value): goto = 177 continue helpers.postfixInc(nargs) if (goto == 177): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(8L)).value))).value): goto = 178 continue helpers.postfixInc(nargs) if (goto == 178): goto = None if (goto is None): if (not True): goto = 179 continue first_iteration_h = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 180): goto = None if (goto is None): if (not True): goto = 181 continue if (not first_iteration_h): goto = 183 continue first_iteration_h = False goto = 182 continue if (goto == 183): goto = None if (goto is None): helpers.prefixInc(i) if (goto == 182): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 185 continue pass goto = 184 continue if (goto == 185): goto = None if (goto is None): goto = 181 continue if (goto == 184): goto = None if (goto is None): helpers.assignPtr(cellname, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(found, ctypes_wrapped.c_int(int(0L)).value) if (not True): goto = 186 continue first_iteration_i = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 187): goto = None if (goto is None): if (not True): goto = 188 continue if (not first_iteration_i): goto = 190 continue first_iteration_i = False goto = 189 continue if (goto == 190): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 189): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < nargs.value)).value): goto = 192 continue pass goto = 191 continue if (goto == 192): goto = None if (goto is None): goto = 188 continue if (goto == 191): goto = None if (goto is None): helpers.assignPtr(argname, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(co.contents.co_varnames, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', j.value).contents, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((values.strcmp.value(cellname, argname).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 193 continue helpers.assignPtr(c, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCell_New(helpers.ptrArithmetic(fastlocals, '+', j.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(c, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 194 continue goto = u'fail' continue if (goto == 194): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', ctypes_wrapped.c_int(int((co.contents.co_nlocals.value + i.value))).value).contents, (ctypes.cast(intp._storePtr(c), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(found, ctypes_wrapped.c_int(int(1L)).value) goto = 188 continue if (goto == 193): goto = None if (goto is None): goto = 187 continue if (goto == 188): goto = None if (goto == 186): goto = None if (goto is None): if (not ctypes_wrapped.c_int((found.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 195 continue helpers.assignPtr(c, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCell_New(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(c, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 196 continue goto = u'fail' continue if (goto == 196): goto = None if (goto == 197): goto = None if (goto is None): if (not True): goto = 198 continue tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', ctypes_wrapped.c_int(int((co.contents.co_nlocals.value + i.value))).value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', ctypes_wrapped.c_int(int((co.contents.co_nlocals.value + i.value))).value).contents, (ctypes.cast(intp._storePtr(c), ctypes_wrapped.c_void_p).value or 0)) if (goto == 199): goto = None if (goto is None): if (not True): goto = 200 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 202 continue pass goto = 201 continue if (goto == 202): goto = None if (goto == 203): goto = None if (goto is None): if (not True): goto = 204 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 206 continue pass goto = 205 continue if (goto == 206): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 205): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 208 continue continue goto = 207 continue if (goto == 208): goto = None if (goto is None): goto = 204 continue if (goto == 207): goto = None if (goto is None): goto = 203 continue if (goto == 204): goto = None if (goto == 201): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 210 continue continue goto = 209 continue if (goto == 210): goto = None if (goto is None): goto = 200 continue if (goto == 209): goto = None if (goto is None): goto = 199 continue if (goto == 200): goto = None if (goto is None): del tmp if (not ctypes_wrapped.c_int(int(0L)).value): goto = 212 continue continue goto = 211 continue if (goto == 212): goto = None if (goto is None): goto = 198 continue if (goto == 211): goto = None if (goto is None): goto = 197 continue if (goto == 198): goto = None if (goto == 195): goto = None if (goto is None): goto = 180 continue if (goto == 181): goto = None if (goto == 179): goto = None if (goto is None): del c del i del j del nargs del cellname del found del argname if (goto == 176): goto = None if (goto is None): if (not ctypes.cast(co.contents.co_freevars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value): goto = 213 continue i = ctypes_wrapped.c_int() if (not True): goto = 214 continue first_iteration_j = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 215): goto = None if (goto is None): if (not True): goto = 216 continue if (not first_iteration_j): goto = 218 continue first_iteration_j = False goto = 217 continue if (goto == 218): goto = None if (goto is None): helpers.prefixInc(i) if (goto == 217): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < ctypes.cast(co.contents.co_freevars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 220 continue pass goto = 219 continue if (goto == 220): goto = None if (goto is None): goto = 216 continue if (goto == 219): goto = None if (goto is None): o = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(closure, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(freevars, '+', ctypes_wrapped.c_long(int((ctypes.cast(co.contents.co_cellvars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + i.value))).value).contents, (ctypes.cast(intp._storePtr(o), ctypes_wrapped.c_void_p).value or 0)) del o goto = 215 continue if (goto == 216): goto = None if (goto == 214): goto = None if (goto is None): del i if (goto == 213): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_int(int(32L)).value))).value): goto = 221 continue if (goto == 222): goto = None if (goto is None): if (not True): goto = 223 continue if (not ctypes_wrapped.c_int(((ctypes.cast(f.contents.f_back, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 225 continue pass goto = 224 continue if (goto == 225): goto = None if (goto == 226): goto = None if (goto is None): if (not True): goto = 227 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(f.contents.f_back, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 229 continue pass goto = 228 continue if (goto == 229): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(f.contents.f_back, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(f.contents.f_back, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 228): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 231 continue continue goto = 230 continue if (goto == 231): goto = None if (goto is None): goto = 227 continue if (goto == 230): goto = None if (goto is None): goto = 226 continue if (goto == 227): goto = None if (goto == 224): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 233 continue continue goto = 232 continue if (goto == 233): goto = None if (goto is None): goto = 223 continue if (goto == 232): goto = None if (goto is None): goto = 222 continue if (goto == 223): goto = None if (goto is None): helpers.assignPtr(f.contents.f_back, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyGen_New(f), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 221): goto = None if (goto is None): helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalFrameEx(f, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'fail'): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.prefixInc(tstate.contents.recursion_depth) if (goto == 234): goto = None if (goto is None): if (not True): goto = 235 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 237 continue pass goto = 236 continue if (goto == 237): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 236): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 239 continue continue goto = 238 continue if (goto == 239): goto = None if (goto is None): goto = 235 continue if (goto == 238): goto = None if (goto is None): goto = 234 continue if (goto == 235): goto = None if (goto is None): helpers.prefixDec(tstate.contents.recursion_depth) return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del defs del globals_a del defcount del co del f del argcount del args del locals_a del freevars del kws del u del x del kwcount del closure del retval del tstate del fastlocals return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def special_lookup(o, meth, cache): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) meth = ctypes.cast(meth, ctypes.POINTER(ctypes_wrapped.c_byte)) cache = ctypes.cast(cache, ctypes.POINTER(ctypes.POINTER(g.PyObject))) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((not (ctypes.cast(cache.contents, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(o, meth), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(o, cache.contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_LookupSpecial(o, meth, cache), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetObject(g.PyExc_AttributeError, cache.contents) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del meth del cache del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def kwd_as_string(kwd): kwd = ctypes.cast(kwd, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwd, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.postfixInc(ctypes.cast(kwd, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(kwd), ctypes_wrapped.c_void_p).value or 0) del kwd return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def set_exc_info(tstate, type_a, value, tb): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) tb = ctypes.cast(tb, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(tstate.contents.frame, ctypes.POINTER(g.PyFrameObject)) tmp_type = ctypes.POINTER(g.PyObject)() tmp_value = ctypes.POINTER(g.PyObject)() tmp_tb = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(frame, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_exc_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_exc_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_exc_traceback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(tstate.contents.exc_type, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(tstate.contents.exc_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(tstate.contents.exc_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_traceback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(tstate.contents.exc_traceback, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(frame.contents.f_exc_type, (ctypes.cast(intp._storePtr(tstate.contents.exc_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(frame.contents.f_exc_value, (ctypes.cast(intp._storePtr(tstate.contents.exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(frame.contents.f_exc_traceback, (ctypes.cast(intp._storePtr(tstate.contents.exc_traceback), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_type, (ctypes.cast(intp._storePtr(tstate.contents.exc_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_value, (ctypes.cast(intp._storePtr(tstate.contents.exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_tb, (ctypes.cast(intp._storePtr(tstate.contents.exc_traceback), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.exc_type, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.exc_value, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.exc_traceback, (ctypes.cast(intp._storePtr(tb), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_type'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_value'), ctypes.POINTER(ctypes_wrapped.c_byte)), value))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_traceback'), ctypes.POINTER(ctypes_wrapped.c_byte)), tb))) del tmp_value del type_a del tmp_tb del frame del tmp_type del value del tb del tstate return @staticmethod def reset_exc_info(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) frame = ctypes.POINTER(g.PyFrameObject)() tmp_type = ctypes.POINTER(g.PyObject)() tmp_value = ctypes.POINTER(g.PyObject)() tmp_tb = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(frame, (ctypes.cast(intp._storePtr(tstate.contents.frame), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(frame, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_exc_type, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(tmp_type, (ctypes.cast(intp._storePtr(tstate.contents.exc_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_value, (ctypes.cast(intp._storePtr(tstate.contents.exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_tb, (ctypes.cast(intp._storePtr(tstate.contents.exc_traceback), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(frame.contents.f_exc_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_exc_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(frame.contents.f_exc_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_exc_traceback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(frame.contents.f_exc_traceback, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.exc_type, (ctypes.cast(intp._storePtr(frame.contents.f_exc_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.exc_value, (ctypes.cast(intp._storePtr(frame.contents.f_exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.exc_traceback, (ctypes.cast(intp._storePtr(frame.contents.f_exc_traceback), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_type'), ctypes.POINTER(ctypes_wrapped.c_byte)), frame.contents.f_exc_type))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_value'), ctypes.POINTER(ctypes_wrapped.c_byte)), frame.contents.f_exc_value))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_traceback'), ctypes.POINTER(ctypes_wrapped.c_byte)), frame.contents.f_exc_traceback))) helpers.assignPtr(tmp_type, (ctypes.cast(intp._storePtr(frame.contents.f_exc_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_value, (ctypes.cast(intp._storePtr(frame.contents.f_exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_tb, (ctypes.cast(intp._storePtr(frame.contents.f_exc_traceback), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(frame.contents.f_exc_type, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(frame.contents.f_exc_value, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(frame.contents.f_exc_traceback, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tmp_value del frame del tstate del tmp_type del tmp_tb return @staticmethod def do_raise(type_a, value, tb): goto = None while True: if (goto is None): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) tb = ctypes.cast(tb, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(tstate.contents.exc_type, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr(tstate.contents.exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tb, (ctypes.cast(intp._storePtr(tstate.contents.exc_traceback), ctypes_wrapped.c_void_p).value or 0)) if (goto == 2): goto = None if (goto is None): if (not True): goto = 3 continue if (not ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 5 continue pass goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 7 continue continue goto = 6 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 6): goto = None if (goto is None): goto = 2 continue if (goto == 3): goto = None if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 13 continue continue goto = 12 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 9): goto = None if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto is None): del tstate if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 21 continue if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue pass goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 27 continue continue goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.assignPtr(tb, ctypes_wrapped.c_int(int(0L)).value) goto = 20 continue if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTraceBack_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value): goto = 28 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('raise: arg 3 must be a traceback or None'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'raise_error' continue if (goto == 28): goto = None if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 29 continue helpers.assignPtr(value, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 29): goto = None if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyTuple_Size(type_a))).value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 31 continue tmp = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(type_a, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): del tmp goto = 30 continue if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)).contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 39 continue g.PyErr_NormalizeException(ctypes.pointer(type_a), ctypes.pointer(value), ctypes.pointer(tb)) if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(value.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((value.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 40 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("calling %s() should have returned an instance of BaseException, not '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)).contents.tp_name, ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'raise_error' continue if (goto == 40): goto = None if (goto is None): goto = 38 continue if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 42 continue if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 44 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('instance exception may not have a separate value'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'raise_error' continue goto = 43 continue if (goto == 44): goto = None if (goto == 45): goto = None if (goto is None): if (not True): goto = 46 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue pass goto = 47 continue if (goto == 48): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 47): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 50 continue continue goto = 49 continue if (goto == 50): goto = None if (goto is None): goto = 46 continue if (goto == 49): goto = None if (goto is None): goto = 45 continue if (goto == 46): goto = None if (goto is None): helpers.assignPtr(value, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyInstanceObject)).contents.in_class, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value else ctypes.cast(ctypes.cast(type_a.contents.ob_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 43): goto = None if (goto is None): goto = 41 continue if (goto == 42): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('exceptions must be old-style classes or derived from BaseException, not %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'raise_error' continue if (goto == 41): goto = None if (goto == 38): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)).contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value))) if (not ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 51 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('exceptions must derive from BaseException in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 52 continue goto = u'raise_error' continue if (goto == 52): goto = None if (goto == 51): goto = None if (goto is None): g.PyErr_Restore(type_a, value, tb) if (not ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 54 continue return ctypes_wrapped.c_uint(2L).value goto = 53 continue if (goto == 54): goto = None if (goto is None): return ctypes_wrapped.c_uint(4L).value if (goto == 53): goto = None if (goto == u'raise_error'): goto = None if (goto == 55): goto = None if (goto is None): if (not True): goto = 56 continue if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 58 continue pass goto = 57 continue if (goto == 58): goto = None if (goto == 59): goto = None if (goto is None): if (not True): goto = 60 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 62 continue pass goto = 61 continue if (goto == 62): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 61): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 64 continue continue goto = 63 continue if (goto == 64): goto = None if (goto is None): goto = 60 continue if (goto == 63): goto = None if (goto is None): goto = 59 continue if (goto == 60): goto = None if (goto == 57): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 66 continue continue goto = 65 continue if (goto == 66): goto = None if (goto is None): goto = 56 continue if (goto == 65): goto = None if (goto is None): goto = 55 continue if (goto == 56): goto = None if (goto == 67): goto = None if (goto is None): if (not True): goto = 68 continue if (not ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 70 continue pass goto = 69 continue if (goto == 70): goto = None if (goto == 71): goto = None if (goto is None): if (not True): goto = 72 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 74 continue pass goto = 73 continue if (goto == 74): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 73): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 76 continue continue goto = 75 continue if (goto == 76): goto = None if (goto is None): goto = 72 continue if (goto == 75): goto = None if (goto is None): goto = 71 continue if (goto == 72): goto = None if (goto == 69): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 78 continue continue goto = 77 continue if (goto == 78): goto = None if (goto is None): goto = 68 continue if (goto == 77): goto = None if (goto is None): goto = 67 continue if (goto == 68): goto = None if (goto == 79): goto = None if (goto is None): if (not True): goto = 80 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 82 continue pass goto = 81 continue if (goto == 82): goto = None if (goto == 83): goto = None if (goto is None): if (not True): goto = 84 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 86 continue pass goto = 85 continue if (goto == 86): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 85): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 88 continue continue goto = 87 continue if (goto == 88): goto = None if (goto is None): goto = 84 continue if (goto == 87): goto = None if (goto is None): goto = 83 continue if (goto == 84): goto = None if (goto == 81): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 90 continue continue goto = 89 continue if (goto == 90): goto = None if (goto is None): goto = 80 continue if (goto == 89): goto = None if (goto is None): goto = 79 continue if (goto == 80): goto = None if (goto is None): return ctypes_wrapped.c_uint(2L).value del type_a del tb del value return ctypes_wrapped.c_uint().value break @staticmethod def unpack_iterable(v, argcnt, sp): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) argcnt = ctypes_wrapped.c_int(int(argcnt.value)) sp = ctypes.cast(sp, ctypes.POINTER(ctypes.POINTER(g.PyObject))) i = ctypes_wrapped.c_int() it = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue goto = u'Error' continue if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue first_iteration = True if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 6 continue first_iteration = False goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < argcnt.value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue if (not ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 10 continue intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('need more than %d value%s to unpack'), ctypes.POINTER(ctypes_wrapped.c_byte)), i, (ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int(1L)).value)).value else ctypes.cast(intp._make_string('s'), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes.POINTER(g.PyObject)) if (goto == 10): goto = None if (goto is None): goto = u'Error' continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(helpers.prefixDecPtr(sp).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto is None): helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 12 continue goto = u'Error' continue if (goto == 12): goto = None if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto is None): return ctypes_wrapped.c_int(int(1L)).value if (goto == 11): goto = None if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 24 continue continue goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto is None): g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('too many values to unpack'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == u'Error'): goto = None if (goto is None): if (not True): goto = 25 continue first_iteration_a = True if (goto == 26): goto = None if (goto is None): if (not True): goto = 27 continue if (not first_iteration_a): goto = 29 continue first_iteration_a = False goto = 28 continue if (goto == 29): goto = None if (goto is None): (helpers.postfixDec(i), helpers.postfixIncPtr(sp))[1] if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 31 continue pass goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 30): goto = None if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sp.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sp.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sp.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): goto = 26 continue if (goto == 27): goto = None if (goto == 25): goto = None if (goto == 38): goto = None if (goto is None): if (not True): goto = 39 continue if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 41 continue pass goto = 40 continue if (goto == 41): goto = None if (goto == 42): goto = None if (goto is None): if (not True): goto = 43 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue pass goto = 44 continue if (goto == 45): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 44): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 47 continue continue goto = 46 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 46): goto = None if (goto is None): goto = 42 continue if (goto == 43): goto = None if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 49 continue continue goto = 48 continue if (goto == 49): goto = None if (goto is None): goto = 39 continue if (goto == 48): goto = None if (goto is None): goto = 38 continue if (goto == 39): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del sp del i del argcnt del it del w del v return ctypes_wrapped.c_int().value break @staticmethod def call_exc_trace(func, self, f): func = ctypes.cast(func, g.Py_tracefunc) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) f = ctypes.cast(f, ctypes.POINTER(g.PyFrameObject)) type_a = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() traceback = ctypes.POINTER(g.PyObject)() arg = ctypes.POINTER(g.PyObject)() err = ctypes_wrapped.c_int() g.PyErr_Fetch(ctypes.pointer(type_a), ctypes.pointer(value), ctypes.pointer(traceback)) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(value, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value)), type_a, value, traceback), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Restore(type_a, value, traceback) return helpers.assign(err, ctypes_wrapped.c_int(int(g.call_trace(func, self, f, ctypes_wrapped.c_int(int(1L)), arg))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Restore(type_a, value, traceback) else: while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(traceback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(traceback, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(traceback, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(traceback, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del type_a del err del f del self del traceback del value del func del arg return @staticmethod def call_trace_protected(func, obj, frame, what, arg): func = ctypes.cast(func, g.Py_tracefunc) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(frame, ctypes.POINTER(g.PyFrameObject)) what = ctypes_wrapped.c_int(int(what.value)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) type_a = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() traceback = ctypes.POINTER(g.PyObject)() err = ctypes_wrapped.c_int() g.PyErr_Fetch(ctypes.pointer(type_a), ctypes.pointer(value), ctypes.pointer(traceback)) helpers.assign(err, ctypes_wrapped.c_int(int(g.call_trace(func, obj, frame, what, arg))).value) if ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Restore(type_a, value, traceback) return ctypes_wrapped.c_int(int(0L)).value else: while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(traceback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(traceback, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(traceback, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(traceback, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del type_a del obj del err del frame del traceback del what del value del func del arg return ctypes_wrapped.c_int().value @staticmethod def call_trace(func, obj, frame, what, arg): func = ctypes.cast(func, g.Py_tracefunc) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(frame, ctypes.POINTER(g.PyFrameObject)) what = ctypes_wrapped.c_int(int(what.value)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(frame.contents.f_tstate, ctypes.POINTER(g.PyThreadState)) result = ctypes_wrapped.c_int() if tstate.contents.tracing.value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(tstate.contents.tracing) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(result, helpers.checkedFuncPtrCall(func, obj, frame, what, arg).value) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value) helpers.postfixDec(tstate.contents.tracing) return result.value del what del obj del frame del result del func del arg del tstate return ctypes_wrapped.c_int().value @staticmethod def _PyEval_CallTracing(func, args): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(intp._getPtr(g.PyEval_GetFrame(), ctypes.POINTER(structs._frame)), ctypes.POINTER(g.PyFrameObject)) tstate = ctypes.cast(frame.contents.f_tstate, ctypes.POINTER(g.PyThreadState)) save_tracing = ctypes_wrapped.c_int(int(tstate.contents.tracing.value)) save_use_tracing = ctypes_wrapped.c_int(int(tstate.contents.use_tracing.value)) result = ctypes.POINTER(g.PyObject)() helpers.assign(tstate.contents.tracing, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(tstate.contents.tracing, save_tracing.value) helpers.assign(tstate.contents.use_tracing, save_use_tracing.value) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del save_use_tracing del save_tracing del frame del args del result del func del tstate return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def maybe_call_line_trace(func, obj, frame, instr_lb, instr_ub, instr_prev): func = ctypes.cast(func, g.Py_tracefunc) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(frame, ctypes.POINTER(g.PyFrameObject)) instr_lb = ctypes.cast(instr_lb, ctypes.POINTER(ctypes_wrapped.c_int)) instr_ub = ctypes.cast(instr_ub, ctypes.POINTER(ctypes_wrapped.c_int)) instr_prev = ctypes.cast(instr_prev, ctypes.POINTER(ctypes_wrapped.c_int)) result = ctypes_wrapped.c_int() line = ctypes_wrapped.c_int(int(frame.contents.f_lineno.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((frame.contents.f_lasti.value < instr_lb.contents.value)).value or ctypes_wrapped.c_int((frame.contents.f_lasti.value >= instr_ub.contents.value)).value)).value: bounds = g.PyAddrPair() helpers.assign(line, ctypes_wrapped.c_int(int(g._PyCode_CheckLineNumber(frame.contents.f_code, frame.contents.f_lasti, ctypes.pointer(bounds)))).value) helpers.assign(instr_lb.contents, bounds.ap_lower.value) helpers.assign(instr_ub.contents, bounds.ap_upper.value) del bounds if ctypes_wrapped.c_int((ctypes_wrapped.c_int((frame.contents.f_lasti.value == instr_lb.contents.value)).value or ctypes_wrapped.c_int((frame.contents.f_lasti.value < instr_prev.contents.value)).value)).value: helpers.assign(frame.contents.f_lineno, line.value) helpers.assign(result, ctypes_wrapped.c_int(int(g.call_trace(func, obj, frame, ctypes_wrapped.c_int(int(2L)), ctypes.pointer(g._Py_NoneStruct)))).value) helpers.assign(instr_prev.contents, frame.contents.f_lasti.value) return result.value del obj del frame del instr_ub del result del func del instr_prev del line del instr_lb return ctypes_wrapped.c_int().value @staticmethod def PyEval_SetProfile(func, arg): func = ctypes.cast(func, g.Py_tracefunc) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) temp = ctypes.cast(tstate.contents.c_profileobj, ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.c_profilefunc, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_profileobj, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.c_profilefunc, (ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.c_profileobj, (ctypes.cast(intp._storePtr(arg), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value) del temp del tstate del func del arg return @staticmethod def PyEval_SetTrace(func, arg): func = ctypes.cast(func, g.Py_tracefunc) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) temp = ctypes.cast(tstate.contents.c_traceobj, ctypes.POINTER(g.PyObject)) helpers.augAssign(g._Py_TracingPossible, u'+=', ctypes_wrapped.c_byte(int((ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value - ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_tracefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value))).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.c_tracefunc, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_traceobj, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.c_tracefunc, (ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.c_traceobj, (ctypes.cast(intp._storePtr(arg), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value) del temp del tstate del func del arg return @staticmethod def PyEval_GetBuiltins(): current_frame = ctypes.cast(intp._getPtr(g.PyEval_GetFrame(), ctypes.POINTER(structs._frame)), ctypes.POINTER(g.PyFrameObject)) if ctypes_wrapped.c_int(((ctypes.cast(current_frame, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(g._PyThreadState_Current.contents.interp.contents.builtins), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(current_frame.contents.f_builtins), ctypes_wrapped.c_void_p).value or 0) del current_frame return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_GetLocals(): current_frame = ctypes.cast(intp._getPtr(g.PyEval_GetFrame(), ctypes.POINTER(structs._frame)), ctypes.POINTER(g.PyFrameObject)) if ctypes_wrapped.c_int(((ctypes.cast(current_frame, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value g.PyFrame_FastToLocals(current_frame) return (ctypes.cast(intp._storePtr(current_frame.contents.f_locals), ctypes_wrapped.c_void_p).value or 0) del current_frame return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_GetGlobals(): current_frame = ctypes.cast(intp._getPtr(g.PyEval_GetFrame(), ctypes.POINTER(structs._frame)), ctypes.POINTER(g.PyFrameObject)) if ctypes_wrapped.c_int(((ctypes.cast(current_frame, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value else: return (ctypes.cast(intp._storePtr(current_frame.contents.f_globals), ctypes_wrapped.c_void_p).value or 0) del current_frame return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_GetFrame(): tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(g._PyThreadState_GetFrame, tstate), ctypes.POINTER(structs._frame))), ctypes_wrapped.c_void_p).value or 0) del tstate return (ctypes.cast(ctypes.POINTER(g.PyFrameObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_GetRestricted(): current_frame = ctypes.cast(intp._getPtr(g.PyEval_GetFrame(), ctypes.POINTER(g.PyFrameObject)), ctypes.POINTER(g.PyFrameObject)) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value)) if ctypes_wrapped.c_int(((ctypes.cast(current_frame, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(((ctypes.cast(current_frame.contents.f_builtins, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(current_frame.contents.f_tstate.contents.interp.contents.builtins, ctypes_wrapped.c_void_p).value or 0))).value))).value del current_frame return ctypes_wrapped.c_int().value @staticmethod def PyEval_MergeCompilerFlags(cf): cf = ctypes.cast(cf, ctypes.POINTER(g.PyCompilerFlags)) current_frame = ctypes.cast(intp._getPtr(g.PyEval_GetFrame(), ctypes.POINTER(g.PyFrameObject)), ctypes.POINTER(g.PyFrameObject)) result = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((cf.contents.cf_flags.value != ctypes_wrapped.c_int(int(0L)).value)).value)) if ctypes_wrapped.c_int(((ctypes.cast(current_frame, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: codeflags = ctypes_wrapped.c_int(int(current_frame.contents.f_code.contents.co_flags.value)) compilerflags = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((codeflags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8192L)).value | ctypes_wrapped.c_int(int(16384L)).value))).value | ctypes_wrapped.c_int(int(32768L)).value))).value | ctypes_wrapped.c_int(int(65536L)).value))).value | ctypes_wrapped.c_int(int(131072L)).value))).value))).value)) if compilerflags.value: helpers.assign(result, ctypes_wrapped.c_int(int(1L)).value) helpers.augAssign(cf.contents.cf_flags, u'|=', compilerflags.value) del compilerflags del codeflags return result.value del current_frame del cf del result return ctypes_wrapped.c_int().value @staticmethod def Py_FlushLine(): f = ctypes.cast(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyFile_SoftSpace(f, ctypes_wrapped.c_int(int(0L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value del f return ctypes_wrapped.c_int().value @staticmethod def PyEval_CallObjectWithKeywords(func, arg, kw): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) kw = ctypes.cast(kw, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value elif ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('argument list must be a tuple'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value else: helpers.postfixInc(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kw, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kw, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('keyword list must be a dictionary'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, arg, kw), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del kw del result del func del arg return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_GetFuncName(func): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyMethod_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_GetFuncName(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_func), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(ctypes.cast(func, ctypes.POINTER(g.PyFunctionObject)).contents.func_name), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_name), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(ctypes.cast(func, ctypes.POINTER(g.PyClassObject)).contents.cl_name), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(ctypes.cast(func, ctypes.POINTER(g.PyInstanceObject)).contents.in_class.contents.cl_name), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(func.contents.ob_type.contents.tp_name), ctypes_wrapped.c_void_p).value or 0) del func return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_GetFuncDesc(func): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyMethod_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._make_string('()')), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._make_string('()')), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._make_string('()')), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._make_string(' constructor')), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._make_string(' instance')), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._make_string(' object')), ctypes_wrapped.c_void_p).value or 0) del func return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def err_args(func, flags, nargs): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) flags = ctypes_wrapped.c_int(int(flags.value)) nargs = ctypes_wrapped.c_int(int(nargs.value)) if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(4L)).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes no arguments (%d given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_name, nargs), ctypes.POINTER(g.PyObject)) else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes exactly one argument (%d given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_name, nargs), ctypes.POINTER(g.PyObject)) del nargs del flags del func return @staticmethod def call_function(pp_stack, oparg): pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) oparg = ctypes_wrapped.c_int(int(oparg.value)) na = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((oparg.value & ctypes_wrapped.c_int(int(255L)).value))).value)) nk = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int((oparg.value >> ctypes_wrapped.c_int(int(8L)).value))).value & ctypes_wrapped.c_int(int(255L)).value))).value)) n = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((na.value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(2L)).value * nk.value))).value))).value)) pfunc = ctypes.cast(helpers.ptrArithmetic(helpers.ptrArithmetic(pp_stack.contents, u'-', n.value), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(ctypes.POINTER(g.PyObject))) func = ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)) x = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((nk.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: flags = ctypes_wrapped.c_int(int(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_flags.value)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(4L)).value | ctypes_wrapped.c_int(int(8L)).value))).value))).value: meth = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_meth, g.PyCFunction) self = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_self, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(4L)).value))).value and ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: if ctypes_wrapped.c_int((tstate.contents.use_tracing.value and (ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(4L)), func))).value: helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(5L)), func))) elif ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(6L)), func))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(8L)).value))).value and ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value: arg = ctypes.cast(helpers.prefixDecPtr(pp_stack.contents).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((tstate.contents.use_tracing.value and (ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(4L)), func))).value: helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(5L)), func))) elif ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(6L)), func))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(arg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del arg else: g.err_args(func, flags, na) helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) del meth del self else: callargs = ctypes.POINTER(g.PyObject)() helpers.assignPtr(callargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.load_args(pp_stack, na), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((tstate.contents.use_tracing.value and (ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(4L)), func))).value: helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_Call(func, callargs, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(5L)), func))) elif ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(6L)), func))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_Call(func, callargs, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(callargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del callargs del flags del tstate else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(func.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyMethod_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_self, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: self = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_self, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(func, (ctypes.cast(intp._storePtr(ctypes.cast(func, ctypes.POINTER(g.PyMethodObject)).contents.im_func), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pfunc.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(pfunc.contents, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(na) helpers.postfixInc(n) del self else: helpers.postfixInc(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.fast_function(func, pp_stack, n, na, nk), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.do_call(func, pp_stack, na, nk), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while ctypes_wrapped.c_int(((ctypes.cast(pp_stack.contents, ctypes_wrapped.c_void_p).value or 0) > (ctypes.cast(pfunc, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(pp_stack.contents).contents), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) del nk del w del pfunc del na del n del oparg del pp_stack del func del x return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def fast_function(func, pp_stack, n, na, nk): first_iteration = None func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) n = ctypes_wrapped.c_int(int(n.value)) na = ctypes_wrapped.c_int(int(na.value)) nk = ctypes_wrapped.c_int(int(nk.value)) co = ctypes.cast(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyFunctionObject)).contents.func_code, ctypes.POINTER(g.PyCodeObject)), ctypes.POINTER(g.PyCodeObject)) globals_a = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyFunctionObject)).contents.func_globals, ctypes.POINTER(g.PyObject)) argdefs = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyFunctionObject)).contents.func_defaults, ctypes.POINTER(g.PyObject)) d = ctypes.POINTER(ctypes.POINTER(g.PyObject))() nd = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(argdefs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((co.contents.co_argcount.value == n.value)).value)).value and ctypes_wrapped.c_int((nk.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((co.contents.co_flags.value == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value | ctypes_wrapped.c_int(int(64L)).value))).value)).value)).value: f = ctypes.POINTER(g.PyFrameObject)() retval = ctypes.POINTER(g.PyObject)() tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) fastlocals = ctypes.POINTER(ctypes.POINTER(g.PyObject))() stack = ctypes.POINTER(ctypes.POINTER(g.PyObject))() i = ctypes_wrapped.c_int() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(globals_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(f, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFrame_New(tstate, co, globals_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyFrameObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(fastlocals, (ctypes.cast(intp._storePtr(f.contents.f_localsplus), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(stack, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(pp_stack.contents, u'-', n.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.postfixInc(ctypes.cast(stack.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', i.value).contents, (ctypes.cast(intp._storePtr(helpers.postfixIncPtr(stack).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalFrameEx(f, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixInc(tstate.contents.recursion_depth) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.prefixDec(tstate.contents.recursion_depth) return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del f del i del fastlocals del tstate del retval del stack if ctypes_wrapped.c_int(((ctypes.cast(argdefs, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(d, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(argdefs, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(nd, ctypes.cast(argdefs, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalCodeEx(co, globals_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), helpers.ptrArithmetic(pp_stack.contents, u'-', n.value), na, helpers.ptrArithmetic(pp_stack.contents, u'-', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(2L)).value * nk.value))).value), nk, d, nd, ctypes.cast(func, ctypes.POINTER(g.PyFunctionObject)).contents.func_closure), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del globals_a del nk del co del d del na del nd del n del pp_stack del func del argdefs return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def update_keyword_args(orig_kwdict, nk, pp_stack, func): orig_kwdict = ctypes.cast(orig_kwdict, ctypes.POINTER(g.PyObject)) nk = ctypes_wrapped.c_int(int(nk.value)) pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) kwdict = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(orig_kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Copy(orig_kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(orig_kwdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(orig_kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(orig_kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value while ctypes_wrapped.c_int((helpers.prefixDec(nk).value >= ctypes_wrapped.c_int(int(0L)).value)).value: err = ctypes_wrapped.c_int() value = ctypes.cast(helpers.prefixDecPtr(pp_stack.contents).contents, ctypes.POINTER(g.PyObject)) key = ctypes.cast(helpers.prefixDecPtr(pp_stack.contents).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItem(kwdict, key), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%.200s%s got multiple values for keyword argument '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyEval_GetFuncName(func), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyEval_GetFuncDesc(func), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(key), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(kwdict, key, value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if err.value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del key del value del err return (ctypes.cast(intp._storePtr(kwdict), ctypes_wrapped.c_void_p).value or 0) del nk del kwdict del pp_stack del func del orig_kwdict return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def update_star_args(nstack, nstar, stararg, pp_stack): first_iteration = None nstack = ctypes_wrapped.c_int(int(nstack.value)) nstar = ctypes_wrapped.c_int(int(nstar.value)) stararg = ctypes.cast(stararg, ctypes.POINTER(g.PyObject)) pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) callargs = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() helpers.assignPtr(callargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int((nstack.value + nstar.value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(callargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if nstar.value: i = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < nstar.value)).value: pass else: break a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(stararg, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(callargs, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int((nstack.value + i.value))).value).contents, (ctypes.cast(intp._storePtr(a), ctypes_wrapped.c_void_p).value or 0)) del a del i while ctypes_wrapped.c_int((helpers.prefixDec(nstack).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(pp_stack.contents).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(callargs, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', nstack.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(callargs), ctypes_wrapped.c_void_p).value or 0) del nstar del nstack del stararg del pp_stack del w del callargs return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def load_args(pp_stack, na): pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) na = ctypes_wrapped.c_int(int(na.value)) args = ctypes.cast(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(na.value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) w = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value while ctypes_wrapped.c_int((helpers.prefixDec(na).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(w, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(pp_stack.contents).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', na.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(args), ctypes_wrapped.c_void_p).value or 0) del na del args del pp_stack del w return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_call(func, pp_stack, na, nk): goto = None while True: if (goto is None): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) na = ctypes_wrapped.c_int(int(na.value)) nk = ctypes_wrapped.c_int(int(nk.value)) callargs = ctypes.POINTER(g.PyObject)() kwdict = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((nk.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.update_keyword_args(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), nk, pp_stack, func), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue goto = u'call_fail' continue if (goto == 2): goto = None if (goto == 1): goto = None if (goto is None): helpers.assignPtr(callargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.load_args(pp_stack, na), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(callargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'call_fail' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if (not ctypes_wrapped.c_int((tstate.contents.use_tracing.value and (ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0))).value): goto = 7 continue if (not ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(4L)), func))).value): goto = 9 continue helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_Call(func, callargs, kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(5L)), func))) goto = 11 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(6L)), func))).value): goto = 13 continue if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto is None): helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) if (goto == 13): goto = None if (goto == 11): goto = None if (goto == 10): goto = None if (goto == 8): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_Call(func, callargs, kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 6): goto = None if (goto is None): del tstate goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, callargs, kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto == u'call_fail'): goto = None if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not ctypes_wrapped.c_int(((ctypes.cast(callargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto == 24): goto = None if (goto is None): if (not True): goto = 25 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue pass goto = 26 continue if (goto == 27): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 29 continue continue goto = 28 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 25): goto = None if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 31 continue continue goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 21 continue if (goto == 30): goto = None if (goto is None): goto = 20 continue if (goto == 21): goto = None if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 43 continue continue goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 33 continue if (goto == 42): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del nk del kwdict del na del pp_stack del func del callargs del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def ext_do_call(func, pp_stack, flags, na, nk): goto = None while True: if (goto is None): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) pp_stack = ctypes.cast(pp_stack, ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(g.PyObject)))) flags = ctypes_wrapped.c_int(int(flags.value)) na = ctypes_wrapped.c_int(int(na.value)) nk = ctypes_wrapped.c_int(int(nk.value)) nstar = ctypes_wrapped.c_int() callargs = ctypes.POINTER(g.PyObject)() stararg = ctypes.POINTER(g.PyObject)() kwdict = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(2L)).value))).value): goto = 1 continue helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(pp_stack.contents).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue d = ctypes.POINTER(g.PyObject)() helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'ext_call_fail' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_Update(d, kwdict))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value): goto = 11 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s%.200s argument after ** must be a mapping, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyEval_GetFuncName(func), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyEval_GetFuncDesc(func), ctypes.POINTER(ctypes_wrapped.c_byte)), kwdict.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 11): goto = None if (goto is None): goto = u'ext_call_fail' continue if (goto == 4): goto = None if (goto == 12): goto = None if (goto is None): if (not True): goto = 13 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(d), ctypes_wrapped.c_void_p).value or 0)) del d if (goto == 2): goto = None if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(1L)).value))).value): goto = 18 continue helpers.assignPtr(stararg, (ctypes.cast(intp._storePtr(helpers.prefixDecPtr(pp_stack.contents).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(stararg, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 19 continue t = ctypes.POINTER(g.PyObject)() helpers.assignPtr(t, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Tuple(stararg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(t, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue if (not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value): goto = 21 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s%.200s argument after * must be a sequence, not %200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyEval_GetFuncName(func), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyEval_GetFuncDesc(func), ctypes.POINTER(ctypes_wrapped.c_byte)), stararg.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 21): goto = None if (goto is None): goto = u'ext_call_fail' continue if (goto == 20): goto = None if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(stararg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue pass goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(stararg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(stararg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 27 continue continue goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.assignPtr(stararg, (ctypes.cast(intp._storePtr(t), ctypes_wrapped.c_void_p).value or 0)) del t if (goto == 19): goto = None if (goto is None): helpers.assign(nstar, ctypes.cast(stararg, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (goto == 18): goto = None if (goto is None): if (not ctypes_wrapped.c_int((nk.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue helpers.assignPtr(kwdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.update_keyword_args(kwdict, nk, pp_stack, func), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 29 continue goto = u'ext_call_fail' continue if (goto == 29): goto = None if (goto == 28): goto = None if (goto is None): helpers.assignPtr(callargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.update_star_args(na, nstar, stararg, pp_stack), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(callargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue goto = u'ext_call_fail' continue if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 32 continue tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if (not ctypes_wrapped.c_int((tstate.contents.use_tracing.value and (ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0))).value): goto = 34 continue if (not ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(4L)), func))).value): goto = 36 continue helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) goto = 35 continue if (goto == 36): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_Call(func, callargs, kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.c_profilefunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 37 continue if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue ctypes_wrapped.c_int(int(g.call_trace_protected(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(5L)), func))) goto = 38 continue if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.call_trace(tstate.contents.c_profilefunc, tstate.contents.c_profileobj, tstate.contents.frame, ctypes_wrapped.c_int(int(6L)), func))).value): goto = 40 continue if (goto == 41): goto = None if (goto is None): if (not True): goto = 42 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue pass goto = 43 continue if (goto == 44): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 46 continue continue goto = 45 continue if (goto == 46): goto = None if (goto is None): goto = 42 continue if (goto == 45): goto = None if (goto is None): goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) if (goto == 40): goto = None if (goto == 38): goto = None if (goto == 37): goto = None if (goto == 35): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_Call(func, callargs, kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 33): goto = None if (goto is None): del tstate goto = 31 continue if (goto == 32): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, callargs, kwdict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 31): goto = None if (goto == u'ext_call_fail'): goto = None if (goto == 47): goto = None if (goto is None): if (not True): goto = 48 continue if (not ctypes_wrapped.c_int(((ctypes.cast(callargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue pass goto = 49 continue if (goto == 50): goto = None if (goto == 51): goto = None if (goto is None): if (not True): goto = 52 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 54 continue pass goto = 53 continue if (goto == 54): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(callargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 53): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 56 continue continue goto = 55 continue if (goto == 56): goto = None if (goto is None): goto = 52 continue if (goto == 55): goto = None if (goto is None): goto = 51 continue if (goto == 52): goto = None if (goto == 49): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 58 continue continue goto = 57 continue if (goto == 58): goto = None if (goto is None): goto = 48 continue if (goto == 57): goto = None if (goto is None): goto = 47 continue if (goto == 48): goto = None if (goto == 59): goto = None if (goto is None): if (not True): goto = 60 continue if (not ctypes_wrapped.c_int(((ctypes.cast(kwdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 62 continue pass goto = 61 continue if (goto == 62): goto = None if (goto == 63): goto = None if (goto is None): if (not True): goto = 64 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 66 continue pass goto = 65 continue if (goto == 66): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kwdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 65): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 68 continue continue goto = 67 continue if (goto == 68): goto = None if (goto is None): goto = 64 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 64): goto = None if (goto == 61): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 70 continue continue goto = 69 continue if (goto == 70): goto = None if (goto is None): goto = 60 continue if (goto == 69): goto = None if (goto is None): goto = 59 continue if (goto == 60): goto = None if (goto == 71): goto = None if (goto is None): if (not True): goto = 72 continue if (not ctypes_wrapped.c_int(((ctypes.cast(stararg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 74 continue pass goto = 73 continue if (goto == 74): goto = None if (goto == 75): goto = None if (goto is None): if (not True): goto = 76 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(stararg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 78 continue pass goto = 77 continue if (goto == 78): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(stararg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(stararg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 77): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 80 continue continue goto = 79 continue if (goto == 80): goto = None if (goto is None): goto = 76 continue if (goto == 79): goto = None if (goto is None): goto = 75 continue if (goto == 76): goto = None if (goto == 73): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 82 continue continue goto = 81 continue if (goto == 82): goto = None if (goto is None): goto = 72 continue if (goto == 81): goto = None if (goto is None): goto = 71 continue if (goto == 72): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del nstar del kwdict del na del stararg del nk del flags del pp_stack del func del callargs del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _PyEval_SliceIndex(v, pi): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) pi = ctypes.cast(pi, ctypes.POINTER(g.Py_ssize_t)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: x = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(x, ctypes.cast(v, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(x, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(v, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value else: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('slice indices must be integers or None or have an __index__ method'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(pi.contents, x.value) del x return ctypes_wrapped.c_int(int(1L)).value del pi del v return ctypes_wrapped.c_int().value @staticmethod def apply_slice(u, v, w): u = ctypes.cast(u, ctypes.POINTER(g.PyObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(u.contents.ob_type, ctypes.POINTER(g.PyTypeObject)) sq = ctypes.cast(tp.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(sq, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(sq.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: ilow = g.Py_ssize_t() ihigh = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyEval_SliceIndex(v, ctypes.pointer(ilow)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyEval_SliceIndex(w, ctypes.pointer(ihigh)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_GetSlice(u, ilow, ihigh), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del ihigh del ilow else: slice_a = ctypes.cast(intp._getPtr(g.PySlice_New(v, w, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(slice_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: res = ctypes.cast(intp._getPtr(g.PyObject_GetItem(u, slice_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res else: return ctypes_wrapped.c_int(int(0L)).value del slice_a del sq del u del tp del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def assign_slice(u, v, w, x): u = ctypes.cast(u, ctypes.POINTER(g.PyObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) x = ctypes.cast(x, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(u.contents.ob_type, ctypes.POINTER(g.PyTypeObject)) sq = ctypes.cast(tp.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(sq, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(sq.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: ilow = g.Py_ssize_t() ihigh = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyEval_SliceIndex(v, ctypes.pointer(ilow)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyEval_SliceIndex(w, ctypes.pointer(ihigh)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(g.PySequence_DelSlice(u, ilow, ihigh))).value else: return ctypes_wrapped.c_int(int(g.PySequence_SetSlice(u, ilow, ihigh, x))).value del ihigh del ilow else: slice_a = ctypes.cast(intp._getPtr(g.PySlice_New(v, w, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(slice_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(res, ctypes_wrapped.c_int(int(g.PyObject_SetItem(u, slice_a, x))).value) else: helpers.assign(res, ctypes_wrapped.c_int(int(g.PyObject_DelItem(u, slice_a))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return res.value del res else: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del slice_a del sq del tp del u del w del v del x return ctypes_wrapped.c_int().value @staticmethod def cmp_outcome(op, v, w): first_iteration = None op = ctypes_wrapped.c_int(int(op.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int() if True: _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(8L).value)): _switchfallthrough = True helpers.assign(res, ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(9L).value)): _switchfallthrough = True helpers.assign(res, ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(6L).value)): _switchfallthrough = True helpers.assign(res, ctypes_wrapped.c_int(int(g.PySequence_Contains(w, v))).value) if ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(7L).value)): _switchfallthrough = True helpers.assign(res, ctypes_wrapped.c_int(int(g.PySequence_Contains(w, v))).value) if ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, ctypes_wrapped.c_int(int((not res.value))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(10L).value)): _switchfallthrough = True if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: i = g.Py_ssize_t() length = g.Py_ssize_t() helpers.assign(length, g.Py_ssize_t(int(g.PyTuple_Size(w))).value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.augAssign(i, u'+=', ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((i.value < length.value)).value: pass else: break exc = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(w, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(exc, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: ret_val = ctypes_wrapped.c_int() helpers.assign(ret_val, ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('catching of string exceptions is deprecated'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value) if ctypes_wrapped.c_int((ret_val.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del ret_val elif ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(exc, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(exc, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(exc, ctypes.POINTER(g.PyTypeObject)).contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value)).value: ret_val = ctypes_wrapped.c_int() helpers.assign(ret_val, ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string("catching classes that don't inherit from BaseException is not allowed in 3.x"), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value) if ctypes_wrapped.c_int((ret_val.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del ret_val del exc del i del length elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: ret_val = ctypes_wrapped.c_int() helpers.assign(ret_val, ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('catching of string exceptions is deprecated'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value) if ctypes_wrapped.c_int((ret_val.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del ret_val elif ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyTypeObject)).contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value)).value: ret_val = ctypes_wrapped.c_int() helpers.assign(ret_val, ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string("catching classes that don't inherit from BaseException is not allowed in 3.x"), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value) if ctypes_wrapped.c_int((ret_val.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del ret_val helpers.assign(res, ctypes_wrapped.c_int(int(g.PyErr_GivenExceptionMatches(v, w))).value) break if (not _switchfallthrough): return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_RichCompare(v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) break del _switchfallthrough del _switchvalue helpers.assignPtr(v, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if res.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del res del v del w del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def import_from(v, name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) x = ctypes.POINTER(g.PyObject)() helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(v, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_ImportError, ctypes.cast(intp._make_string('cannot import name %.230s'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyString_AsString(name), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) del x del name del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def import_all_from(locals_a, v): first_iteration = None locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) all_a = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(v, ctypes.cast(intp._make_string('__all__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) dict_a = ctypes.POINTER(g.PyObject)() name = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() skip_leading_underscores = ctypes_wrapped.c_int() pos = ctypes_wrapped.c_int() err = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(all_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value g.PyErr_Clear() helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(v, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value g.PyErr_SetString(g.PyExc_ImportError, ctypes.cast(intp._make_string('from-import-* object has no __dict__ and no __all__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(all_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(dict_a, ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(all_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(skip_leading_underscores, ctypes_wrapped.c_int(int(1L)).value) if True: first_iteration = True (helpers.assign(pos, ctypes_wrapped.c_int(int(0L)).value), helpers.assign(err, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: helpers.postfixInc(pos) helpers.assignPtr(name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_GetItem(all_a, g.Py_ssize_t(int(pos.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_IndexError))).value))).value: helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) else: g.PyErr_Clear() break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((skip_leading_underscores.value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes.c_byte(95).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break continue helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(v, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(locals_a, name, value))).value) else: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyObject_SetItem(locals_a, name, value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((err.value != ctypes_wrapped.c_int(int(0L)).value)).value: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(all_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(all_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(all_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return err.value del skip_leading_underscores del name del err del dict_a del locals_a del pos del value del all_a del v return ctypes_wrapped.c_int().value @staticmethod def build_class(methods, bases, name): methods = ctypes.cast(methods, ctypes.POINTER(g.PyObject)) bases = ctypes.cast(bases, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) metaclass = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() base = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(methods, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(metaclass, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(methods, ctypes.cast(intp._make_string('__metaclass__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(metaclass, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(metaclass, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(base, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(metaclass, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(base, ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(metaclass, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() helpers.assignPtr(metaclass, (ctypes.cast(intp._storePtr(ctypes.cast(base.contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(metaclass, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) else: g_a = ctypes.cast(intp._getPtr(g.PyEval_GetGlobals(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(g_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(g_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(metaclass, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(g_a, ctypes.cast(intp._make_string('__metaclass__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(metaclass, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(metaclass, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(metaclass, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del g_a helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(metaclass, name, bases, methods, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(metaclass, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(metaclass, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(metaclass, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value)).value: ptype = ctypes.POINTER(g.PyObject)() pvalue = ctypes.POINTER(g.PyObject)() ptraceback = ctypes.POINTER(g.PyObject)() g.PyErr_Fetch(ctypes.pointer(ptype), ctypes.pointer(pvalue), ctypes.pointer(ptraceback)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: newmsg = ctypes.POINTER(g.PyObject)() helpers.assignPtr(newmsg, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('Error when calling the metaclass bases\n %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(pvalue, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newmsg, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(pvalue, (ctypes.cast(intp._storePtr(newmsg), ctypes_wrapped.c_void_p).value or 0)) del newmsg g.PyErr_Restore(ptype, pvalue, ptraceback) del ptraceback del ptype del pvalue return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del methods del bases del result del base del metaclass del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def exec_statement(f, prog, globals_a, locals_a): f = ctypes.cast(f, ctypes.POINTER(g.PyFrameObject)) prog = ctypes.cast(prog, ctypes.POINTER(g.PyObject)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) n = ctypes_wrapped.c_int() v = ctypes.POINTER(g.PyObject)() plain = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(globals_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(locals_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.assign(n, g.Py_ssize_t(int(g.PyTuple_Size(prog))).value).value == ctypes_wrapped.c_int(int(2L)).value)).value or ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(3L)).value)).value)).value)).value)).value)).value: helpers.assignPtr(globals_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetItem(prog, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(3L)).value)).value: helpers.assignPtr(locals_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetItem(prog, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(prog, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetItem(prog, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(globals_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(globals_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_GetGlobals(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(locals_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(locals_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_GetLocals(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(plain, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(globals_a, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((not (ctypes.cast(locals_a, ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('globals and locals cannot be NULL'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int(((ctypes.cast(locals_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(locals_a, (ctypes.cast(intp._storePtr(globals_a), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCode_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFile_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFile_Type)))).value)).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('exec: arg 1 must be a string, file, or code object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('exec: arg 2 must be a dictionary or None'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyMapping_Check(locals_a))).value))).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('exec: arg 3 must be a mapping or None'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(globals_a, ctypes.cast(intp._make_string('__builtins__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(globals_a, ctypes.cast(intp._make_string('__builtins__'), ctypes.POINTER(ctypes_wrapped.c_byte)), f.contents.f_builtins))) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCode_Type), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(prog, ctypes.POINTER(g.PyCodeObject)).contents.co_freevars, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('code object passed to exec may not contain free variables'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalCode(ctypes.cast(prog, ctypes.POINTER(g.PyCodeObject)), globals_a, locals_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFile_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(prog, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFile_Type)))).value)).value: fp = ctypes.cast(intp._getPtr(g.PyFile_AsFile(prog), ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.POINTER(ctypes_wrapped.c_int)) name = ctypes.cast(intp._getPtr(g.PyString_AsString(intp._getPtr(g.PyFile_Name(prog), ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.POINTER(ctypes_wrapped.c_byte)) cf = g.PyCompilerFlags() if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(cf.cf_flags, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(int(g.PyEval_MergeCompilerFlags(ctypes.pointer(cf)))).value: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_FileExFlags(fp, name, ctypes_wrapped.c_int(int(257L)), globals_a, locals_a, ctypes_wrapped.c_int(int(0L)), ctypes.pointer(cf)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_FileExFlags(fp, name, ctypes_wrapped.c_int(int(257L)), globals_a, locals_a, ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del fp del name del cf else: tmp = ctypes.POINTER(g.PyObject)() str_a = ctypes.POINTER(ctypes_wrapped.c_byte)() cf = g.PyCompilerFlags() helpers.assign(cf.cf_flags, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(int(g.PyString_AsStringAndSize(prog, ctypes.pointer(str_a), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.Py_ssize_t))))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int(g.PyEval_MergeCompilerFlags(ctypes.pointer(cf)))).value: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_StringFlags(str_a, ctypes_wrapped.c_int(int(257L)), globals_a, locals_a, ctypes.pointer(cf)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_StringFlags(str_a, ctypes_wrapped.c_int(int(257L)), globals_a, locals_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tmp del str_a del cf if plain.value: g.PyFrame_LocalsToFast(f, ctypes_wrapped.c_int(int(0L))) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del globals_a del f del plain del locals_a del n del v del prog return ctypes_wrapped.c_int().value @staticmethod def format_exc_check_arg(exc, format_str, obj): exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) format_str = ctypes.cast(format_str, ctypes.POINTER(ctypes_wrapped.c_byte)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) obj_str = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((not (ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.assignPtr(obj_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(obj), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(obj_str, ctypes_wrapped.c_void_p).value or 0))).value: return intp._getPtr(g.PyErr_Format(exc, format_str, obj_str), ctypes.POINTER(g.PyObject)) del obj_str del format_str del obj del exc return @staticmethod def string_concatenate(v, w, f, next_instr): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) f = ctypes.cast(f, ctypes.POINTER(g.PyFrameObject)) next_instr = ctypes.cast(next_instr, ctypes.POINTER(ctypes_wrapped.c_ubyte)) v_len = g.Py_ssize_t(int(ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) w_len = g.Py_ssize_t(int(ctypes.cast(w, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) new_len = g.Py_ssize_t(int(ctypes_wrapped.c_long(int((v_len.value + w_len.value))).value)) if ctypes_wrapped.c_int((new_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('strings are too large to concat'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((v.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(2L)).value)).value: if True: _switchvalue = None _switchvalue = next_instr.contents.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(125L)).value)): _switchfallthrough = True oparg = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value)) fastlocals = ctypes.cast(f.contents.f_localsplus, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value: while True: tmp = ctypes.cast(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(fastlocals, '+', oparg.value).contents, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break break del oparg del fastlocals if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(137L)).value)): _switchfallthrough = True freevars = ctypes.cast(helpers.ptrArithmetic(f.contents.f_localsplus, u'+', f.contents.f_code.contents.co_nlocals.value), ctypes.POINTER(ctypes.POINTER(g.PyObject))) c = ctypes.cast(helpers.ptrArithmetic(freevars, '+', ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(c, ctypes.POINTER(g.PyCellObject)).contents.ob_ref, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value: ctypes_wrapped.c_int(int(g.PyCell_Set(c, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))) break del freevars del c if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(90L)).value)): _switchfallthrough = True names = ctypes.cast(f.contents.f_code.contents.co_names, ctypes.POINTER(g.PyObject)) name = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int((helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(2L)).value).contents.value << ctypes_wrapped.c_int(int(8L)).value))).value + helpers.ptrArithmetic(next_instr, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value))).value).contents, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(f.contents.f_locals, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItem(locals_a, name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_DelItem(locals_a, name))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() break del locals_a del names del name break del _switchfallthrough del _switchvalue if ctypes_wrapped.c_int((ctypes_wrapped.c_int((v.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int(int((not ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate.value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(v), new_len))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', v_len.value), ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(w_len.value)) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) else: g.PyString_Concat(ctypes.pointer(v), w) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del new_len del w_len del f del v del w del v_len del next_instr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) _PyOS_opterr = ctypes_wrapped.c_int() # TODO init _PyOS_opterr with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) _PyOS_optind = ctypes_wrapped.c_int() # TODO init _PyOS_optind with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) _PyOS_optarg = ctypes.POINTER(ctypes_wrapped.c_byte)() opt_ptr = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init opt_ptr with ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)) @staticmethod def _PyOS_ResetGetOpt(): helpers.assign(g._PyOS_opterr, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(g._PyOS_optind, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(g._PyOS_optarg, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(g.opt_ptr, (ctypes.cast(intp._storePtr(intp._make_string('')), ctypes_wrapped.c_void_p).value or 0)) return @staticmethod def _PyOS_GetOpt(argc, argv, optstring): argc = ctypes_wrapped.c_int(int(argc.value)) argv = ctypes.cast(argv, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) optstring = ctypes.cast(optstring, ctypes.POINTER(ctypes_wrapped.c_byte)) ptr = ctypes.POINTER(ctypes_wrapped.c_byte)() option = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((g.opt_ptr.contents.value == ctypes.c_byte(0).value)).value: if ctypes_wrapped.c_int((g._PyOS_optind.value >= argc.value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value != ctypes.c_byte(45).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(0).value)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int((values.strcmp.value(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, ctypes.cast(intp._make_string('--'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.prefixInc(g._PyOS_optind) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int((values.strcmp.value(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, ctypes.cast(intp._make_string('--help'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.prefixInc(g._PyOS_optind) return ctypes.c_byte(104).value elif ctypes_wrapped.c_int((values.strcmp.value(helpers.ptrArithmetic(argv, '+', g._PyOS_optind.value).contents, ctypes.cast(intp._make_string('--version'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.prefixInc(g._PyOS_optind) return ctypes.c_byte(86).value helpers.assignPtr(g.opt_ptr, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(helpers.ptrArithmetic(argv, '+', helpers.postfixInc(g._PyOS_optind).value).contents, '+', ctypes_wrapped.c_int(int(1L)).value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((helpers.assign(option, helpers.postfixIncPtr(g.opt_ptr).contents.value).value == ctypes.c_byte(0).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((option.value == ctypes.c_byte(74).value)).value: if g._PyOS_opterr.value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('-J is reserved for Jython\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes.c_byte(95).value if ctypes_wrapped.c_int((option.value == ctypes.c_byte(88).value)).value: if g._PyOS_opterr.value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('-X is reserved for implementation-specific arguments\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes.c_byte(95).value if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(values.strchr.value(optstring, option)), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if g._PyOS_opterr.value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Unknown option: -%c\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), option) return ctypes.c_byte(95).value if ctypes_wrapped.c_int((helpers.ptrArithmetic(ptr, u'+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(58).value)).value: if ctypes_wrapped.c_int((g.opt_ptr.contents.value != ctypes.c_byte(0).value)).value: helpers.assignPtr(g._PyOS_optarg, (ctypes.cast(intp._storePtr(g.opt_ptr), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g.opt_ptr, (ctypes.cast(intp._storePtr(intp._make_string('')), ctypes_wrapped.c_void_p).value or 0)) else: if ctypes_wrapped.c_int((g._PyOS_optind.value >= argc.value)).value: if g._PyOS_opterr.value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Argument expected for the -%c option\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), option) return ctypes.c_byte(95).value helpers.assignPtr(g._PyOS_optarg, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(argv, '+', helpers.postfixInc(g._PyOS_optind).value).contents), ctypes_wrapped.c_void_p).value or 0)) return option.value del option del argc del optstring del argv del ptr return ctypes_wrapped.c_int().value identifier = ctypes.POINTER(PyObject) string = ctypes.POINTER(PyObject) object = ctypes.POINTER(PyObject) bool = ctypes_wrapped.c_uint32 asdl_seq = structs._anonymous_asdl_seq asdl_int_seq = structs._anonymous_asdl_int_seq @staticmethod def asdl_seq_new(size, arena): size = ctypes_wrapped.c_int(int(size.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function 'asdl_seq_new' only predeclared. Body is missing. Missing C source code.") del arena del size return (ctypes.cast(ctypes.POINTER(g.asdl_seq)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def asdl_int_seq_new(size, arena): size = ctypes_wrapped.c_int(int(size.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function 'asdl_int_seq_new' only predeclared. Body is missing. Missing C source code.") del arena del size return (ctypes.cast(ctypes.POINTER(g.asdl_int_seq)(), ctypes_wrapped.c_void_p).value or 0) mod_ty = ctypes.POINTER(structs._mod) stmt_ty = ctypes.POINTER(structs._stmt) expr_ty = ctypes.POINTER(structs._expr) _expr_context = ctypes_wrapped.c_uint32 expr_context_ty = ctypes_wrapped.c_uint32 slice_ty = ctypes.POINTER(structs._slice) _boolop = ctypes_wrapped.c_uint32 boolop_ty = ctypes_wrapped.c_uint32 _operator = ctypes_wrapped.c_uint32 operator_ty = ctypes_wrapped.c_uint32 _unaryop = ctypes_wrapped.c_uint32 unaryop_ty = ctypes_wrapped.c_uint32 _cmpop = ctypes_wrapped.c_uint32 cmpop_ty = ctypes_wrapped.c_uint32 comprehension_ty = ctypes.POINTER(structs._comprehension) excepthandler_ty = ctypes.POINTER(structs._excepthandler) arguments_ty = ctypes.POINTER(structs._arguments) keyword_ty = ctypes.POINTER(structs._keyword) alias_ty = ctypes.POINTER(structs._alias) _mod_kind = ctypes_wrapped.c_uint32 _stmt_kind = ctypes_wrapped.c_uint32 _expr_kind = ctypes_wrapped.c_uint32 _slice_kind = ctypes_wrapped.c_uint32 _excepthandler_kind = ctypes_wrapped.c_uint32 @staticmethod def _Py_Module(body, arena): body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Module' only predeclared. Body is missing. Missing C source code.") del body del arena return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Interactive(body, arena): body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Interactive' only predeclared. Body is missing. Missing C source code.") del body del arena return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Expression(body, arena): body = ctypes.cast(body, g.expr_ty) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Expression' only predeclared. Body is missing. Missing C source code.") del body del arena return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Suite(body, arena): body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Suite' only predeclared. Body is missing. Missing C source code.") del body del arena return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_FunctionDef(name, args, body, decorator_list, lineno, col_offset, arena): name = ctypes.cast(name, g.identifier) args = ctypes.cast(args, g.arguments_ty) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) decorator_list = ctypes.cast(decorator_list, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_FunctionDef' only predeclared. Body is missing. Missing C source code.") del body del decorator_list del name del col_offset del args del arena del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_ClassDef(name, bases, body, decorator_list, lineno, col_offset, arena): name = ctypes.cast(name, g.identifier) bases = ctypes.cast(bases, ctypes.POINTER(g.asdl_seq)) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) decorator_list = ctypes.cast(decorator_list, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_ClassDef' only predeclared. Body is missing. Missing C source code.") del body del decorator_list del name del col_offset del arena del bases del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Return(value, lineno, col_offset, arena): value = ctypes.cast(value, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Return' only predeclared. Body is missing. Missing C source code.") del arena del lineno del value del col_offset return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Delete(targets, lineno, col_offset, arena): targets = ctypes.cast(targets, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Delete' only predeclared. Body is missing. Missing C source code.") del arena del targets del col_offset del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Assign(targets, value, lineno, col_offset, arena): targets = ctypes.cast(targets, ctypes.POINTER(g.asdl_seq)) value = ctypes.cast(value, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Assign' only predeclared. Body is missing. Missing C source code.") del arena del col_offset del targets del value del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_AugAssign(target, op, value, lineno, col_offset, arena): target = ctypes.cast(target, g.expr_ty) op = g.operator_ty(op.value) value = ctypes.cast(value, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_AugAssign' only predeclared. Body is missing. Missing C source code.") del arena del target del col_offset del value del lineno del op return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Print(dest, values_a, nl, lineno, col_offset, arena): dest = ctypes.cast(dest, g.expr_ty) values_a = ctypes.cast(values_a, ctypes.POINTER(g.asdl_seq)) nl = g.bool(nl.value) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Print' only predeclared. Body is missing. Missing C source code.") del arena del nl del col_offset del dest del values_a del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_For(target, iter_a, body, orelse, lineno, col_offset, arena): target = ctypes.cast(target, g.expr_ty) iter_a = ctypes.cast(iter_a, g.expr_ty) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) orelse = ctypes.cast(orelse, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_For' only predeclared. Body is missing. Missing C source code.") del body del arena del iter_a del target del col_offset del lineno del orelse return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_While(test, body, orelse, lineno, col_offset, arena): test = ctypes.cast(test, g.expr_ty) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) orelse = ctypes.cast(orelse, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_While' only predeclared. Body is missing. Missing C source code.") del body del arena del col_offset del lineno del test del orelse return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_If(test, body, orelse, lineno, col_offset, arena): test = ctypes.cast(test, g.expr_ty) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) orelse = ctypes.cast(orelse, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_If' only predeclared. Body is missing. Missing C source code.") del body del arena del col_offset del lineno del test del orelse return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_With(context_expr, optional_vars, body, lineno, col_offset, arena): context_expr = ctypes.cast(context_expr, g.expr_ty) optional_vars = ctypes.cast(optional_vars, g.expr_ty) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_With' only predeclared. Body is missing. Missing C source code.") del body del arena del col_offset del optional_vars del lineno del context_expr return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Raise(type_a, inst, tback, lineno, col_offset, arena): type_a = ctypes.cast(type_a, g.expr_ty) inst = ctypes.cast(inst, g.expr_ty) tback = ctypes.cast(tback, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Raise' only predeclared. Body is missing. Missing C source code.") del arena del type_a del col_offset del inst del lineno del tback return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_TryExcept(body, handlers, orelse, lineno, col_offset, arena): body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) handlers = ctypes.cast(handlers, ctypes.POINTER(g.asdl_seq)) orelse = ctypes.cast(orelse, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_TryExcept' only predeclared. Body is missing. Missing C source code.") del body del arena del col_offset del handlers del lineno del orelse return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_TryFinally(body, finalbody, lineno, col_offset, arena): body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) finalbody = ctypes.cast(finalbody, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_TryFinally' only predeclared. Body is missing. Missing C source code.") del body del arena del finalbody del col_offset del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Assert(test, msg, lineno, col_offset, arena): test = ctypes.cast(test, g.expr_ty) msg = ctypes.cast(msg, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Assert' only predeclared. Body is missing. Missing C source code.") del test del msg del arena del lineno del col_offset return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Import(names, lineno, col_offset, arena): names = ctypes.cast(names, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Import' only predeclared. Body is missing. Missing C source code.") del arena del names del col_offset del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_ImportFrom(module, names, level, lineno, col_offset, arena): module = ctypes.cast(module, g.identifier) names = ctypes.cast(names, ctypes.POINTER(g.asdl_seq)) level = ctypes_wrapped.c_int(int(level.value)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_ImportFrom' only predeclared. Body is missing. Missing C source code.") del arena del col_offset del level del module del lineno del names return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Exec(body, globals_a, locals_a, lineno, col_offset, arena): body = ctypes.cast(body, g.expr_ty) globals_a = ctypes.cast(globals_a, g.expr_ty) locals_a = ctypes.cast(locals_a, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Exec' only predeclared. Body is missing. Missing C source code.") del body del globals_a del col_offset del locals_a del arena del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Global(names, lineno, col_offset, arena): names = ctypes.cast(names, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Global' only predeclared. Body is missing. Missing C source code.") del arena del names del col_offset del lineno return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Expr(value, lineno, col_offset, arena): value = ctypes.cast(value, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Expr' only predeclared. Body is missing. Missing C source code.") del arena del lineno del value del col_offset return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Pass(lineno, col_offset, arena): lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Pass' only predeclared. Body is missing. Missing C source code.") del arena del lineno del col_offset return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Break(lineno, col_offset, arena): lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Break' only predeclared. Body is missing. Missing C source code.") del arena del lineno del col_offset return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Continue(lineno, col_offset, arena): lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Continue' only predeclared. Body is missing. Missing C source code.") del arena del lineno del col_offset return (ctypes.cast(g.stmt_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_BoolOp(op, values_a, lineno, col_offset, arena): op = g.boolop_ty(op.value) values_a = ctypes.cast(values_a, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_BoolOp' only predeclared. Body is missing. Missing C source code.") del arena del values_a del lineno del col_offset del op return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_BinOp(left, op, right, lineno, col_offset, arena): left = ctypes.cast(left, g.expr_ty) op = g.operator_ty(op.value) right = ctypes.cast(right, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_BinOp' only predeclared. Body is missing. Missing C source code.") del arena del right del col_offset del lineno del left del op return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_UnaryOp(op, operand, lineno, col_offset, arena): op = g.unaryop_ty(op.value) operand = ctypes.cast(operand, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_UnaryOp' only predeclared. Body is missing. Missing C source code.") del operand del arena del lineno del col_offset del op return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Lambda(args, body, lineno, col_offset, arena): args = ctypes.cast(args, g.arguments_ty) body = ctypes.cast(body, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Lambda' only predeclared. Body is missing. Missing C source code.") del body del arena del args del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_IfExp(test, body, orelse, lineno, col_offset, arena): test = ctypes.cast(test, g.expr_ty) body = ctypes.cast(body, g.expr_ty) orelse = ctypes.cast(orelse, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_IfExp' only predeclared. Body is missing. Missing C source code.") del body del arena del col_offset del lineno del test del orelse return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Dict(keys, values_a, lineno, col_offset, arena): keys = ctypes.cast(keys, ctypes.POINTER(g.asdl_seq)) values_a = ctypes.cast(values_a, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Dict' only predeclared. Body is missing. Missing C source code.") del keys del arena del values_a del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Set(elts, lineno, col_offset, arena): elts = ctypes.cast(elts, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Set' only predeclared. Body is missing. Missing C source code.") del elts del arena del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_ListComp(elt, generators, lineno, col_offset, arena): elt = ctypes.cast(elt, g.expr_ty) generators = ctypes.cast(generators, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_ListComp' only predeclared. Body is missing. Missing C source code.") del arena del generators del lineno del elt del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_SetComp(elt, generators, lineno, col_offset, arena): elt = ctypes.cast(elt, g.expr_ty) generators = ctypes.cast(generators, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_SetComp' only predeclared. Body is missing. Missing C source code.") del arena del generators del lineno del elt del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_DictComp(key, value, generators, lineno, col_offset, arena): key = ctypes.cast(key, g.expr_ty) value = ctypes.cast(value, g.expr_ty) generators = ctypes.cast(generators, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_DictComp' only predeclared. Body is missing. Missing C source code.") del arena del col_offset del value del generators del lineno del key return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_GeneratorExp(elt, generators, lineno, col_offset, arena): elt = ctypes.cast(elt, g.expr_ty) generators = ctypes.cast(generators, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_GeneratorExp' only predeclared. Body is missing. Missing C source code.") del arena del generators del lineno del elt del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Yield(value, lineno, col_offset, arena): value = ctypes.cast(value, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Yield' only predeclared. Body is missing. Missing C source code.") del arena del lineno del value del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Compare(left, ops, comparators, lineno, col_offset, arena): left = ctypes.cast(left, g.expr_ty) ops = ctypes.cast(ops, ctypes.POINTER(g.asdl_int_seq)) comparators = ctypes.cast(comparators, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Compare' only predeclared. Body is missing. Missing C source code.") del arena del col_offset del ops del lineno del comparators del left return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Call(func, args, keywords, starargs, kwargs, lineno, col_offset, arena): func = ctypes.cast(func, g.expr_ty) args = ctypes.cast(args, ctypes.POINTER(g.asdl_seq)) keywords = ctypes.cast(keywords, ctypes.POINTER(g.asdl_seq)) starargs = ctypes.cast(starargs, g.expr_ty) kwargs = ctypes.cast(kwargs, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Call' only predeclared. Body is missing. Missing C source code.") del arena del col_offset del starargs del args del lineno del func del kwargs del keywords return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Repr(value, lineno, col_offset, arena): value = ctypes.cast(value, g.expr_ty) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Repr' only predeclared. Body is missing. Missing C source code.") del arena del lineno del value del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Num(n, lineno, col_offset, arena): n = ctypes.cast(n, g.object) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Num' only predeclared. Body is missing. Missing C source code.") del arena del lineno del col_offset del n return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Str(s, lineno, col_offset, arena): s = ctypes.cast(s, g.string) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Str' only predeclared. Body is missing. Missing C source code.") del arena del s del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Attribute(value, attr, ctx, lineno, col_offset, arena): value = ctypes.cast(value, g.expr_ty) attr = ctypes.cast(attr, g.identifier) ctx = g.expr_context_ty(ctx.value) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Attribute' only predeclared. Body is missing. Missing C source code.") del arena del attr del col_offset del ctx del value del lineno return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Subscript(value, slice_a, ctx, lineno, col_offset, arena): value = ctypes.cast(value, g.expr_ty) slice_a = ctypes.cast(slice_a, g.slice_ty) ctx = g.expr_context_ty(ctx.value) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Subscript' only predeclared. Body is missing. Missing C source code.") del arena del slice_a del col_offset del ctx del value del lineno return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Name(id_a, ctx, lineno, col_offset, arena): id_a = ctypes.cast(id_a, g.identifier) ctx = g.expr_context_ty(ctx.value) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Name' only predeclared. Body is missing. Missing C source code.") del arena del id_a del ctx del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_List(elts, ctx, lineno, col_offset, arena): elts = ctypes.cast(elts, ctypes.POINTER(g.asdl_seq)) ctx = g.expr_context_ty(ctx.value) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_List' only predeclared. Body is missing. Missing C source code.") del elts del arena del ctx del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Tuple(elts, ctx, lineno, col_offset, arena): elts = ctypes.cast(elts, ctypes.POINTER(g.asdl_seq)) ctx = g.expr_context_ty(ctx.value) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Tuple' only predeclared. Body is missing. Missing C source code.") del elts del arena del ctx del lineno del col_offset return (ctypes.cast(g.expr_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Ellipsis(arena): arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Ellipsis' only predeclared. Body is missing. Missing C source code.") del arena return (ctypes.cast(g.slice_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Slice(lower, upper, step, arena): lower = ctypes.cast(lower, g.expr_ty) upper = ctypes.cast(upper, g.expr_ty) step = ctypes.cast(step, g.expr_ty) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Slice' only predeclared. Body is missing. Missing C source code.") del arena del upper del lower del step return (ctypes.cast(g.slice_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_ExtSlice(dims, arena): dims = ctypes.cast(dims, ctypes.POINTER(g.asdl_seq)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_ExtSlice' only predeclared. Body is missing. Missing C source code.") del arena del dims return (ctypes.cast(g.slice_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_Index(value, arena): value = ctypes.cast(value, g.expr_ty) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_Index' only predeclared. Body is missing. Missing C source code.") del arena del value return (ctypes.cast(g.slice_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_comprehension(target, iter_a, ifs, arena): target = ctypes.cast(target, g.expr_ty) iter_a = ctypes.cast(iter_a, g.expr_ty) ifs = ctypes.cast(ifs, ctypes.POINTER(g.asdl_seq)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_comprehension' only predeclared. Body is missing. Missing C source code.") del arena del iter_a del target del ifs return (ctypes.cast(g.comprehension_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_ExceptHandler(type_a, name, body, lineno, col_offset, arena): type_a = ctypes.cast(type_a, g.expr_ty) name = ctypes.cast(name, g.expr_ty) body = ctypes.cast(body, ctypes.POINTER(g.asdl_seq)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_ExceptHandler' only predeclared. Body is missing. Missing C source code.") del body del arena del type_a del name del col_offset del lineno return (ctypes.cast(g.excepthandler_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_arguments(args, vararg, kwarg, defaults, arena): args = ctypes.cast(args, ctypes.POINTER(g.asdl_seq)) vararg = ctypes.cast(vararg, g.identifier) kwarg = ctypes.cast(kwarg, g.identifier) defaults = ctypes.cast(defaults, ctypes.POINTER(g.asdl_seq)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_arguments' only predeclared. Body is missing. Missing C source code.") del arena del args del kwarg del defaults del vararg return (ctypes.cast(g.arguments_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_keyword(arg, value, arena): arg = ctypes.cast(arg, g.identifier) value = ctypes.cast(value, g.expr_ty) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_keyword' only predeclared. Body is missing. Missing C source code.") del arena del value del arg return (ctypes.cast(g.keyword_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_alias(name, asname, arena): name = ctypes.cast(name, g.identifier) asname = ctypes.cast(asname, g.identifier) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) raise Exception(u"Function '_Py_alias' only predeclared. Body is missing. Missing C source code.") del arena del name del asname return (ctypes.cast(g.alias_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyAST_mod2obj(t): t = ctypes.cast(t, g.mod_ty) raise Exception(u"Function 'PyAST_mod2obj' only predeclared. Body is missing. Missing C source code.") del t return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyAST_obj2mod(ast, arena, mode): ast = ctypes.cast(ast, ctypes.POINTER(g.PyObject)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) mode = ctypes_wrapped.c_int(int(mode.value)) raise Exception(u"Function 'PyAST_obj2mod' only predeclared. Body is missing. Missing C source code.") del arena del mode del ast return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyAST_Check(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyAST_Check' only predeclared. Body is missing. Missing C source code.") del obj return ctypes_wrapped.c_int().value bitset = ctypes.POINTER(ctypes_wrapped.c_byte) @staticmethod def newbitset(nbits): nbits = ctypes_wrapped.c_int(int(nbits.value)) raise Exception(u"Function 'newbitset' only predeclared. Body is missing. Missing C source code.") del nbits return (ctypes.cast(g.bitset(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def delbitset(bs): bs = ctypes.cast(bs, g.bitset) raise Exception(u"Function 'delbitset' only predeclared. Body is missing. Missing C source code.") del bs return @staticmethod def addbit(bs, ibit): bs = ctypes.cast(bs, g.bitset) ibit = ctypes_wrapped.c_int(int(ibit.value)) raise Exception(u"Function 'addbit' only predeclared. Body is missing. Missing C source code.") del ibit del bs return ctypes_wrapped.c_int().value @staticmethod def samebitset(bs1, bs2, nbits): bs1 = ctypes.cast(bs1, g.bitset) bs2 = ctypes.cast(bs2, g.bitset) nbits = ctypes_wrapped.c_int(int(nbits.value)) raise Exception(u"Function 'samebitset' only predeclared. Body is missing. Missing C source code.") del nbits del bs1 del bs2 return ctypes_wrapped.c_int().value @staticmethod def mergebitset(bs1, bs2, nbits): bs1 = ctypes.cast(bs1, g.bitset) bs2 = ctypes.cast(bs2, g.bitset) nbits = ctypes_wrapped.c_int(int(nbits.value)) raise Exception(u"Function 'mergebitset' only predeclared. Body is missing. Missing C source code.") del nbits del bs1 del bs2 return label = structs._anonymous_label labellist = structs._anonymous_labellist arc = structs._anonymous_arc state = structs._anonymous_state dfa = structs._anonymous_dfa grammar = structs._anonymous_grammar @staticmethod def newgrammar(start): start = ctypes_wrapped.c_int(int(start.value)) raise Exception(u"Function 'newgrammar' only predeclared. Body is missing. Missing C source code.") del start return (ctypes.cast(ctypes.POINTER(g.grammar)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def adddfa(g_a, type_a, name): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) type_a = ctypes_wrapped.c_int(int(type_a.value)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'adddfa' only predeclared. Body is missing. Missing C source code.") del type_a del g_a del name return (ctypes.cast(ctypes.POINTER(g.dfa)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def addstate(d): d = ctypes.cast(d, ctypes.POINTER(g.dfa)) raise Exception(u"Function 'addstate' only predeclared. Body is missing. Missing C source code.") del d return ctypes_wrapped.c_int().value @staticmethod def addarc(d, from_a, to, lbl): d = ctypes.cast(d, ctypes.POINTER(g.dfa)) from_a = ctypes_wrapped.c_int(int(from_a.value)) to = ctypes_wrapped.c_int(int(to.value)) lbl = ctypes_wrapped.c_int(int(lbl.value)) raise Exception(u"Function 'addarc' only predeclared. Body is missing. Missing C source code.") del to del from_a del d del lbl return @staticmethod def PyGrammar_FindDFA(g_a, type_a): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) type_a = ctypes_wrapped.c_int(int(type_a.value)) raise Exception(u"Function 'PyGrammar_FindDFA' only predeclared. Body is missing. Missing C source code.") del type_a del g_a return (ctypes.cast(ctypes.POINTER(g.dfa)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def addlabel(ll, type_a, str_a): ll = ctypes.cast(ll, ctypes.POINTER(g.labellist)) type_a = ctypes_wrapped.c_int(int(type_a.value)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'addlabel' only predeclared. Body is missing. Missing C source code.") del ll del str_a del type_a return ctypes_wrapped.c_int().value @staticmethod def findlabel(ll, type_a, str_a): ll = ctypes.cast(ll, ctypes.POINTER(g.labellist)) type_a = ctypes_wrapped.c_int(int(type_a.value)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) raise Exception(u"Function 'findlabel' only predeclared. Body is missing. Missing C source code.") del ll del str_a del type_a return ctypes_wrapped.c_int().value @staticmethod def PyGrammar_LabelRepr(lb): lb = ctypes.cast(lb, ctypes.POINTER(g.label)) raise Exception(u"Function 'PyGrammar_LabelRepr' only predeclared. Body is missing. Missing C source code.") del lb return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def translatelabels(g_a): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) raise Exception(u"Function 'translatelabels' only predeclared. Body is missing. Missing C source code.") del g_a return @staticmethod def addfirstsets(g_a): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) raise Exception(u"Function 'addfirstsets' only predeclared. Body is missing. Missing C source code.") del g_a return @staticmethod def PyGrammar_AddAccelerators(g_a): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) raise Exception(u"Function 'PyGrammar_AddAccelerators' only predeclared. Body is missing. Missing C source code.") del g_a return @staticmethod def PyGrammar_RemoveAccelerators(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.grammar)) raise Exception(u"Function 'PyGrammar_RemoveAccelerators' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def printgrammar(g_a, fp): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'printgrammar' only predeclared. Body is missing. Missing C source code.") del fp del g_a return @staticmethod def printnonterminals(g_a, fp): g_a = ctypes.cast(g_a, ctypes.POINTER(g.grammar)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'printnonterminals' only predeclared. Body is missing. Missing C source code.") del fp del g_a return node = structs._node @staticmethod def PyNode_New(type_a): type_a = ctypes_wrapped.c_int(int(type_a.value)) raise Exception(u"Function 'PyNode_New' only predeclared. Body is missing. Missing C source code.") del type_a return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNode_AddChild(n, type_a, str_a, lineno, col_offset): n = ctypes.cast(n, ctypes.POINTER(g.node)) type_a = ctypes_wrapped.c_int(int(type_a.value)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) lineno = ctypes_wrapped.c_int(int(lineno.value)) col_offset = ctypes_wrapped.c_int(int(col_offset.value)) raise Exception(u"Function 'PyNode_AddChild' only predeclared. Body is missing. Missing C source code.") del type_a del str_a del lineno del col_offset del n return ctypes_wrapped.c_int().value @staticmethod def PyNode_Free(n): n = ctypes.cast(n, ctypes.POINTER(g.node)) raise Exception(u"Function 'PyNode_Free' only predeclared. Body is missing. Missing C source code.") del n return @staticmethod def _PyNode_SizeOf(n): n = ctypes.cast(n, ctypes.POINTER(g.node)) raise Exception(u"Function '_PyNode_SizeOf' only predeclared. Body is missing. Missing C source code.") del n return g.Py_ssize_t().value @staticmethod def PyNode_ListTree(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.node)) raise Exception(u"Function 'PyNode_ListTree' only predeclared. Body is missing. Missing C source code.") del __dummy_a return _PyParser_TokenNames = 'Compile exception ' 'array without explicit len and without body' @staticmethod def PyToken_OneChar(__dummy_a): __dummy_a = ctypes_wrapped.c_int(int(__dummy_a.value)) raise Exception(u"Function 'PyToken_OneChar' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyToken_TwoChars(__dummy_a, __dummy_b): __dummy_a = ctypes_wrapped.c_int(int(__dummy_a.value)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyToken_TwoChars' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyToken_ThreeChars(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes_wrapped.c_int(int(__dummy_a.value)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyToken_ThreeChars' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return ctypes_wrapped.c_int().value perrdetail = structs._anonymous_perrdetail @staticmethod def PyParser_ParseString(__dummy_a, __dummy_b, __dummy_c, __dummy_d): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.grammar)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.perrdetail)) raise Exception(u"Function 'PyParser_ParseString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ParseFile(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f, __dummy_g): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.grammar)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_g = ctypes.cast(__dummy_g, ctypes.POINTER(g.perrdetail)) raise Exception(u"Function 'PyParser_ParseFile' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_g del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ParseStringFlags(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.grammar)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) __dummy_d = ctypes.cast(__dummy_d, ctypes.POINTER(g.perrdetail)) __dummy_e = ctypes_wrapped.c_int(int(__dummy_e.value)) raise Exception(u"Function 'PyParser_ParseStringFlags' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ParseFileFlags(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f, __dummy_g, __dummy_h): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.grammar)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_g = ctypes.cast(__dummy_g, ctypes.POINTER(g.perrdetail)) __dummy_h = ctypes_wrapped.c_int(int(__dummy_h.value)) raise Exception(u"Function 'PyParser_ParseFileFlags' only predeclared. Body is missing. Missing C source code.") del __dummy_h del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_g del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ParseFileFlagsEx(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f, __dummy_g, __dummy_h): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.grammar)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_g = ctypes.cast(__dummy_g, ctypes.POINTER(g.perrdetail)) __dummy_h = ctypes.cast(__dummy_h, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyParser_ParseFileFlagsEx' only predeclared. Body is missing. Missing C source code.") del __dummy_h del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_g del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ParseStringFlagsFilename(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.grammar)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(g.perrdetail)) __dummy_f = ctypes_wrapped.c_int(int(__dummy_f.value)) raise Exception(u"Function 'PyParser_ParseStringFlagsFilename' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ParseStringFlagsFilenameEx(__dummy_a, __dummy_b, __dummy_c, __dummy_d, __dummy_e, __dummy_f): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.grammar)) __dummy_d = ctypes_wrapped.c_int(int(__dummy_d.value)) __dummy_e = ctypes.cast(__dummy_e, ctypes.POINTER(g.perrdetail)) __dummy_f = ctypes.cast(__dummy_f, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyParser_ParseStringFlagsFilenameEx' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del __dummy_f del __dummy_d del __dummy_e return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) _block_type = ctypes_wrapped.c_uint32 _Py_block_ty = ctypes_wrapped.c_uint32 PySTEntryObject = structs._symtable_entry PySTEntry_Type = PyTypeObject() @staticmethod def PyST_GetScope(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PySTEntryObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(g.PyObject)) raise Exception(u"Function 'PyST_GetScope' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PySymtable_Build(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, g.mod_ty) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyFutureFeatures)) raise Exception(u"Function 'PySymtable_Build' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return (ctypes.cast(ctypes.POINTER(structs.symtable)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySymtable_Lookup(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs.symtable)) __dummy_b = ctypes.cast(__dummy_b, ctypes_wrapped.c_void_p) raise Exception(u"Function 'PySymtable_Lookup' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PySTEntryObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySymtable_Free(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(structs.symtable)) raise Exception(u"Function 'PySymtable_Free' only predeclared. Body is missing. Missing C source code.") del __dummy_a return @staticmethod def PyAST_FromNode(__dummy_a, flags, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.node)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_c = ctypes.cast(__dummy_c, ctypes.POINTER(g.PyArena)) raise Exception(u"Function 'PyAST_FromNode' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a del flags return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMarshal_WriteLongToFile(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes_wrapped.c_long(int(__dummy_a.value)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyMarshal_WriteLongToFile' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return @staticmethod def PyMarshal_WriteObjectToFile(__dummy_a, __dummy_b, __dummy_c): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes.cast(__dummy_b, ctypes.POINTER(ctypes_wrapped.c_int)) __dummy_c = ctypes_wrapped.c_int(int(__dummy_c.value)) raise Exception(u"Function 'PyMarshal_WriteObjectToFile' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_c del __dummy_a return @staticmethod def PyMarshal_WriteObjectToString(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(g.PyObject)) __dummy_b = ctypes_wrapped.c_int(int(__dummy_b.value)) raise Exception(u"Function 'PyMarshal_WriteObjectToString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMarshal_ReadLongFromFile(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyMarshal_ReadLongFromFile' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_long().value @staticmethod def PyMarshal_ReadShortFromFile(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyMarshal_ReadShortFromFile' only predeclared. Body is missing. Missing C source code.") del __dummy_a return ctypes_wrapped.c_int().value @staticmethod def PyMarshal_ReadObjectFromFile(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyMarshal_ReadObjectFromFile' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMarshal_ReadLastObjectFromFile(__dummy_a): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_int)) raise Exception(u"Function 'PyMarshal_ReadLastObjectFromFile' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMarshal_ReadObjectFromString(__dummy_a, __dummy_b): __dummy_a = ctypes.cast(__dummy_a, ctypes.POINTER(ctypes_wrapped.c_byte)) __dummy_b = g.Py_ssize_t(int(__dummy_b.value)) raise Exception(u"Function 'PyMarshal_ReadObjectFromString' only predeclared. Body is missing. Missing C source code.") del __dummy_b del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) _PyParser_Grammar = grammar() @staticmethod def _PyUnicode_Init(): raise Exception(u"Function '_PyUnicode_Init' only predeclared. Body is missing. Missing C source code.") return @staticmethod def _PyUnicode_Fini(): raise Exception(u"Function '_PyUnicode_Fini' only predeclared. Body is missing. Missing C source code.") return Py_DebugFlag = ctypes_wrapped.c_int() Py_VerboseFlag = ctypes_wrapped.c_int() Py_InteractiveFlag = ctypes_wrapped.c_int() Py_InspectFlag = ctypes_wrapped.c_int() Py_NoSiteFlag = ctypes_wrapped.c_int() Py_BytesWarningFlag = ctypes_wrapped.c_int() Py_DontWriteBytecodeFlag = ctypes_wrapped.c_int() Py_UseClassExceptionsFlag = ctypes_wrapped.c_int() # TODO init Py_UseClassExceptionsFlag with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) Py_FrozenFlag = ctypes_wrapped.c_int() Py_UnicodeFlag = ctypes_wrapped.c_int() Py_IgnoreEnvironmentFlag = ctypes_wrapped.c_int() _Py_QnewFlag = ctypes_wrapped.c_int() Py_NoUserSiteDirectory = ctypes_wrapped.c_int() Py_HashRandomizationFlag = ctypes_wrapped.c_int() @staticmethod def PyModule_GetWarningsModule(): return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_ImportModule(ctypes.cast(intp._make_string('warnings'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) initialized = ctypes_wrapped.c_int() @staticmethod def Py_IsInitialized(): return g.initialized.value return ctypes_wrapped.c_int().value @staticmethod def add_flag(flag, envs): flag = ctypes_wrapped.c_int(int(flag.value)) envs = ctypes.cast(envs, ctypes.POINTER(ctypes_wrapped.c_byte)) env = ctypes_wrapped.c_int(int(values.atoi.value(envs).value)) if ctypes_wrapped.c_int((flag.value < env.value)).value: helpers.assign(flag, env.value) if ctypes_wrapped.c_int((flag.value < ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assign(flag, ctypes_wrapped.c_int(int(1L)).value) return flag.value del envs del flag del env return ctypes_wrapped.c_int().value @staticmethod def Py_InitializeEx(install_sigs): install_sigs = ctypes_wrapped.c_int(int(install_sigs.value)) interp = ctypes.POINTER(g.PyInterpreterState)() tstate = ctypes.POINTER(g.PyThreadState)() bimod = ctypes.POINTER(g.PyObject)() sysmod = ctypes.POINTER(g.PyObject)() p = ctypes.POINTER(ctypes_wrapped.c_byte)() icodeset = ctypes.POINTER(ctypes_wrapped.c_byte)() codeset = ctypes.POINTER(ctypes_wrapped.c_byte)() errors = ctypes.POINTER(ctypes_wrapped.c_byte)() free_codeset = ctypes_wrapped.c_int() overridden = ctypes_wrapped.c_int() sys_stream = ctypes.POINTER(g.PyObject)() sys_isatty = ctypes.POINTER(g.PyObject)() _Py_ReadyTypes_a = None if g.initialized.value: return helpers.assign(g.initialized, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONDEBUG')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_DebugFlag, ctypes_wrapped.c_int(int(g.add_flag(g.Py_DebugFlag, p))).value) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONVERBOSE')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_VerboseFlag, ctypes_wrapped.c_int(int(g.add_flag(g.Py_VerboseFlag, p))).value) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONOPTIMIZE')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_OptimizeFlag, ctypes_wrapped.c_int(int(g.add_flag(g.Py_OptimizeFlag, p))).value) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONDONTWRITEBYTECODE')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_DontWriteBytecodeFlag, ctypes_wrapped.c_int(int(g.add_flag(g.Py_DontWriteBytecodeFlag, p))).value) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONHASHSEED')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assign(g.Py_HashRandomizationFlag, ctypes_wrapped.c_int(int(g.add_flag(g.Py_HashRandomizationFlag, p))).value) g._PyRandom_Init() helpers.assignPtr(interp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInterpreterState_New(), ctypes.POINTER(g.PyInterpreterState))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(interp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't make first interpreter"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(tstate, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyThreadState_New(interp), ctypes.POINTER(g.PyThreadState))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't make first thread"), ctypes.POINTER(ctypes_wrapped.c_byte))) (intp._getPtr(g.PyThreadState_Swap(tstate), ctypes.POINTER(g.PyThreadState)), None)[1] g._Py_ReadyTypes() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyFrame_Init())).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't init frames"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyInt_Init())).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't init ints"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyLong_Init())).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't init longs"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyByteArray_Init())).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't init bytearray"), ctypes.POINTER(ctypes_wrapped.c_byte))) g._PyFloat_Init() helpers.assignPtr(interp.contents.modules, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(interp.contents.modules, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't make modules dictionary"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(interp.contents.modules_reloading, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(interp.contents.modules_reloading, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't make modules_reloading dictionary"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(bimod, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyBuiltin_Init(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(bimod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't initialize __builtin__"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(interp.contents.builtins, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(bimod), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(interp.contents.builtins, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't initialize builtins dict"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.postfixInc(ctypes.cast(interp.contents.builtins, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(sysmod, (ctypes.cast(intp._storePtr(intp._getPtr(g._PySys_Init(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(sysmod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't initialize sys"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(interp.contents.sysdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(sysmod), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(interp.contents.sysdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Py_Initialize: can't initialize sys dict"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.postfixInc(ctypes.cast(interp.contents.sysdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) intp._getPtr(g._PyImport_FixupExtension(ctypes.cast(intp._make_string('sys'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('sys'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) g.PySys_SetPath(intp._getPtr(g.Py_GetPath(), ctypes.POINTER(ctypes_wrapped.c_byte))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(interp.contents.sysdict, ctypes.cast(intp._make_string('modules'), ctypes.POINTER(ctypes_wrapped.c_byte)), interp.contents.modules))) g._PyImport_Init() g._PyExc_Init() intp._getPtr(g._PyImport_FixupExtension(ctypes.cast(intp._make_string('exceptions'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('exceptions'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) intp._getPtr(g._PyImport_FixupExtension(ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) g._PyImportHooks_Init() if install_sigs.value: g.initsigs() g._PyWarnings_Init() if ctypes_wrapped.c_int(int(g.PySys_HasWarnOptions())).value: warnings_module = ctypes.cast(intp._getPtr(g.PyImport_ImportModule(ctypes.cast(intp._make_string('warnings'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(warnings_module, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_Clear() while True: if ctypes_wrapped.c_int(((ctypes.cast(warnings_module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(warnings_module, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(warnings_module, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(warnings_module, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del warnings_module g.initmain() if ctypes_wrapped.c_int(int((not g.Py_NoSiteFlag.value))).value: g.initsite() if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONIOENCODING')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(0).value)).value)).value: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(helpers.assignPtr(icodeset, (ctypes.cast(intp._storePtr(helpers.assignPtr(codeset, (ctypes.cast(intp._storePtr(values.strdup.value(p)), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(free_codeset, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(errors, (ctypes.cast(intp._storePtr(values.strchr.value(p, ctypes_wrapped.c_int(ctypes.c_byte(58).value))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(errors, ctypes_wrapped.c_void_p).value or 0): helpers.assign(errors.contents, ctypes.c_byte(0).value) helpers.postfixIncPtr(errors) helpers.assign(overridden, ctypes_wrapped.c_int(int(1L)).value) if (ctypes.cast(codeset, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(sys_stream, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stdin'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(sys_isatty, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(sys_stream, ctypes.cast(intp._make_string('isatty'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_Clear() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((overridden.value or ctypes_wrapped.c_int(((ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int(g.PyObject_IsTrue(sys_isatty))).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(sys_stream, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFile_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(sys_stream, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFile_Type)))).value)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyFile_SetEncodingAndErrors(sys_stream, icodeset, errors))).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string('Cannot set codeset of stdin'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int(((ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(sys_stream, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(sys_isatty, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(sys_stream, ctypes.cast(intp._make_string('isatty'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_Clear() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((overridden.value or ctypes_wrapped.c_int(((ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int(g.PyObject_IsTrue(sys_isatty))).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(sys_stream, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFile_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(sys_stream, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFile_Type)))).value)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyFile_SetEncodingAndErrors(sys_stream, codeset, errors))).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string('Cannot set codeset of stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int(((ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(sys_stream, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stderr'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(sys_isatty, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(sys_stream, ctypes.cast(intp._make_string('isatty'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_Clear() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((overridden.value or ctypes_wrapped.c_int(((ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int(g.PyObject_IsTrue(sys_isatty))).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(sys_stream, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFile_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(sys_stream, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFile_Type)))).value)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyFile_SetEncodingAndErrors(sys_stream, codeset, errors))).value))).value: g.Py_FatalError(ctypes.cast(intp._make_string('Cannot set codeset of stderr'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int(((ctypes.cast(sys_isatty, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sys_isatty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if free_codeset.value: values.free.value(codeset) del free_codeset del errors del sys_stream del codeset del overridden del interp del sys_isatty del bimod del p del install_sigs del _Py_ReadyTypes_a del sysmod del tstate del icodeset return @staticmethod def Py_Initialize(): g.Py_InitializeEx(ctypes_wrapped.c_int(int(1L))) return @staticmethod def Py_Finalize(): interp = ctypes.POINTER(g.PyInterpreterState)() tstate = ctypes.POINTER(g.PyThreadState)() if ctypes_wrapped.c_int(int((not g.initialized.value))).value: return g.wait_for_thread_shutdown() g.call_sys_exitfunc() helpers.assign(g.initialized, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate, (ctypes.cast(intp._storePtr(g._PyThreadState_Current), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(interp, (ctypes.cast(intp._storePtr(tstate.contents.interp), ctypes_wrapped.c_void_p).value or 0)) g.PyOS_FiniInterrupts() ctypes_wrapped.c_uint(int(g.PyType_ClearCache())) g.Py_ssize_t(int(g.PyGC_Collect())) g.PyImport_Cleanup() g._PyImport_Fini() g.PyInterpreterState_Clear(interp) g._PyExc_Fini() intp._getPtr(g.PyThreadState_Swap(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyThreadState))), ctypes.POINTER(g.PyThreadState)) g.PyInterpreterState_Delete(interp) g.PyMethod_Fini() g.PyFrame_Fini() g.PyCFunction_Fini() g.PyTuple_Fini() g.PyList_Fini() g.PySet_Fini() g.PyString_Fini() g.PyByteArray_Fini() g.PyInt_Fini() g.PyFloat_Fini() g.PyDict_Fini() g.PyGrammar_RemoveAccelerators(ctypes.pointer(g._PyParser_Grammar)) g.call_ll_exitfuncs() del interp del tstate return @staticmethod def Py_NewInterpreter(): goto = None while True: if (goto is None): interp = ctypes.POINTER(g.PyInterpreterState)() tstate = ctypes.POINTER(g.PyThreadState)() save_tstate = ctypes.POINTER(g.PyThreadState)() bimod = ctypes.POINTER(g.PyObject)() sysmod = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(int((not g.initialized.value))).value): goto = 1 continue g.Py_FatalError(ctypes.cast(intp._make_string('Py_NewInterpreter: call Py_Initialize first'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == 1): goto = None if (goto is None): helpers.assignPtr(interp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInterpreterState_New(), ctypes.POINTER(g.PyInterpreterState))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(interp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assignPtr(tstate, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyThreadState_New(interp), ctypes.POINTER(g.PyThreadState))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue g.PyInterpreterState_Delete(interp) return ctypes_wrapped.c_int(int(0L)).value if (goto == 3): goto = None if (goto is None): helpers.assignPtr(save_tstate, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyThreadState_Swap(tstate), ctypes.POINTER(g.PyThreadState))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(interp.contents.modules, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(interp.contents.modules_reloading, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(bimod, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyImport_FindExtension(ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(bimod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue helpers.assignPtr(interp.contents.builtins, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(bimod), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(interp.contents.builtins, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 5 continue goto = u'handle_error' continue if (goto == 5): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(interp.contents.builtins, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 4): goto = None if (goto is None): helpers.assignPtr(sysmod, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyImport_FindExtension(ctypes.cast(intp._make_string('sys'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('sys'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(bimod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(sysmod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 6 continue helpers.assignPtr(interp.contents.sysdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(sysmod), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(interp.contents.sysdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue goto = u'handle_error' continue if (goto == 7): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(interp.contents.sysdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) g.PySys_SetPath(intp._getPtr(g.Py_GetPath(), ctypes.POINTER(ctypes_wrapped.c_byte))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(interp.contents.sysdict, ctypes.cast(intp._make_string('modules'), ctypes.POINTER(ctypes_wrapped.c_byte)), interp.contents.modules))) g._PyImportHooks_Init() g.initmain() if (not ctypes_wrapped.c_int(int((not g.Py_NoSiteFlag.value))).value): goto = 8 continue g.initsite() if (goto == 8): goto = None if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 9 continue return (ctypes.cast(intp._storePtr(tstate), ctypes_wrapped.c_void_p).value or 0) if (goto == 9): goto = None if (goto == u'handle_error'): goto = None if (goto is None): g.PyErr_Print() g.PyThreadState_Clear(tstate) intp._getPtr(g.PyThreadState_Swap(save_tstate), ctypes.POINTER(g.PyThreadState)) g.PyThreadState_Delete(tstate) g.PyInterpreterState_Delete(interp) return ctypes_wrapped.c_int(int(0L)).value del bimod del save_tstate del sysmod del interp del tstate return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def Py_EndInterpreter(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) interp = ctypes.cast(tstate.contents.interp, ctypes.POINTER(g.PyInterpreterState)) if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(g._PyThreadState_Current, ctypes_wrapped.c_void_p).value or 0))).value: g.Py_FatalError(ctypes.cast(intp._make_string('Py_EndInterpreter: thread is not current'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.frame, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('Py_EndInterpreter: thread still has a frame'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(interp.contents.tstate_head, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.next, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('Py_EndInterpreter: not the last thread'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.PyImport_Cleanup() g.PyInterpreterState_Clear(interp) intp._getPtr(g.PyThreadState_Swap(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyThreadState))), ctypes.POINTER(g.PyThreadState)) g.PyInterpreterState_Delete(interp) del interp del tstate return progname = ctypes.POINTER(ctypes_wrapped.c_byte)() # TODO init progname with ctypes.cast(intp._make_string('python'), ctypes.POINTER(ctypes_wrapped.c_byte)) @staticmethod def Py_SetProgramName(pn): pn = ctypes.cast(pn, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(pn, ctypes_wrapped.c_void_p).value or 0) and pn.contents.value)).value: helpers.assignPtr(g.progname, (ctypes.cast(intp._storePtr(pn), ctypes_wrapped.c_void_p).value or 0)) del pn return @staticmethod def Py_GetProgramName(): return (ctypes.cast(intp._storePtr(g.progname), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) default_home = ctypes.POINTER(ctypes_wrapped.c_byte)() @staticmethod def Py_SetPythonHome(home): home = ctypes.cast(home, ctypes.POINTER(ctypes_wrapped.c_byte)) helpers.assignPtr(g.default_home, (ctypes.cast(intp._storePtr(home), ctypes_wrapped.c_void_p).value or 0)) del home return @staticmethod def Py_GetPythonHome(): home = ctypes.cast(g.default_home, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(home, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int((not g.Py_IgnoreEnvironmentFlag.value))).value)).value: helpers.assignPtr(home, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONHOME')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(home), ctypes_wrapped.c_void_p).value or 0) del home return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def initmain(): m = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyObject)() helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_AddModule(ctypes.cast(intp._make_string('__main__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("can't create __main__ module"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(d, ctypes.cast(intp._make_string('__builtins__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: bimod = ctypes.cast(intp._getPtr(g.PyImport_ImportModule(ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(bimod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(d, ctypes.cast(intp._make_string('__builtins__'), ctypes.POINTER(ctypes_wrapped.c_byte)), bimod))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("can't add __builtins__ to __main__"), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int(((ctypes.cast(bimod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bimod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bimod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bimod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del bimod del m del d return @staticmethod def initsite(): m = ctypes.POINTER(g.PyObject)() helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_ImportModule(ctypes.cast(intp._make_string('site'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Print() g.Py_Finalize() values.exit_a.value(ctypes_wrapped.c_int(int(1L))) else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(m, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(m, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(m, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del m return @staticmethod def PyRun_AnyFileExFlags(fp, filename, closeit, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) closeit = ctypes_wrapped.c_int(int(closeit.value)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) if ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(filename, (ctypes.cast(intp._storePtr(intp._make_string('???')), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int(g.Py_FdIsInteractive(fp, filename))).value: err = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyRun_InteractiveLoopFlags(fp, filename, flags))).value)) if closeit.value: values.fclose.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) return err.value del err else: return ctypes_wrapped.c_int(int(g.PyRun_SimpleFileExFlags(fp, filename, closeit, flags))).value del fp del flags del closeit del filename return ctypes_wrapped.c_int().value @staticmethod def PyRun_InteractiveLoopFlags(fp, filename, flags): first_iteration = None fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) v = ctypes.POINTER(g.PyObject)() ret = ctypes_wrapped.c_int() local_flags = g.PyCompilerFlags() if ctypes_wrapped.c_int(((ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(flags, (ctypes.cast(intp._storePtr(ctypes.pointer(local_flags)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(local_flags.cf_flags, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('ps1'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('ps1'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('>>> '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('ps2'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('ps2'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('... '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if True: first_iteration = True while True: if first_iteration: first_iteration = False helpers.assign(ret, ctypes_wrapped.c_int(int(g.PyRun_InteractiveOneFlags(fp, filename, flags))).value) if ctypes_wrapped.c_int((ret.value == ctypes_wrapped.c_int(int(11L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del fp del local_flags del filename del flags del ret del v return ctypes_wrapped.c_int().value @staticmethod def PyRun_InteractiveOneFlags(fp, filename, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) m = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() mod = g.mod_ty() arena = ctypes.POINTER(g.PyArena)() ps1 = ctypes.POINTER(ctypes_wrapped.c_byte)() ps2 = ctypes.POINTER(ctypes_wrapped.c_byte)() errcode = ctypes_wrapped.c_int() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('ps1'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(ps1, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(v), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('ps2'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(ps2, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(w), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(arena, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyArena_New(), ctypes.POINTER(g.PyArena))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(arena, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_ASTFromFile(fp, filename, ctypes_wrapped.c_int(int(256L)), ps1, ps2, flags, ctypes.pointer(errcode), arena), ctypes.POINTER(structs._mod))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyArena_Free(arena) if ctypes_wrapped.c_int((errcode.value == ctypes_wrapped.c_int(int(11L)).value)).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(11L)).value g.PyErr_Print() return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_AddModule(ctypes.cast(intp._make_string('__main__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyArena_Free(arena) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.run_mod(mod, filename, d, d, flags, arena), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyArena_Free(arena) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Print() return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(g.Py_FlushLine())).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value del fp del arena del d del m del errcode del filename del flags del w del v del ps2 del ps1 del mod return ctypes_wrapped.c_int().value @staticmethod def maybe_pyc_file(fp, filename, ext, closeit): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) ext = ctypes.cast(ext, ctypes.POINTER(ctypes_wrapped.c_byte)) closeit = ctypes_wrapped.c_int(int(closeit.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((values.strcmp.value(ext, ctypes.cast(intp._make_string('.pyc'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((values.strcmp.value(ext, ctypes.cast(intp._make_string('.pyo'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(1L)).value if closeit.value: halfmagic = ctypes_wrapped.c_uint(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int(g.PyImport_GetMagicNumber())).value & ctypes_wrapped.c_int(int(65535L)).value))).value)) buf = (ctypes_wrapped.c_ubyte * 2L)() ispyc = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((values.ftell.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))).value == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((values.fread.value(ctypes.cast(buf, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_ulong(ctypes_wrapped.c_int(int(2L)).value), ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))).value == ctypes_wrapped.c_int(int(2L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int(helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value)).value << ctypes_wrapped.c_int(int(8L)).value))).value | helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value))).value == halfmagic.value)).value)).value: helpers.assign(ispyc, ctypes_wrapped.c_int(int(1L)).value) values.rewind.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) return ispyc.value del halfmagic del buf del ispyc return ctypes_wrapped.c_int(int(0L)).value del fp del ext del closeit del filename return ctypes_wrapped.c_int().value @staticmethod def PyRun_SimpleFileExFlags(fp, filename, closeit, flags): goto = None while True: if (goto is None): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) closeit = ctypes_wrapped.c_int(int(closeit.value)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) m = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() ext = ctypes.POINTER(ctypes_wrapped.c_byte)() set_file_name = ctypes_wrapped.c_int() len_a = ctypes_wrapped.c_int() ret = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_AddModule(ctypes.cast(intp._make_string('__main__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(m, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(d, ctypes.cast(intp._make_string('__file__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue f = ctypes.cast(intp._getPtr(g.PyString_FromString(filename), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'done' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(d, ctypes.cast(intp._make_string('__file__'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): goto = u'done' continue if (goto == 4): goto = None if (goto is None): helpers.assign(set_file_name, ctypes_wrapped.c_int(int(1L)).value) if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): del f if (goto == 2): goto = None if (goto is None): helpers.assign(len_a, values.strlen.value(filename).value) helpers.assignPtr(ext, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(filename, u'+', len_a.value), u'-', (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(4L)).value)) if ctypes_wrapped.c_int((len_a.value > ctypes_wrapped.c_int(int(4L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value)), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(int(g.maybe_pyc_file(fp, filename, ext, closeit))).value): goto = 18 continue if (not closeit.value): goto = 19 continue values.fclose.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(fp, (ctypes.cast(intp._storePtr(values.fopen.value(filename, ctypes.cast(intp._make_string('rb'), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string("python: Can't reopen .pyc file\n"), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'done' continue if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int((values.strcmp.value(ext, ctypes.cast(intp._make_string('.pyo'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue helpers.assign(g.Py_OptimizeFlag, ctypes_wrapped.c_int(int(1L)).value) if (goto == 21): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.run_pyc_file(fp, filename, d, d, flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 17 continue if (goto == 18): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_FileExFlags(fp, filename, ctypes_wrapped.c_int(int(257L)), d, d, closeit, flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue g.PyErr_Print() goto = u'done' continue if (goto == 22): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.Py_FlushLine())).value): goto = 29 continue g.PyErr_Clear() if (goto == 29): goto = None if (goto is None): helpers.assign(ret, ctypes_wrapped.c_int(int(0L)).value) if (goto == u'done'): goto = None if (goto is None): if (not ctypes_wrapped.c_int((set_file_name.value and ctypes_wrapped.c_int(int(g.PyDict_DelItemString(d, ctypes.cast(intp._make_string('__file__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value): goto = 30 continue g.PyErr_Clear() if (goto == 30): goto = None if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(m, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(m, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(m, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 36 continue continue goto = 35 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto is None): return ret.value del fp del set_file_name del closeit del d del len_a del m del ret del filename del ext del flags del v return ctypes_wrapped.c_int().value break @staticmethod def PyRun_SimpleStringFlags(command, flags): command = ctypes.cast(command, ctypes.POINTER(ctypes_wrapped.c_byte)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) m = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_AddModule(ctypes.cast(intp._make_string('__main__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_StringFlags(command, ctypes_wrapped.c_int(int(257L)), d, d, flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Print() return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(g.Py_FlushLine())).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value del flags del v del command del m del d return ctypes_wrapped.c_int().value @staticmethod def parse_syntax_error(err, message, filename, lineno, offset, text): goto = None while True: if (goto is None): err = ctypes.cast(err, ctypes.POINTER(g.PyObject)) message = ctypes.cast(message, ctypes.POINTER(ctypes.POINTER(g.PyObject))) filename = ctypes.cast(filename, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) lineno = ctypes.cast(lineno, ctypes.POINTER(ctypes_wrapped.c_int)) offset = ctypes.cast(offset, ctypes.POINTER(ctypes_wrapped.c_int)) text = ctypes.cast(text, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) hold = ctypes_wrapped.c_long() v = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(err, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(err, ctypes.cast(intp._make_string('O(ziiz)'), ctypes.POINTER(ctypes_wrapped.c_byte)), message, filename, lineno, offset, text))).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(message.contents, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(message.contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(err, ctypes.cast(intp._make_string('msg'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(message.contents, ctypes_wrapped.c_void_p).value or 0))).value): goto = 2 continue goto = u'finally' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(err, ctypes.cast(intp._make_string('filename'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value): goto = 3 continue goto = u'finally' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 11 continue continue goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(filename.contents, ctypes_wrapped.c_int(int(0L)).value) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(filename.contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(v), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 12): goto = None if (goto is None): if (not True): goto = 13 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not (ctypes.cast(filename.contents, ctypes_wrapped.c_void_p).value or 0))).value): goto = 18 continue goto = u'finally' continue if (goto == 18): goto = None if (goto == 4): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(err, ctypes.cast(intp._make_string('lineno'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value): goto = 19 continue goto = u'finally' continue if (goto == 19): goto = None if (goto is None): helpers.assign(hold, ctypes_wrapped.c_long(int(g.PyInt_AsLong(v))).value) if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((hold.value < ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 26 continue goto = u'finally' continue if (goto == 26): goto = None if (goto is None): helpers.assign(lineno.contents, ctypes_wrapped.c_int(int(hold.value)).value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(err, ctypes.cast(intp._make_string('offset'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value): goto = 27 continue goto = u'finally' continue if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 29 continue helpers.assign(offset.contents, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 30): goto = None if (goto is None): if (not True): goto = 31 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 33 continue pass goto = 32 continue if (goto == 33): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 32): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 35 continue continue goto = 34 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 34): goto = None if (goto is None): goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 28 continue if (goto == 29): goto = None if (goto is None): helpers.assign(hold, ctypes_wrapped.c_long(int(g.PyInt_AsLong(v))).value) if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((hold.value < ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 42 continue goto = u'finally' continue if (goto == 42): goto = None if (goto is None): helpers.assign(offset.contents, ctypes_wrapped.c_int(int(hold.value)).value) if (goto == 28): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(err, ctypes.cast(intp._make_string('text'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value): goto = 43 continue goto = u'finally' continue if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 45 continue if (goto == 46): goto = None if (goto is None): if (not True): goto = 47 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 49 continue pass goto = 48 continue if (goto == 49): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 48): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 51 continue continue goto = 50 continue if (goto == 51): goto = None if (goto is None): goto = 47 continue if (goto == 50): goto = None if (goto is None): goto = 46 continue if (goto == 47): goto = None if (goto is None): helpers.assignPtr(text.contents, ctypes_wrapped.c_int(int(0L)).value) goto = 44 continue if (goto == 45): goto = None if (goto is None): helpers.assignPtr(text.contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(v), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 52): goto = None if (goto is None): if (not True): goto = 53 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 55 continue pass goto = 54 continue if (goto == 55): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 54): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 57 continue continue goto = 56 continue if (goto == 57): goto = None if (goto is None): goto = 53 continue if (goto == 56): goto = None if (goto is None): goto = 52 continue if (goto == 53): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not (ctypes.cast(text.contents, ctypes_wrapped.c_void_p).value or 0))).value): goto = 58 continue goto = u'finally' continue if (goto == 58): goto = None if (goto == 44): goto = None if (goto is None): return ctypes_wrapped.c_int(int(1L)).value if (goto == u'finally'): goto = None if (goto == 59): goto = None if (goto is None): if (not True): goto = 60 continue if (not ctypes_wrapped.c_int(((ctypes.cast(message.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 62 continue pass goto = 61 continue if (goto == 62): goto = None if (goto == 63): goto = None if (goto is None): if (not True): goto = 64 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(message.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 66 continue pass goto = 65 continue if (goto == 66): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(message.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(message.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 65): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 68 continue continue goto = 67 continue if (goto == 68): goto = None if (goto is None): goto = 64 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 64): goto = None if (goto == 61): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 70 continue continue goto = 69 continue if (goto == 70): goto = None if (goto is None): goto = 60 continue if (goto == 69): goto = None if (goto is None): goto = 59 continue if (goto == 60): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del err del text del v del filename del lineno del offset del message del hold return ctypes_wrapped.c_int().value break @staticmethod def PyErr_Print(): g.PyErr_PrintEx(ctypes_wrapped.c_int(int(1L))) return @staticmethod def print_error_text(f, offset, text): first_iteration = None f = ctypes.cast(f, ctypes.POINTER(g.PyObject)) offset = ctypes_wrapped.c_int(int(offset.value)) text = ctypes.cast(text, ctypes.POINTER(ctypes_wrapped.c_byte)) nl = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((offset.value >= ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((offset.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((offset.value == values.strlen.value(text).value)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(text, '+', ctypes_wrapped.c_uint(int((offset.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value == ctypes.c_byte(10).value)).value)).value: helpers.postfixDec(offset) if True: first_iteration = True while True: if first_iteration: first_iteration = False helpers.assignPtr(nl, (ctypes.cast(intp._storePtr(values.strchr.value(text, ctypes_wrapped.c_int(ctypes.c_byte(10).value))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(nl, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_long((((ctypes.cast(nl, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(text, ctypes_wrapped.c_void_p).value or 0)) / 1)).value >= offset.value)).value)).value: break helpers.augAssign(offset, u'-=', ctypes_wrapped.c_int(int(ctypes_wrapped.c_long((((ctypes.cast(helpers.ptrArithmetic(nl, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(text, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)).value) helpers.assignPtr(text, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(nl, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((ctypes_wrapped.c_int((text.contents.value == ctypes.c_byte(32).value)).value or ctypes_wrapped.c_int((text.contents.value == ctypes.c_byte(9).value)).value)).value: helpers.postfixIncPtr(text) helpers.postfixDec(offset) ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(' '), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) ctypes_wrapped.c_int(int(g.PyFile_WriteString(text, f))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((text.contents.value == ctypes.c_byte(0).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(text, '+', ctypes_wrapped.c_ulong(int((values.strlen.value(text).value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value != ctypes.c_byte(10).value)).value)).value: ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) if ctypes_wrapped.c_int((offset.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(' '), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) helpers.postfixDec(offset) while ctypes_wrapped.c_int((offset.value > ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(' '), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) helpers.postfixDec(offset) ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('^\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) del text del offset del nl del f return @staticmethod def handle_system_exit(): goto = None while True: if (goto is None): exception = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() tb = ctypes.POINTER(g.PyObject)() exitcode = ctypes_wrapped.c_int() if (not g.Py_InspectFlag.value): goto = 1 continue return if (goto == 1): goto = None if (goto is None): g.PyErr_Fetch(ctypes.pointer(exception), ctypes.pointer(value), ctypes.pointer(tb)) if (not ctypes_wrapped.c_int(int(g.Py_FlushLine())).value): goto = 2 continue g.PyErr_Clear() if (goto == 2): goto = None if (goto is None): values.fflush.value(values.stdout.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 3 continue goto = u'done' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(value.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((value.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 4 continue code = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(value, ctypes.cast(intp._make_string('code'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not (ctypes.cast(code, ctypes_wrapped.c_void_p).value or 0)): goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 11 continue continue goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(value, (ctypes.cast(intp._storePtr(code), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 12 continue goto = u'done' continue if (goto == 12): goto = None if (goto == 5): goto = None if (goto is None): del code if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((value.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue helpers.assign(exitcode, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(g.PyInt_AsLong(value))).value)).value) goto = 13 continue if (goto == 14): goto = None if (goto is None): sys_stderr = ctypes.cast(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stderr'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(sys_stderr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(sys_stderr, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 16 continue ctypes_wrapped.c_int(int(g.PyFile_WriteObject(value, sys_stderr, ctypes_wrapped.c_int(int(1L))))) goto = 15 continue if (goto == 16): goto = None if (goto is None): ctypes_wrapped.c_int(int(g.PyObject_Print(value, ctypes.cast(values.stderr.value, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes_wrapped.c_int(int(1L))))) values.fflush.value(values.stderr.value) if (goto == 15): goto = None if (goto is None): g.PySys_WriteStderr(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(exitcode, ctypes_wrapped.c_int(int(1L)).value) del sys_stderr if (goto == 13): goto = None if (goto == u'done'): goto = None if (goto is None): g.PyErr_Restore(exception, value, tb) g.PyErr_Clear() g.Py_Exit(exitcode) del exception del tb del value del exitcode return break @staticmethod def PyErr_PrintEx(set_sys_last_vars): set_sys_last_vars = ctypes_wrapped.c_int(int(set_sys_last_vars.value)) exception = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() tb = ctypes.POINTER(g.PyObject)() hook = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_SystemExit))).value: g.handle_system_exit() g.PyErr_Fetch(ctypes.pointer(exception), ctypes.pointer(v), ctypes.pointer(tb)) if ctypes_wrapped.c_int(((ctypes.cast(exception, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return g.PyErr_NormalizeException(ctypes.pointer(exception), ctypes.pointer(v), ctypes.pointer(tb)) if ctypes_wrapped.c_int(((ctypes.cast(exception, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return if set_sys_last_vars.value: ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('last_type'), ctypes.POINTER(ctypes_wrapped.c_byte)), exception))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('last_value'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('last_traceback'), ctypes.POINTER(ctypes_wrapped.c_byte)), tb))) helpers.assignPtr(hook, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('excepthook'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(hook, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(hook, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: args = ctypes.cast(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value)), exception, v, (ctypes.cast(tb, ctypes.POINTER(g.PyObject)) if (ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.PyEval_CallObjectWithKeywords(hook, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: exception2 = ctypes.POINTER(g.PyObject)() v2 = ctypes.POINTER(g.PyObject)() tb2 = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_SystemExit))).value: g.handle_system_exit() g.PyErr_Fetch(ctypes.pointer(exception2), ctypes.pointer(v2), ctypes.pointer(tb2)) g.PyErr_NormalizeException(ctypes.pointer(exception2), ctypes.pointer(v2), ctypes.pointer(tb2)) if ctypes_wrapped.c_int(((ctypes.cast(exception2, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(exception2, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(exception2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(((ctypes.cast(v2, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(v2, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(g.Py_FlushLine())).value: g.PyErr_Clear() values.fflush.value(values.stdout.value) g.PySys_WriteStderr(ctypes.cast(intp._make_string('Error in sys.excepthook:\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.PyErr_Display(exception2, v2, tb2) g.PySys_WriteStderr(ctypes.cast(intp._make_string('\nOriginal exception was:\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.PyErr_Display(exception, v, tb) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(exception2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(exception2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(exception2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tb2, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tb2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tb2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tb2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del exception2 del v2 del tb2 while True: if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del args del result else: g.PySys_WriteStderr(ctypes.cast(intp._make_string('sys.excepthook is missing\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.PyErr_Display(exception, v, tb) while True: if ctypes_wrapped.c_int(((ctypes.cast(exception, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(exception, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(exception, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(exception, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del hook del exception del v del tb del set_sys_last_vars return @staticmethod def PyErr_Display(exception, value, tb): exception = ctypes.cast(exception, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) tb = ctypes.cast(tb, ctypes.POINTER(g.PyObject)) err = ctypes_wrapped.c_int() f = ctypes.cast(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stderr'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('lost sys.stderr\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) else: if ctypes_wrapped.c_int(int(g.Py_FlushLine())).value: g.PyErr_Clear() values.fflush.value(values.stdout.value) if ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyTraceBack_Print(tb, f))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyObject_HasAttrString(value, ctypes.cast(intp._make_string('print_file_and_line'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: message = ctypes.POINTER(g.PyObject)() filename = ctypes.POINTER(ctypes_wrapped.c_byte)() text = ctypes.POINTER(ctypes_wrapped.c_byte)() lineno = ctypes_wrapped.c_int() offset = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.parse_syntax_error(value, ctypes.pointer(message), ctypes.pointer(filename), ctypes.pointer(lineno), ctypes.pointer(offset), ctypes.pointer(text)))).value))).value: g.PyErr_Clear() else: buf = (ctypes_wrapped.c_byte * 10L)() ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(' File "'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) if ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) else: ctypes_wrapped.c_int(int(g.PyFile_WriteString(filename, f))) ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('", line '), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) ctypes_wrapped.c_int(int(g.PyOS_snprintf(ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_size_t(ctypes.sizeof(buf)), ctypes.cast(intp._make_string('%d'), ctypes.POINTER(ctypes_wrapped.c_byte)), lineno))) ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte)), f))) ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))) if ctypes_wrapped.c_int(((ctypes.cast(text, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: g.print_error_text(f, offset, text) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(value, (ctypes.cast(intp._storePtr(message), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) del buf del text del message del offset del lineno del filename if err.value: pass elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(exception.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(exception, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(exception, ctypes.POINTER(g.PyTypeObject)).contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: moduleName = ctypes.POINTER(g.PyObject)() className = ctypes.cast((ctypes.cast(ctypes.cast(ctypes.cast(exception, ctypes.POINTER(g.PyClassObject)).contents.cl_name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(exception.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value else ctypes.cast(ctypes.cast(ctypes.cast(exception, ctypes.POINTER(g.PyTypeObject)).contents.tp_name, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(className, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: dot = ctypes.cast(values.strrchr.value(className, ctypes_wrapped.c_int(ctypes.c_byte(46).value)), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(dot, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(className, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(dot, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) del dot helpers.assignPtr(moduleName, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(exception, ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(moduleName, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value) else: modstr = ctypes.cast(intp._getPtr(g.PyString_AsString(moduleName), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(modstr, ctypes_wrapped.c_void_p).value or 0) and values.strcmp.value(modstr, ctypes.cast(intp._make_string('exceptions'), ctypes.POINTER(ctypes_wrapped.c_byte))).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(modstr, f))).value) helpers.augAssign(err, u'+=', ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('.'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(moduleName, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(moduleName, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(moduleName, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del modstr if ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(className, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value) else: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(className, f))).value) del className del moduleName else: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteObject(exception, f, ctypes_wrapped.c_int(int(1L))))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: s = ctypes.cast(intp._getPtr(g.PyObject_Str(value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(s, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string(': '), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value) if ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyFile_WriteObject(s, f, ctypes_wrapped.c_int(int(1L))))).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del s helpers.augAssign(err, u'+=', ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), f))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((err.value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() del exception del tb del err del value del f return @staticmethod def PyRun_StringFlags(str_a, start, globals_a, locals_a, flags): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) ret = ctypes.POINTER(g.PyObject)() mod = g.mod_ty() arena = ctypes.cast(intp._getPtr(g.PyArena_New(), ctypes.POINTER(g.PyArena)), ctypes.POINTER(g.PyArena)) if ctypes_wrapped.c_int(((ctypes.cast(arena, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_ASTFromString(str_a, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), start, flags, arena), ctypes.POINTER(structs._mod))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(ret, (ctypes.cast(intp._storePtr(intp._getPtr(g.run_mod(mod, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), globals_a, locals_a, flags, arena), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyArena_Free(arena) return (ctypes.cast(intp._storePtr(ret), ctypes_wrapped.c_void_p).value or 0) del arena del globals_a del str_a del locals_a del ret del start del flags del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_FileExFlags(fp, filename, start, globals_a, locals_a, closeit, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) closeit = ctypes_wrapped.c_int(int(closeit.value)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) ret = ctypes.POINTER(g.PyObject)() mod = g.mod_ty() arena = ctypes.cast(intp._getPtr(g.PyArena_New(), ctypes.POINTER(g.PyArena)), ctypes.POINTER(g.PyArena)) if ctypes_wrapped.c_int(((ctypes.cast(arena, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_ASTFromFile(fp, filename, start, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), flags, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_int)), arena), ctypes.POINTER(structs._mod))), ctypes_wrapped.c_void_p).value or 0)) if closeit.value: values.fclose.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyArena_Free(arena) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ret, (ctypes.cast(intp._storePtr(intp._getPtr(g.run_mod(mod, filename, globals_a, locals_a, flags, arena), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyArena_Free(arena) return (ctypes.cast(intp._storePtr(ret), ctypes_wrapped.c_void_p).value or 0) del fp del globals_a del closeit del locals_a del arena del ret del filename del start del flags del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def run_mod(mod, filename, globals_a, locals_a, flags, arena): mod = ctypes.cast(mod, g.mod_ty) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) co = ctypes.POINTER(g.PyCodeObject)() v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(co, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyAST_Compile(mod, filename, flags, arena), ctypes.POINTER(g.PyCodeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(co, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalCode(co, globals_a, locals_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(co, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(co, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(co, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del arena del globals_a del co del locals_a del filename del flags del v del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def run_pyc_file(fp, filename, globals_a, locals_a, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) globals_a = ctypes.cast(globals_a, ctypes.POINTER(g.PyObject)) locals_a = ctypes.cast(locals_a, ctypes.POINTER(g.PyObject)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) co = ctypes.POINTER(g.PyCodeObject)() v = ctypes.POINTER(g.PyObject)() magic = ctypes_wrapped.c_long() PyImport_GetMagicNumber_a = None helpers.assign(magic, ctypes_wrapped.c_long(int(g.PyMarshal_ReadLongFromFile(fp))).value) if ctypes_wrapped.c_int((magic.value != ctypes_wrapped.c_long(int(g.PyImport_GetMagicNumber())).value)).value: g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('Bad magic number in .pyc file'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value (ctypes_wrapped.c_long(int(g.PyMarshal_ReadLongFromFile(fp))), None)[1] helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyMarshal_ReadLastObjectFromFile(fp), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.fclose.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCode_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('Bad code object in .pyc file'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(co, (ctypes.cast(intp._storePtr(ctypes.cast(v, ctypes.POINTER(g.PyCodeObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_EvalCode(co, globals_a, locals_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0))).value: helpers.augAssign(flags.contents.cf_flags, u'|=', ctypes_wrapped.c_uint(int((co.contents.co_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8192L)).value | ctypes_wrapped.c_int(int(16384L)).value))).value | ctypes_wrapped.c_int(int(32768L)).value))).value | ctypes_wrapped.c_int(int(65536L)).value))).value | ctypes_wrapped.c_int(int(131072L)).value))).value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(co, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(co, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(co, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del fp del globals_a del co del locals_a del filename del PyImport_GetMagicNumber_a del flags del v del magic return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_CompileStringFlags(str_a, filename, start, flags): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) co = ctypes.POINTER(g.PyCodeObject)() mod = g.mod_ty() arena = ctypes.cast(intp._getPtr(g.PyArena_New(), ctypes.POINTER(g.PyArena)), ctypes.POINTER(g.PyArena)) if ctypes_wrapped.c_int(((ctypes.cast(arena, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_ASTFromString(str_a, filename, start, flags, arena), ctypes.POINTER(structs._mod))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyArena_Free(arena) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(1024L)).value))).value)).value: result = ctypes.cast(intp._getPtr(g.PyAST_mod2obj(mod), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) g.PyArena_Free(arena) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result helpers.assignPtr(co, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyAST_Compile(mod, filename, flags, arena), ctypes.POINTER(g.PyCodeObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyArena_Free(arena) return (ctypes.cast(intp._storePtr(ctypes.cast(co, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arena del str_a del filename del start del flags del co del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_SymtableString(str_a, filename, start): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) st = ctypes.POINTER(structs.symtable)() mod = g.mod_ty() flags = g.PyCompilerFlags() arena = ctypes.cast(intp._getPtr(g.PyArena_New(), ctypes.POINTER(g.PyArena)), ctypes.POINTER(g.PyArena)) if ctypes_wrapped.c_int(((ctypes.cast(arena, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(flags.cf_flags, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_ASTFromString(str_a, filename, start, ctypes.pointer(flags), arena), ctypes.POINTER(structs._mod))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyArena_Free(arena) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(st, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySymtable_Build(mod, filename, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyFutureFeatures))), ctypes.POINTER(structs.symtable))), ctypes_wrapped.c_void_p).value or 0)) g.PyArena_Free(arena) return (ctypes.cast(intp._storePtr(st), ctypes_wrapped.c_void_p).value or 0) del arena del str_a del st del start del flags del filename del mod return (ctypes.cast(ctypes.POINTER(structs.symtable)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ASTFromString(s, filename, start, flags, arena): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) mod = g.mod_ty() localflags = g.PyCompilerFlags() err = g.perrdetail() iflags = ctypes_wrapped.c_int(int((ctypes_wrapped.c_uint(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(2L)).value)) if ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(512L)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value | (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(4L)).value)) if ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(65536L)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value))).value | (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(8L)).value)) if ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(131072L)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value))).value)) if (ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0) else ctypes_wrapped.c_uint(int(ctypes_wrapped.c_int(int(0L)).value))).value)) n = ctypes.cast(intp._getPtr(g.PyParser_ParseStringFlagsFilenameEx(s, filename, ctypes.pointer(g._PyParser_Grammar), start, ctypes.pointer(err), ctypes.pointer(iflags)), ctypes.POINTER(g.node)), ctypes.POINTER(g.node)) if ctypes_wrapped.c_int(((ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(localflags.cf_flags, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(flags, (ctypes.cast(intp._storePtr(ctypes.pointer(localflags)), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0): helpers.augAssign(flags.contents.cf_flags, u'|=', ctypes_wrapped.c_uint(int((iflags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8192L)).value | ctypes_wrapped.c_int(int(16384L)).value))).value | ctypes_wrapped.c_int(int(32768L)).value))).value | ctypes_wrapped.c_int(int(65536L)).value))).value | ctypes_wrapped.c_int(int(131072L)).value))).value))).value) helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyAST_FromNode(n, flags, filename, arena), g.mod_ty)), ctypes_wrapped.c_void_p).value or 0)) g.PyNode_Free(n) return (ctypes.cast(intp._storePtr(mod), ctypes_wrapped.c_void_p).value or 0) else: g.err_input(ctypes.pointer(err)) return ctypes_wrapped.c_int(int(0L)).value del arena del err del localflags del filename del iflags del start del s del flags del n del mod return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_ASTFromFile(fp, filename, start, ps1, ps2, flags, errcode, arena): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) ps1 = ctypes.cast(ps1, ctypes.POINTER(ctypes_wrapped.c_byte)) ps2 = ctypes.cast(ps2, ctypes.POINTER(ctypes_wrapped.c_byte)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) errcode = ctypes.cast(errcode, ctypes.POINTER(ctypes_wrapped.c_int)) arena = ctypes.cast(arena, ctypes.POINTER(g.PyArena)) mod = g.mod_ty() localflags = g.PyCompilerFlags() err = g.perrdetail() iflags = ctypes_wrapped.c_int(int((ctypes_wrapped.c_uint(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(2L)).value)) if ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(512L)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value | (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(4L)).value)) if ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(65536L)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value))).value | (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(8L)).value)) if ctypes_wrapped.c_uint(int((flags.contents.cf_flags.value & ctypes_wrapped.c_int(int(131072L)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value))).value)) if (ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0) else ctypes_wrapped.c_uint(int(ctypes_wrapped.c_int(int(0L)).value))).value)) n = ctypes.cast(intp._getPtr(g.PyParser_ParseFileFlagsEx(fp, filename, ctypes.pointer(g._PyParser_Grammar), start, ps1, ps2, ctypes.pointer(err), ctypes.pointer(iflags)), ctypes.POINTER(g.node)), ctypes.POINTER(g.node)) if ctypes_wrapped.c_int(((ctypes.cast(flags, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(localflags.cf_flags, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(flags, (ctypes.cast(intp._storePtr(ctypes.pointer(localflags)), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0): helpers.augAssign(flags.contents.cf_flags, u'|=', ctypes_wrapped.c_uint(int((iflags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8192L)).value | ctypes_wrapped.c_int(int(16384L)).value))).value | ctypes_wrapped.c_int(int(32768L)).value))).value | ctypes_wrapped.c_int(int(65536L)).value))).value | ctypes_wrapped.c_int(int(131072L)).value))).value))).value) helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyAST_FromNode(n, flags, filename, arena), g.mod_ty)), ctypes_wrapped.c_void_p).value or 0)) g.PyNode_Free(n) return (ctypes.cast(intp._storePtr(mod), ctypes_wrapped.c_void_p).value or 0) else: g.err_input(ctypes.pointer(err)) if (ctypes.cast(errcode, ctypes_wrapped.c_void_p).value or 0): helpers.assign(errcode.contents, err.error.value) return ctypes_wrapped.c_int(int(0L)).value del fp del arena del err del localflags del errcode del filename del iflags del start del n del flags del ps2 del ps1 del mod return (ctypes.cast(g.mod_ty(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_SimpleParseFileFlags(fp, filename, start, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) flags = ctypes_wrapped.c_int(int(flags.value)) err = g.perrdetail() n = ctypes.cast(intp._getPtr(g.PyParser_ParseFileFlags(fp, filename, ctypes.pointer(g._PyParser_Grammar), start, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(err), flags), ctypes.POINTER(g.node)), ctypes.POINTER(g.node)) if ctypes_wrapped.c_int(((ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.err_input(ctypes.pointer(err)) return (ctypes.cast(intp._storePtr(n), ctypes_wrapped.c_void_p).value or 0) del fp del err del n del start del flags del filename return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_SimpleParseStringFlags(str_a, start, flags): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) flags = ctypes_wrapped.c_int(int(flags.value)) err = g.perrdetail() n = ctypes.cast(intp._getPtr(g.PyParser_ParseStringFlags(str_a, ctypes.pointer(g._PyParser_Grammar), start, ctypes.pointer(err), flags), ctypes.POINTER(g.node)), ctypes.POINTER(g.node)) if ctypes_wrapped.c_int(((ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.err_input(ctypes.pointer(err)) return (ctypes.cast(intp._storePtr(n), ctypes_wrapped.c_void_p).value or 0) del start del str_a del flags del err del n return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_SimpleParseStringFlagsFilename(str_a, filename, start, flags): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) flags = ctypes_wrapped.c_int(int(flags.value)) err = g.perrdetail() n = ctypes.cast(intp._getPtr(g.PyParser_ParseStringFlagsFilename(str_a, filename, ctypes.pointer(g._PyParser_Grammar), start, ctypes.pointer(err), flags), ctypes.POINTER(g.node)), ctypes.POINTER(g.node)) if ctypes_wrapped.c_int(((ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.err_input(ctypes.pointer(err)) return (ctypes.cast(intp._storePtr(n), ctypes_wrapped.c_void_p).value or 0) del str_a del err del n del start del flags del filename return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_SimpleParseStringFilename(str_a, filename, start): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_SimpleParseStringFlagsFilename(str_a, filename, start, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.node))), ctypes_wrapped.c_void_p).value or 0) del start del str_a del filename return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_SetError(err): err = ctypes.cast(err, ctypes.POINTER(g.perrdetail)) g.err_input(err) del err return @staticmethod def err_input(err): goto = None while True: if (goto is None): err = ctypes.cast(err, ctypes.POINTER(g.perrdetail)) v = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() errtype = ctypes.POINTER(g.PyObject)() u = ctypes.POINTER(g.PyObject)() msg = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(errtype, (ctypes.cast(intp._storePtr(g.PyExc_SyntaxError), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 1 continue _switchvalue = None _switchvalue = err.contents.error.value _switchfallthrough = None _switchfallthrough = False if (goto == 2): goto = None if (goto is None): if (not True): goto = 3 continue if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(17L)).value))): goto = 4 continue _switchfallthrough = True return if (goto == 4): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(14L)).value))): goto = 5 continue _switchfallthrough = True helpers.assignPtr(errtype, (ctypes.cast(intp._storePtr(g.PyExc_IndentationError), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((err.contents.expected.value == ctypes_wrapped.c_int(int(5L)).value)).value): goto = 7 continue helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('expected an indented block')), ctypes_wrapped.c_void_p).value or 0)) goto = 6 continue if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.contents.token.value == ctypes_wrapped.c_int(int(5L)).value)).value): goto = 9 continue helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unexpected indent')), ctypes_wrapped.c_void_p).value or 0)) goto = 8 continue if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.contents.token.value == ctypes_wrapped.c_int(int(6L)).value)).value): goto = 11 continue helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unexpected unindent')), ctypes_wrapped.c_void_p).value or 0)) goto = 10 continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(errtype, (ctypes.cast(intp._storePtr(g.PyExc_SyntaxError), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('invalid syntax')), ctypes_wrapped.c_void_p).value or 0)) if (goto == 10): goto = None if (goto == 8): goto = None if (goto == 6): goto = None if (goto is None): goto = 3 continue if (goto == 5): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(13L)).value))): goto = 12 continue _switchfallthrough = True helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('invalid token')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 12): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(23L)).value))): goto = 13 continue _switchfallthrough = True helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('EOF while scanning triple-quoted string literal')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 13): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(24L)).value))): goto = 14 continue _switchfallthrough = True helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('EOL while scanning string literal')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 14): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(12L)).value))): goto = 15 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 16 continue g.PyErr_SetNone(g.PyExc_KeyboardInterrupt) if (goto == 16): goto = None if (goto is None): goto = u'cleanup' continue if (goto == 15): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(15L)).value))): goto = 17 continue _switchfallthrough = True intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) goto = u'cleanup' continue if (goto == 17): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(11L)).value))): goto = 18 continue _switchfallthrough = True helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unexpected EOF while parsing')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 18): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(18L)).value))): goto = 19 continue _switchfallthrough = True helpers.assignPtr(errtype, (ctypes.cast(intp._storePtr(g.PyExc_TabError), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('inconsistent use of tabs and spaces in indentation')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 19): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(19L)).value))): goto = 20 continue _switchfallthrough = True helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('expression too long')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 20): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(21L)).value))): goto = 21 continue _switchfallthrough = True helpers.assignPtr(errtype, (ctypes.cast(intp._storePtr(g.PyExc_IndentationError), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unindent does not match any outer indentation level')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 21): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(20L)).value))): goto = 22 continue _switchfallthrough = True helpers.assignPtr(errtype, (ctypes.cast(intp._storePtr(g.PyExc_IndentationError), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('too many levels of indentation')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 22): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(22L)).value))): goto = 23 continue _switchfallthrough = True type_a = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() tb = ctypes.POINTER(g.PyObject)() g.PyErr_Fetch(ctypes.pointer(type_a), ctypes.pointer(value), ctypes.pointer(tb)) if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue helpers.assignPtr(u, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(u), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 25): goto = None if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(msg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unknown decode error')), ctypes_wrapped.c_void_p).value or 0)) if (goto == 26): goto = None if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 36 continue continue goto = 35 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 38 continue continue goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = 28 continue if (goto == 37): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto == 43): goto = None if (goto is None): if (not True): goto = 44 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue pass goto = 45 continue if (goto == 46): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 45): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 44): goto = None if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 50 continue continue goto = 49 continue if (goto == 50): goto = None if (goto is None): goto = 40 continue if (goto == 49): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto == 51): goto = None if (goto is None): if (not True): goto = 52 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 54 continue pass goto = 53 continue if (goto == 54): goto = None if (goto == 55): goto = None if (goto is None): if (not True): goto = 56 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 58 continue pass goto = 57 continue if (goto == 58): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 57): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 60 continue continue goto = 59 continue if (goto == 60): goto = None if (goto is None): goto = 56 continue if (goto == 59): goto = None if (goto is None): goto = 55 continue if (goto == 56): goto = None if (goto == 53): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 62 continue continue goto = 61 continue if (goto == 62): goto = None if (goto is None): goto = 52 continue if (goto == 61): goto = None if (goto is None): goto = 51 continue if (goto == 52): goto = None if (goto is None): goto = 3 continue del type_a del tb del value if (goto == 23): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(25L)).value))): goto = 63 continue _switchfallthrough = True helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unexpected character after line continuation character')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 63): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 64 continue values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('error=%d\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), err.contents.error) helpers.assignPtr(msg, (ctypes.cast(intp._storePtr(intp._make_string('unknown parsing error')), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 64): goto = None if (goto is None): goto = 3 continue goto = 2 continue if (goto == 3): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 1): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(ziiz)'), ctypes.POINTER(ctypes_wrapped.c_byte)), err.contents.filename, err.contents.lineno, err.contents.offset, err.contents.text), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 65 continue helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(sO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), msg, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 65): goto = None if (goto == 66): goto = None if (goto is None): if (not True): goto = 67 continue if (not ctypes_wrapped.c_int(((ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 69 continue pass goto = 68 continue if (goto == 69): goto = None if (goto == 70): goto = None if (goto is None): if (not True): goto = 71 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 73 continue pass goto = 72 continue if (goto == 73): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 72): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 75 continue continue goto = 74 continue if (goto == 75): goto = None if (goto is None): goto = 71 continue if (goto == 74): goto = None if (goto is None): goto = 70 continue if (goto == 71): goto = None if (goto == 68): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 77 continue continue goto = 76 continue if (goto == 77): goto = None if (goto is None): goto = 67 continue if (goto == 76): goto = None if (goto is None): goto = 66 continue if (goto == 67): goto = None if (goto == 78): goto = None if (goto is None): if (not True): goto = 79 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 81 continue pass goto = 80 continue if (goto == 81): goto = None if (goto == 82): goto = None if (goto is None): if (not True): goto = 83 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 85 continue pass goto = 84 continue if (goto == 85): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 84): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 87 continue continue goto = 86 continue if (goto == 87): goto = None if (goto is None): goto = 83 continue if (goto == 86): goto = None if (goto is None): goto = 82 continue if (goto == 83): goto = None if (goto == 80): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 89 continue continue goto = 88 continue if (goto == 89): goto = None if (goto is None): goto = 79 continue if (goto == 88): goto = None if (goto is None): goto = 78 continue if (goto == 79): goto = None if (goto is None): g.PyErr_SetObject(errtype, w) if (goto == 90): goto = None if (goto is None): if (not True): goto = 91 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 93 continue pass goto = 92 continue if (goto == 93): goto = None if (goto == 94): goto = None if (goto is None): if (not True): goto = 95 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 97 continue pass goto = 96 continue if (goto == 97): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 96): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 99 continue continue goto = 98 continue if (goto == 99): goto = None if (goto is None): goto = 95 continue if (goto == 98): goto = None if (goto is None): goto = 94 continue if (goto == 95): goto = None if (goto == 92): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 101 continue continue goto = 100 continue if (goto == 101): goto = None if (goto is None): goto = 91 continue if (goto == 100): goto = None if (goto is None): goto = 90 continue if (goto == 91): goto = None if (goto == u'cleanup'): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(err.contents.text, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 102 continue values.free.value(err.contents.text) helpers.assignPtr(err.contents.text, ctypes_wrapped.c_int(int(0L)).value) if (goto == 102): goto = None if (goto is None): del err del u del w del v del msg del errtype return break @staticmethod def Py_FatalError(msg): msg = ctypes.cast(msg, ctypes.POINTER(ctypes_wrapped.c_byte)) values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('Fatal Python error: %s\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), msg) values.fflush.value(values.stderr.value) values.abort.value() del msg return @staticmethod def wait_for_thread_shutdown(): return exitfuncs = (ctypes.CFUNCTYPE(helpers.fixReturnType(None)) * 32L)() nexitfuncs = ctypes_wrapped.c_int() @staticmethod def Py_AtExit(func): func = ctypes.cast(func, ctypes.CFUNCTYPE(helpers.fixReturnType(None))) if ctypes_wrapped.c_int((g.nexitfuncs.value >= ctypes_wrapped.c_int(int(32L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(helpers.ptrArithmetic(g.exitfuncs, '+', helpers.postfixInc(g.nexitfuncs).value).contents, (ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del func return ctypes_wrapped.c_int().value @staticmethod def call_sys_exitfunc(): exitfunc = ctypes.cast(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('exitfunc'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (ctypes.cast(exitfunc, ctypes_wrapped.c_void_p).value or 0): res = ctypes.POINTER(g.PyObject)() helpers.postfixInc(ctypes.cast(exitfunc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exitfunc'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(exitfunc, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_SystemExit))).value))).value: g.PySys_WriteStderr(ctypes.cast(intp._make_string('Error in sys.exitfunc:\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.PyErr_Print() while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(exitfunc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(exitfunc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(exitfunc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del res if ctypes_wrapped.c_int(int(g.Py_FlushLine())).value: g.PyErr_Clear() del exitfunc return @staticmethod def call_ll_exitfuncs(): while ctypes_wrapped.c_int((g.nexitfuncs.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.checkedFuncPtrCall(helpers.ptrArithmetic(g.exitfuncs, '+', helpers.prefixDec(g.nexitfuncs).value).contents) values.fflush.value(values.stdout.value) values.fflush.value(values.stderr.value) return @staticmethod def Py_Exit(sts): sts = ctypes_wrapped.c_int(int(sts.value)) g.Py_Finalize() values.exit_a.value(sts) del sts return @staticmethod def initsigs(): g.PyOS_InitInterrupts() return @staticmethod def Py_FdIsInteractive(fp, filename): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) if values.isatty.value(ctypes_wrapped.c_int(int(values.fileno.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))).value))).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int(int((not g.Py_InteractiveFlag.value))).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(filename, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((values.strcmp.value(filename, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((values.strcmp.value(filename, ctypes.cast(intp._make_string('???'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value del fp del filename return ctypes_wrapped.c_int().value @staticmethod def PyOS_getsig(sig): sig = ctypes_wrapped.c_int(int(sig.value)) handler = g.PyOS_sighandler_t() helpers.assignPtr(handler, (ctypes.cast(values.signal.value(sig, g.sig_t(ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(handler, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(g.sig_t(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value), ctypes_wrapped.c_void_p).value or 0))).value: values.signal.value(sig, handler) return handler del handler del sig return g.PyOS_sighandler_t() @staticmethod def PyOS_setsig(sig, handler): sig = ctypes_wrapped.c_int(int(sig.value)) handler = ctypes.cast(handler, g.PyOS_sighandler_t) oldhandler = g.PyOS_sighandler_t() helpers.assignPtr(oldhandler, (ctypes.cast(values.signal.value(sig, handler), ctypes_wrapped.c_void_p).value or 0)) return oldhandler del oldhandler del handler del sig return g.PyOS_sighandler_t() @staticmethod def PyParser_SimpleParseFile(fp, filename, start): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) filename = ctypes.cast(filename, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_SimpleParseFileFlags(fp, filename, start, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.node))), ctypes_wrapped.c_void_p).value or 0) del fp del start del filename return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyParser_SimpleParseString(str_a, start): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) start = ctypes_wrapped.c_int(int(start.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyParser_SimpleParseStringFlags(str_a, start, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.node))), ctypes_wrapped.c_void_p).value or 0) del start del str_a return (ctypes.cast(ctypes.POINTER(g.node)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_AnyFile(fp, name): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) return ctypes_wrapped.c_int(int(g.PyRun_AnyFileExFlags(fp, name, ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del fp del name return ctypes_wrapped.c_int().value @staticmethod def PyRun_AnyFileEx(fp, name, closeit): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) closeit = ctypes_wrapped.c_int(int(closeit.value)) return ctypes_wrapped.c_int(int(g.PyRun_AnyFileExFlags(fp, name, closeit, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del fp del closeit del name return ctypes_wrapped.c_int().value @staticmethod def PyRun_AnyFileFlags(fp, name, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) return ctypes_wrapped.c_int(int(g.PyRun_AnyFileExFlags(fp, name, ctypes_wrapped.c_int(int(0L)), flags))).value del fp del flags del name return ctypes_wrapped.c_int().value @staticmethod def PyRun_File(fp, p, s, g_a, l): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) s = ctypes_wrapped.c_int(int(s.value)) g_a = ctypes.cast(g_a, ctypes.POINTER(g.PyObject)) l = ctypes.cast(l, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_FileExFlags(fp, p, s, g_a, l, ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del fp del p del s del g_a del l return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_FileEx(fp, p, s, g_a, l, c): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) s = ctypes_wrapped.c_int(int(s.value)) g_a = ctypes.cast(g_a, ctypes.POINTER(g.PyObject)) l = ctypes.cast(l, ctypes.POINTER(g.PyObject)) c = ctypes_wrapped.c_int(int(c.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_FileExFlags(fp, p, s, g_a, l, c, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del fp del c del l del p del s del g_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_FileFlags(fp, p, s, g_a, l, flags): fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) s = ctypes_wrapped.c_int(int(s.value)) g_a = ctypes.cast(g_a, ctypes.POINTER(g.PyObject)) l = ctypes.cast(l, ctypes.POINTER(g.PyObject)) flags = ctypes.cast(flags, ctypes.POINTER(g.PyCompilerFlags)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_FileExFlags(fp, p, s, g_a, l, ctypes_wrapped.c_int(int(0L)), flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del fp del l del p del s del flags del g_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_SimpleFile(f, p): f = ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) return ctypes_wrapped.c_int(int(g.PyRun_SimpleFileExFlags(f, p, ctypes_wrapped.c_int(int(0L)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del p del f return ctypes_wrapped.c_int().value @staticmethod def PyRun_SimpleFileEx(f, p, c): f = ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) c = ctypes_wrapped.c_int(int(c.value)) return ctypes_wrapped.c_int(int(g.PyRun_SimpleFileExFlags(f, p, c, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del p del c del f return ctypes_wrapped.c_int().value @staticmethod def PyRun_String(str_a, s, g_a, l): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) s = ctypes_wrapped.c_int(int(s.value)) g_a = ctypes.cast(g_a, ctypes.POINTER(g.PyObject)) l = ctypes.cast(l, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyRun_StringFlags(str_a, s, g_a, l, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del g_a del s del str_a del l return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_SimpleString(s): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) return ctypes_wrapped.c_int(int(g.PyRun_SimpleStringFlags(s, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del s return ctypes_wrapped.c_int().value @staticmethod def Py_CompileString(str_a, p, s): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) s = ctypes_wrapped.c_int(int(s.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_CompileStringFlags(str_a, p, s, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del s del str_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyRun_InteractiveOne(f, p): f = ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) return ctypes_wrapped.c_int(int(g.PyRun_InteractiveOneFlags(f, p, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del p del f return ctypes_wrapped.c_int().value @staticmethod def PyRun_InteractiveLoop(f, p): f = ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_int)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) return ctypes_wrapped.c_int(int(g.PyRun_InteractiveLoopFlags(f, p, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyCompilerFlags))))).value del p del f return ctypes_wrapped.c_int().value interp_head = ctypes.POINTER(PyInterpreterState)() _PyThreadState_Current = ctypes.POINTER(PyThreadState)() _PyThreadState_GetFrame = PyThreadFrameGetter() @staticmethod def PyInterpreterState_New(): interp = ctypes.cast(ctypes.cast(values.malloc.value(ctypes_wrapped.c_size_t(72)), ctypes.POINTER(g.PyInterpreterState)), ctypes.POINTER(g.PyInterpreterState)) if ctypes_wrapped.c_int(((ctypes.cast(interp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(interp.contents.modules, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.modules_reloading, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.sysdict, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.builtins, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.tstate_head, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.codec_search_path, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.codec_search_cache, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.codec_error_registry, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(interp.contents.next, (ctypes.cast(intp._storePtr(g.interp_head), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g.interp_head, (ctypes.cast(intp._storePtr(interp), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(interp), ctypes_wrapped.c_void_p).value or 0) del interp return (ctypes.cast(ctypes.POINTER(g.PyInterpreterState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInterpreterState_Clear(interp): first_iteration = None interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) p = ctypes.POINTER(g.PyThreadState)() if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(interp.contents.tstate_head), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(p.contents.next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break g.PyThreadState_Clear(p) while True: if (ctypes.cast(interp.contents.codec_search_path, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.codec_search_path, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.codec_search_path, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(interp.contents.codec_search_cache, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.codec_search_cache, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.codec_search_cache, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(interp.contents.codec_error_registry, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.codec_error_registry, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.codec_error_registry, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(interp.contents.modules, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.modules, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.modules, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(interp.contents.modules_reloading, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.modules_reloading, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.modules_reloading, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(interp.contents.sysdict, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.sysdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.sysdict, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(interp.contents.builtins, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(interp.contents.builtins, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(interp.contents.builtins, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break del p del interp return @staticmethod def zapthreads(interp): interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) p = ctypes.POINTER(g.PyThreadState)() while ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr(interp.contents.tstate_head), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyThreadState_Delete(p) del p del interp return @staticmethod def PyInterpreterState_Delete(interp): first_iteration = None interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) p = ctypes.POINTER(ctypes.POINTER(g.PyInterpreterState))() g.zapthreads(interp) if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.pointer(g.interp_head)), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.pointer(p.contents.contents.next)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyInterpreterState_Delete: invalid interp'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(((ctypes.cast(p.contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(interp, ctypes_wrapped.c_void_p).value or 0))).value: break if ctypes_wrapped.c_int(((ctypes.cast(interp.contents.tstate_head, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyInterpreterState_Delete: remaining threads'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(interp.contents.next), ctypes_wrapped.c_void_p).value or 0)) values.free.value(interp) del p del interp return @staticmethod def threadstate_getframe(self): self = ctypes.cast(self, ctypes.POINTER(g.PyThreadState)) return (ctypes.cast(intp._storePtr(self.contents.frame), ctypes_wrapped.c_void_p).value or 0) del self return (ctypes.cast(ctypes.POINTER(structs._frame)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def new_threadstate(interp, init): interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) init = ctypes_wrapped.c_int(int(init.value)) tstate = ctypes.cast(ctypes.cast(values.malloc.value(ctypes_wrapped.c_size_t(168)), ctypes.POINTER(g.PyThreadState)), ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int(((ctypes.cast(g._PyThreadState_GetFrame, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g._PyThreadState_GetFrame, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(structs._frame)), ctypes.POINTER(g.PyThreadState)), g.threadstate_getframe), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(tstate.contents.interp, (ctypes.cast(intp._storePtr(interp), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.frame, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.recursion_depth, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.tracing, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.use_tracing, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.tick_counter, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.gilstate_counter, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.async_exc, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.thread_id, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.dict, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.curexc_type, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.curexc_value, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.curexc_traceback, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.exc_type, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.exc_value, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.exc_traceback, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_profilefunc, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_tracefunc, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_profileobj, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_traceobj, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tstate.contents.trash_delete_nesting, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.trash_delete_later, ctypes_wrapped.c_int(int(0L)).value) if init.value: g._PyThreadState_Init(tstate) helpers.assignPtr(tstate.contents.next, (ctypes.cast(intp._storePtr(interp.contents.tstate_head), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(interp.contents.tstate_head, (ctypes.cast(intp._storePtr(tstate), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(tstate), ctypes_wrapped.c_void_p).value or 0) del init del interp del tstate return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyThreadState_New(interp): interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.new_threadstate(interp, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyThreadState))), ctypes_wrapped.c_void_p).value or 0) del interp return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyThreadState_Prealloc(interp): interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.new_threadstate(interp, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyThreadState))), ctypes_wrapped.c_void_p).value or 0) del interp return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyThreadState_Init(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) del tstate return @staticmethod def PyThreadState_Clear(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int((g.Py_VerboseFlag.value and ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.frame, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('PyThreadState_Clear: warning: thread still has a frame\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if (ctypes.cast(tstate.contents.frame, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.frame, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.frame, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.dict, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.dict, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.async_exc, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.async_exc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.async_exc, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.curexc_type, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.curexc_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.curexc_type, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.curexc_value, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.curexc_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.curexc_value, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.curexc_traceback, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.curexc_traceback, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.curexc_traceback, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.exc_type, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.exc_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.exc_type, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.exc_value, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.exc_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.exc_value, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.exc_traceback, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.exc_traceback, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.exc_traceback, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(tstate.contents.c_profilefunc, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.c_tracefunc, ctypes_wrapped.c_int(int(0L)).value) while True: if (ctypes.cast(tstate.contents.c_profileobj, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.c_profileobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.c_profileobj, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(tstate.contents.c_traceobj, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(tstate.contents.c_traceobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(tstate.contents.c_traceobj, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tstate return @staticmethod def tstate_delete_common(tstate): first_iteration = None tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) interp = ctypes.POINTER(g.PyInterpreterState)() p = ctypes.POINTER(ctypes.POINTER(g.PyThreadState))() prev_p = ctypes.POINTER(g.PyThreadState)() if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Delete: NULL tstate'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(interp, (ctypes.cast(intp._storePtr(tstate.contents.interp), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(interp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Delete: NULL interp'), ctypes.POINTER(ctypes_wrapped.c_byte))) if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.pointer(interp.contents.tstate_head)), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.pointer(p.contents.contents.next)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Delete: invalid tstate'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(((ctypes.cast(p.contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0))).value: break if ctypes_wrapped.c_int(((ctypes.cast(p.contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(prev_p, ctypes_wrapped.c_void_p).value or 0))).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Delete: small circular list(!) and tstate not found.'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(prev_p, (ctypes.cast(intp._storePtr(p.contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p.contents.contents.next, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(interp.contents.tstate_head, ctypes_wrapped.c_void_p).value or 0))).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Delete: circular list(!) and tstate not found.'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(tstate.contents.next), ctypes_wrapped.c_void_p).value or 0)) values.free.value(tstate) del prev_p del p del interp del tstate return @staticmethod def PyThreadState_Delete(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g._PyThreadState_Current, ctypes_wrapped.c_void_p).value or 0))).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Delete: tstate is still current'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.tstate_delete_common(tstate) del tstate return @staticmethod def PyThreadState_Get(): if ctypes_wrapped.c_int(((ctypes.cast(g._PyThreadState_Current, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyThreadState_Get: no current thread'), ctypes.POINTER(ctypes_wrapped.c_byte))) return (ctypes.cast(intp._storePtr(g._PyThreadState_Current), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyThreadState_Swap(newts): newts = ctypes.cast(newts, ctypes.POINTER(g.PyThreadState)) oldts = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) helpers.assignPtr(g._PyThreadState_Current, (ctypes.cast(intp._storePtr(newts), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(oldts), ctypes_wrapped.c_void_p).value or 0) del newts del oldts return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyThreadState_GetDict(): if ctypes_wrapped.c_int(((ctypes.cast(g._PyThreadState_Current, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(g._PyThreadState_Current.contents.dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: d = ctypes.POINTER(g.PyObject)() helpers.assignPtr(g._PyThreadState_Current.contents.dict, (ctypes.cast(intp._storePtr(helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() del d return (ctypes.cast(intp._storePtr(g._PyThreadState_Current.contents.dict), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyThreadState_SetAsyncExc(id_a, exc): first_iteration = None id_a = ctypes_wrapped.c_long(int(id_a.value)) exc = ctypes.cast(exc, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) interp = ctypes.cast(tstate.contents.interp, ctypes.POINTER(g.PyInterpreterState)) p = ctypes.POINTER(g.PyThreadState)() if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(interp.contents.tstate_head), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(p.contents.next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((p.contents.thread_id.value == id_a.value)).value: old_exc = ctypes.cast(p.contents.async_exc, ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(exc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(exc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(p.contents.async_exc, (ctypes.cast(intp._storePtr(exc), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(old_exc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_exc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_exc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_exc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value del old_exc return ctypes_wrapped.c_int(int(0L)).value del p del id_a del interp del exc del tstate return ctypes_wrapped.c_int().value @staticmethod def PyInterpreterState_Head(): return (ctypes.cast(intp._storePtr(g.interp_head), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(g.PyInterpreterState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInterpreterState_Next(interp): interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) return (ctypes.cast(intp._storePtr(interp.contents.next), ctypes_wrapped.c_void_p).value or 0) del interp return (ctypes.cast(ctypes.POINTER(g.PyInterpreterState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyInterpreterState_ThreadHead(interp): interp = ctypes.cast(interp, ctypes.POINTER(g.PyInterpreterState)) return (ctypes.cast(intp._storePtr(interp.contents.tstate_head), ctypes_wrapped.c_void_p).value or 0) del interp return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyThreadState_Next(tstate): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) return (ctypes.cast(intp._storePtr(tstate.contents.next), ctypes_wrapped.c_void_p).value or 0) del tstate return (ctypes.cast(ctypes.POINTER(g.PyThreadState)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyThread_CurrentFrames(): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None result = ctypes.POINTER(g.PyObject)() i = ctypes.POINTER(g.PyInterpreterState)() helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue first_iteration = True helpers.assignPtr(i, (ctypes.cast(intp._storePtr(g.interp_head), ctypes_wrapped.c_void_p).value or 0)) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 6 continue first_iteration = False goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.assignPtr(i, (ctypes.cast(intp._storePtr(i.contents.next), ctypes_wrapped.c_void_p).value or 0)) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(i, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): t = ctypes.POINTER(g.PyThreadState)() if (not True): goto = 9 continue first_iteration_a = True helpers.assignPtr(t, (ctypes.cast(intp._storePtr(i.contents.tstate_head), ctypes_wrapped.c_void_p).value or 0)) if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not first_iteration_a): goto = 13 continue first_iteration_a = False goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.assignPtr(t, (ctypes.cast(intp._storePtr(t.contents.next), ctypes_wrapped.c_void_p).value or 0)) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(t, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): id_a = ctypes.POINTER(g.PyObject)() stat = ctypes_wrapped.c_int() frame = ctypes.cast(t.contents.frame, ctypes.POINTER(structs._frame)) if (not ctypes_wrapped.c_int(((ctypes.cast(frame, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue continue if (goto == 16): goto = None if (goto is None): helpers.assignPtr(id_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(t.contents.thread_id), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(id_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue goto = u'Fail' continue if (goto == 17): goto = None if (goto is None): helpers.assign(stat, ctypes_wrapped.c_int(int(g.PyDict_SetItem(result, id_a, ctypes.cast(frame, ctypes.POINTER(g.PyObject))))).value) if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(id_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue pass goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(id_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(id_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 23 continue continue goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int((stat.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue goto = u'Fail' continue if (goto == 24): goto = None if (goto is None): del stat del id_a del frame goto = 10 continue if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): del t goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) if (goto == u'Fail'): goto = None if (goto == 25): goto = None if (goto is None): if (not True): goto = 26 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue pass goto = 27 continue if (goto == 28): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 30 continue continue goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 26 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 26): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del i del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break PyStructSequence_Field = structs.PyStructSequence_Field PyStructSequence_Desc = structs.PyStructSequence_Desc PyStructSequence_UnnamedField = ctypes.POINTER(ctypes_wrapped.c_byte)() @staticmethod def PyStructSequence_InitType(type_a, desc): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) desc = ctypes.cast(desc, ctypes.POINTER(g.PyStructSequence_Desc)) raise Exception(u"Function 'PyStructSequence_InitType' only predeclared. Body is missing. Missing C source code.") del type_a del desc return @staticmethod def PyStructSequence_New(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) raise Exception(u"Function 'PyStructSequence_New' only predeclared. Body is missing. Missing C source code.") del type_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyStructSequence = structs._anonymous_PyStructSequence @staticmethod def PySys_GetObject(name): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) sd = ctypes.cast(tstate.contents.interp.contents.sysdict, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(sd, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(sd, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del sd del name del tstate return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySys_GetFile(name, def_a): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) def_a = ctypes.cast(def_a, ctypes.POINTER(ctypes_wrapped.c_int)) fp = ctypes.POINTER(ctypes_wrapped.c_int)() v = ctypes.cast(intp._getPtr(g.PySys_GetObject(name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFile_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFile_Type)))).value)).value)).value: helpers.assignPtr(fp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFile_AsFile(v), ctypes.POINTER(ctypes_wrapped.c_int))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(fp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(fp, (ctypes.cast(intp._storePtr(def_a), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(fp), ctypes_wrapped.c_void_p).value or 0) del fp del def_a del name del v return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_int)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySys_SetObject(name, v): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) sd = ctypes.cast(tstate.contents.interp.contents.sysdict, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(sd, name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value else: return ctypes_wrapped.c_int(int(g.PyDict_DelItemString(sd, name))).value else: return ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sd, name, v))).value del tstate del sd del name del v return ctypes_wrapped.c_int().value @staticmethod def sys_displayhook(self, o): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) outf = ctypes.POINTER(g.PyObject)() interp = ctypes.cast(g._PyThreadState_Current.contents.interp, ctypes.POINTER(g.PyInterpreterState)) modules = ctypes.cast(interp.contents.modules, ctypes.POINTER(g.PyObject)) builtins = ctypes.cast(intp._getPtr(g.PyDict_GetItemString(modules, ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(builtins, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('lost __builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_SetAttrString(builtins, ctypes.cast(intp._make_string('_'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g._Py_NoneStruct)))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.Py_FlushLine())).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(outf, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(outf, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('lost sys.stdout'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyFile_WriteObject(o, outf, ctypes_wrapped.c_int(int(0L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value ctypes_wrapped.c_int(int(g.PyFile_SoftSpace(outf, ctypes_wrapped.c_int(int(1L))))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.Py_FlushLine())).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_SetAttrString(builtins, ctypes.cast(intp._make_string('_'), ctypes.POINTER(ctypes_wrapped.c_byte)), o))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del builtins del interp del self del modules del o del outf return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) displayhook_doc = (ctypes_wrapped.c_byte * 1)() # TODO init displayhook_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_excepthook(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) exc = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() tb = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('excepthook'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value)), ctypes.pointer(exc), ctypes.pointer(value), ctypes.pointer(tb)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value g.PyErr_Display(exc, value, tb) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del self del args del tb del exc del value return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) excepthook_doc = (ctypes_wrapped.c_byte * 1)() # TODO init excepthook_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_exc_info(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) tstate = ctypes.POINTER(g.PyThreadState)() helpers.assignPtr(tstate, (ctypes.cast(intp._storePtr(g._PyThreadState_Current), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(OOO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(tstate.contents.exc_type, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_type, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject))), (ctypes.cast(tstate.contents.exc_value, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject))), (ctypes.cast(tstate.contents.exc_traceback, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.exc_traceback, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del noargs del self del tstate return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) exc_info_doc = (ctypes_wrapped.c_byte * 1)() # TODO init exc_info_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_exc_clear(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) tstate = ctypes.POINTER(g.PyThreadState)() tmp_type = ctypes.POINTER(g.PyObject)() tmp_value = ctypes.POINTER(g.PyObject)() tmp_tb = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('sys.exc_clear() not supported in 3.x; use except clauses'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tstate, (ctypes.cast(intp._storePtr(g._PyThreadState_Current), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_type, (ctypes.cast(intp._storePtr(tstate.contents.exc_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_value, (ctypes.cast(intp._storePtr(tstate.contents.exc_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp_tb, (ctypes.cast(intp._storePtr(tstate.contents.exc_traceback), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.exc_type, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.exc_value, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(tstate.contents.exc_traceback, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tmp_tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp_tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_type'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g._Py_NoneStruct)))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_value'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g._Py_NoneStruct)))) ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('exc_traceback'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g._Py_NoneStruct)))) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del tmp_value del tmp_tb del self del tmp_type del noargs del tstate return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) exc_clear_doc = (ctypes_wrapped.c_byte * 1)() # TODO init exc_clear_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_exit(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) exit_code = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('exit'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(exit_code)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value g.PyErr_SetObject(g.PyExc_SystemExit, exit_code) return ctypes_wrapped.c_int(int(0L)).value del self del args del exit_code return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) exit_doc = (ctypes_wrapped.c_byte * 1)() # TODO init exit_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) whatstrings = (ctypes.POINTER(PyObject) * 7L)() # TODO init whatstrings with (ctypes.POINTER(PyObject) * 7L)(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject))) @staticmethod def trace_init(): first_iteration = None whatnames = (ctypes.POINTER(ctypes_wrapped.c_byte) * 7L)(ctypes.cast(intp._make_string('call'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('exception'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('line'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('return'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('c_call'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('c_exception'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('c_return'), ctypes.POINTER(ctypes_wrapped.c_byte))) name = ctypes.POINTER(g.PyObject)() i = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(7L)).value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(g.whatstrings, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(helpers.ptrArithmetic(whatnames, '+', i.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(helpers.ptrArithmetic(g.whatstrings, '+', i.value).contents, (ctypes.cast(intp._storePtr(name), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del i del whatnames del name return ctypes_wrapped.c_int().value @staticmethod def call_trampoline(tstate, callback, frame, what, arg): tstate = ctypes.cast(tstate, ctypes.POINTER(g.PyThreadState)) callback = ctypes.cast(callback, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(frame, ctypes.POINTER(g.PyFrameObject)) what = ctypes_wrapped.c_int(int(what.value)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) args = ctypes.cast(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) whatstr = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(frame, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(whatstr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.whatstrings, '+', what.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(whatstr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(arg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(frame, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(whatstr), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(2L)).value).contents, (ctypes.cast(intp._storePtr(arg), ctypes_wrapped.c_void_p).value or 0)) g.PyFrame_FastToLocals(frame) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(callback, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyFrame_LocalsToFast(frame, ctypes_wrapped.c_int(int(1L))) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyTraceBack_Here(frame))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del what del frame del args del whatstr del callback del result del arg del tstate return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def profile_trampoline(self, frame, what, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(frame, ctypes.POINTER(g.PyFrameObject)) what = ctypes_wrapped.c_int(int(what.value)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(frame.contents.f_tstate, ctypes.POINTER(g.PyThreadState)) result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_trampoline(tstate, self, frame, what, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyEval_SetProfile(g.Py_tracefunc(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del what del self del result del frame del arg del tstate return ctypes_wrapped.c_int().value @staticmethod def trace_trampoline(self, frame, what, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) frame = ctypes.cast(frame, ctypes.POINTER(g.PyFrameObject)) what = ctypes_wrapped.c_int(int(what.value)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(frame.contents.f_tstate, ctypes.POINTER(g.PyThreadState)) callback = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((what.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(callback, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(callback, (ctypes.cast(intp._storePtr(frame.contents.f_trace), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(callback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_trampoline(tstate, callback, frame, what, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyEval_SetTrace(g.Py_tracefunc(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))) while True: if ctypes_wrapped.c_int(((ctypes.cast(frame.contents.f_trace, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(frame.contents.f_trace, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(frame.contents.f_trace, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(frame.contents.f_trace, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(frame.contents.f_trace, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: temp = ctypes.cast(frame.contents.f_trace, ctypes.POINTER(g.PyObject)) helpers.assignPtr(frame.contents.f_trace, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(frame.contents.f_trace, (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0)) del temp else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del what del self del callback del result del frame del arg del tstate return ctypes_wrapped.c_int().value @staticmethod def sys_settrace(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.trace_init())).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: g.PyEval_SetTrace(g.Py_tracefunc(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))) else: g.PyEval_SetTrace(helpers.makeFuncPtr(g.Py_tracefunc, g.trace_trampoline), args) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) settrace_doc = (ctypes_wrapped.c_byte * 1)() # TODO init settrace_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_gettrace(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) temp = ctypes.cast(tstate.contents.c_traceobj, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(temp), ctypes_wrapped.c_void_p).value or 0) del self del args del tstate del temp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gettrace_doc = (ctypes_wrapped.c_byte * 1)() # TODO init gettrace_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_setprofile(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.trace_init())).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: g.PyEval_SetProfile(g.Py_tracefunc(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))) else: g.PyEval_SetProfile(helpers.makeFuncPtr(g.Py_tracefunc, g.profile_trampoline), args) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) setprofile_doc = (ctypes_wrapped.c_byte * 1)() # TODO init setprofile_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_getprofile(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) temp = ctypes.cast(tstate.contents.c_profileobj, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(temp), ctypes_wrapped.c_void_p).value or 0) del self del args del tstate del temp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getprofile_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getprofile_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_setcheckinterval(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('i:setcheckinterval'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g._Py_CheckInterval)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(g._Py_Ticker, g._Py_CheckInterval.value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) setcheckinterval_doc = (ctypes_wrapped.c_byte * 1)() # TODO init setcheckinterval_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_getcheckinterval(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g._Py_CheckInterval.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getcheckinterval_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getcheckinterval_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_setrecursionlimit(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) new_limit = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('i:setrecursionlimit'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(new_limit)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((new_limit.value <= ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('recursion limit must be positive'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value g.Py_SetRecursionLimit(new_limit) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del new_limit del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) setrecursionlimit_doc = (ctypes_wrapped.c_byte * 1)() # TODO init setrecursionlimit_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_getrecursionlimit(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(g.Py_GetRecursionLimit())).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getrecursionlimit_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getrecursionlimit_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_getsizeof(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() str__sizeof__ = ctypes.POINTER(g.PyObject)() gc_head_size = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 3)(ctypes.cast(intp._make_string('object'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('default'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) o = ctypes.POINTER(g.PyObject)() dflt = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwds, ctypes.cast(intp._make_string('O|O:getsizeof'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(o), ctypes.pointer(dflt)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(gc_head_size, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(gc_head_size, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(g.Py_ssize_t(int(ctypes_wrapped.c_size_t(32).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc_head_size, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(g.PyInstance_Type.tp_basicsize), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: method = ctypes.cast(intp._getPtr(g._PyObject_LookupSpecial(o, ctypes.cast(intp._make_string('__sizeof__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(str__sizeof__)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(method, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("Type %.100s doesn't define __sizeof__"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(method, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(method, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del method if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(dflt, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value)).value: g.PyErr_Clear() helpers.postfixInc(ctypes.cast(dflt, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(dflt), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, o).value)).value)).value: tmp = ctypes.cast(res, ctypes.POINTER(g.PyObject)) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Add(tmp, gc_head_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tmp return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del gc_head_size del kwds del dflt del res del self del args del o del kwlist del str__sizeof__ return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getsizeof_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getsizeof_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_getrefcount(self, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(arg.contents.ob_refcnt), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del arg return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getrefcount_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getrefcount_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) getframe_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getframe_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_getframe(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) f = ctypes.cast(g._PyThreadState_Current.contents.frame, ctypes.POINTER(g.PyFrameObject)) depth = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|i:_getframe'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(depth)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value while ctypes_wrapped.c_int((ctypes_wrapped.c_int((depth.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(f, (ctypes.cast(intp._storePtr(f.contents.f_back), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(depth) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('call stack is not deep enough'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(f, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del depth del f return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) current_frames_doc = (ctypes_wrapped.c_byte * 1)() # TODO init current_frames_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_current_frames(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g._PyThread_CurrentFrames(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) call_tracing_doc = (ctypes_wrapped.c_byte * 1)() # TODO init call_tracing_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_call_tracing(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() funcargs = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('OO!:call_tracing'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(func), ctypes.pointer(g.PyTuple_Type), ctypes.pointer(funcargs)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g._PyEval_CallTracing(func, funcargs), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del funcargs del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) callstats_doc = (ctypes_wrapped.c_byte * 1)() # TODO init callstats_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def sys_clear_type_cache(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) ctypes_wrapped.c_uint(int(g.PyType_ClearCache())) return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) sys_clear_type_cache__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init sys_clear_type_cache__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) sys_methods = (PyMethodDef * 21)() # TODO init sys_methods with (PyMethodDef * 21)(structs.PyMethodDef(ctypes.cast(intp._make_string('callstats'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, PyEval_GetCallStats), ctypes_wrapped.c_int(int(4L)), ctypes.cast(callstats_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('_clear_type_cache'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_clear_type_cache), ctypes_wrapped.c_int(int(4L)), ctypes.cast(sys_clear_type_cache__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('_current_frames'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_current_frames), ctypes_wrapped.c_int(int(4L)), ctypes.cast(current_frames_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('displayhook'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_displayhook), ctypes_wrapped.c_int(int(8L)), ctypes.cast(displayhook_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('exc_info'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_exc_info), ctypes_wrapped.c_int(int(4L)), ctypes.cast(exc_info_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('exc_clear'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_exc_clear), ctypes_wrapped.c_int(int(4L)), ctypes.cast(exc_clear_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('excepthook'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_excepthook), ctypes_wrapped.c_int(int(1L)), ctypes.cast(excepthook_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('exit'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_exit), ctypes_wrapped.c_int(int(1L)), ctypes.cast(exit_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('getrefcount'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, sys_getrefcount), ctypes_wrapped.c_int(int(8L)), ctypes.cast(getrefcount_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('getrecursionlimit'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, sys_getrecursionlimit), ctypes_wrapped.c_int(int(4L)), ctypes.cast(getrecursionlimit_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('getsizeof'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, sys_getsizeof), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(getsizeof_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('_getframe'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_getframe), ctypes_wrapped.c_int(int(1L)), ctypes.cast(getframe_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('setcheckinterval'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_setcheckinterval), ctypes_wrapped.c_int(int(1L)), ctypes.cast(setcheckinterval_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('getcheckinterval'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_getcheckinterval), ctypes_wrapped.c_int(int(4L)), ctypes.cast(getcheckinterval_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('setprofile'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_setprofile), ctypes_wrapped.c_int(int(8L)), ctypes.cast(setprofile_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('getprofile'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_getprofile), ctypes_wrapped.c_int(int(4L)), ctypes.cast(getprofile_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('setrecursionlimit'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_setrecursionlimit), ctypes_wrapped.c_int(int(1L)), ctypes.cast(setrecursionlimit_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('settrace'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_settrace), ctypes_wrapped.c_int(int(8L)), ctypes.cast(settrace_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('gettrace'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_gettrace), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gettrace_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('call_tracing'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), sys_call_tracing), ctypes_wrapped.c_int(int(1L)), ctypes.cast(call_tracing_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) @staticmethod def list_builtin_module_names(): first_iteration = None list_a = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) i = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(g.PyImport_Inittab, '+', i.value).contents.name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break name = ctypes.cast(intp._getPtr(g.PyString_FromString(helpers.ptrArithmetic(g.PyImport_Inittab, '+', i.value).contents.name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: break ctypes_wrapped.c_int(int(g.PyList_Append(list_a, name))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del name if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Sort(list_a))).value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(list_a, ctypes_wrapped.c_int(int(0L)).value) if (ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0): v = ctypes.cast(intp._getPtr(g.PyList_AsTuple(list_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) del i del list_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) warnoptions = ctypes.POINTER(PyObject)() @staticmethod def PySys_ResetWarnOptions(): if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: return ctypes_wrapped.c_int(int(g.PyList_SetSlice(g.warnoptions, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyVarObject)).contents.ob_size, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))) return @staticmethod def PySys_AddWarnOption(s): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) str_a = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(g.warnoptions, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.assignPtr(str_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyList_Append(g.warnoptions, str_a))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del s del str_a return @staticmethod def PySys_HasWarnOptions(): return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyList_Size(g.warnoptions))).value > ctypes_wrapped.c_int(int(0L)).value)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value return ctypes_wrapped.c_int().value sys_doc = (ctypes_wrapped.c_byte * 1)() # TODO init sys_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def _check_and_flush(stream): stream = ctypes.cast(stream, ctypes.POINTER(ctypes_wrapped.c_int)) prev_fail = ctypes_wrapped.c_int(int(values.ferror.value(ctypes.cast(stream, ctypes.POINTER(ctypes_wrapped.c_int))).value)) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((values.fflush.value(ctypes.cast(stream, ctypes.POINTER(ctypes_wrapped.c_int))).value or prev_fail.value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value del prev_fail del stream return ctypes_wrapped.c_int().value svn_initialized = ctypes_wrapped.c_int() patchlevel_revision = (ctypes_wrapped.c_byte * 50L)() branch = (ctypes_wrapped.c_byte * 50L)() shortbranch = (ctypes_wrapped.c_byte * 50L)() svn_revision = ctypes.POINTER(ctypes_wrapped.c_byte)() @staticmethod def svnversion_init(): if g.svn_initialized.value: return helpers.assign(g.svn_initialized, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(g.patchlevel_revision[0], ctypes.c_byte(0).value) values.strcpy.value(ctypes.cast(g.branch, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))) values.strcpy.value(ctypes.cast(g.shortbranch, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('unknown'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(g.svn_revision, (ctypes.cast(intp._storePtr(intp._make_string('')), ctypes_wrapped.c_void_p).value or 0)) return return @staticmethod def Py_SubversionRevision(): g.svnversion_init() return (ctypes.cast(intp._storePtr(g.svn_revision), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_SubversionShortBranch(): g.svnversion_init() return (ctypes.cast(intp._storePtr(g.shortbranch), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) flags__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init flags__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) FlagsType = PyTypeObject() # TODO init FlagsType with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))) flags_fields = (PyStructSequence_Field * 17)() # TODO init flags_fields with (PyStructSequence_Field * 17)(structs.PyStructSequence_Field(ctypes.cast(intp._make_string('debug'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-d'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('py3k_warning'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-3'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('division_warning'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-Q'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('division_new'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-Qnew'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('inspect'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-i'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('interactive'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-i'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('optimize'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-O or -OO'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('dont_write_bytecode'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-B'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('no_user_site'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-s'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('no_site'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-S'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('ignore_environment'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-E'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('tabcheck'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-t or -tt'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('verbose'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-v'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('unicode'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-U'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('bytes_warning'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-b'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('hash_randomization'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('-R'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) flags_desc = PyStructSequence_Desc() # TODO init flags_desc with PyStructSequence_Desc(ctypes.cast(intp._make_string('sys.flags'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(flags__doc__, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(flags_fields, ctypes.POINTER(structs.PyStructSequence_Field)), ctypes_wrapped.c_int(int(16L))) @staticmethod def make_flags(): pos = ctypes_wrapped.c_int() seq = ctypes.POINTER(g.PyObject)() helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyStructSequence_New(ctypes.pointer(g.FlagsType)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_DebugFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_Py3kWarningFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_DivisionWarningFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g._Py_QnewFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_InspectFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_InteractiveFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_OptimizeFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_DontWriteBytecodeFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_NoUserSiteDirectory.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_NoSiteFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_IgnoreEnvironmentFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_TabcheckFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_VerboseFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_UnicodeFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_BytesWarningFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.Py_HashRandomizationFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(seq), ctypes_wrapped.c_void_p).value or 0) del pos del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) version_info__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init version_info__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) VersionInfoType = PyTypeObject() # TODO init VersionInfoType with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))) version_info_fields = (PyStructSequence_Field * 6)() # TODO init version_info_fields with (PyStructSequence_Field * 6)(structs.PyStructSequence_Field(ctypes.cast(intp._make_string('major'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('Major release number'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('minor'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('Minor release number'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('micro'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('Patch release number'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('releaselevel'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string("'alpha', 'beta', 'candidate', or 'release'"), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(ctypes.cast(intp._make_string('serial'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('Serial release number'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyStructSequence_Field(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) version_info_desc = PyStructSequence_Desc() # TODO init version_info_desc with PyStructSequence_Desc(ctypes.cast(intp._make_string('sys.version_info'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(version_info__doc__, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(version_info_fields, ctypes.POINTER(structs.PyStructSequence_Field)), ctypes_wrapped.c_int(int(5L))) @staticmethod def make_version_info(): version_info = ctypes.POINTER(g.PyObject)() s = ctypes.POINTER(ctypes_wrapped.c_byte)() pos = ctypes_wrapped.c_int() helpers.assignPtr(version_info, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyStructSequence_New(ctypes.pointer(g.VersionInfoType)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(version_info, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._make_string('final')), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(version_info, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(version_info, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(7L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(version_info, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(5L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(version_info, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(version_info, ctypes.POINTER(g.PyStructSequence)).contents.ob_item, '+', helpers.postfixInc(pos).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): while True: if (ctypes.cast(version_info, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(version_info, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(version_info, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(version_info), ctypes_wrapped.c_void_p).value or 0) del s del pos del version_info return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PySys_Init(): m = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() sysdict = ctypes.POINTER(g.PyObject)() sysin = ctypes.POINTER(g.PyObject)() sysout = ctypes.POINTER(g.PyObject)() syserr = ctypes.POINTER(g.PyObject)() s = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_InitModule4_64(ctypes.cast(intp._make_string('sys'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(g.sys_methods, ctypes.POINTER(g.PyMethodDef)), ctypes.cast(g.sys_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_int(int(1013L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(sysdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) sb = structs.stat() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((values.fstat.value(values.fileno.value(values.stdin.value), ctypes.pointer(sb)).value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((sb.st_mode.value & ctypes_wrapped.c_int(int(0L)).value))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PySys_WriteStderr(ctypes.cast(intp._make_string('Python error: is a directory, cannot continue\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) values.exit_a.value(ctypes_wrapped.c_int(int(1L))) del sb helpers.assignPtr(sysin, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFile_FromFile(ctypes.cast(values.stdin.value, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('r'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes_wrapped.c_int))(ctypes_wrapped.c_int(int(0L)).value)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(sysout, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFile_FromFile(ctypes.cast(values.stdout.value, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('w'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes_wrapped.c_int)), g._check_and_flush)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(syserr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFile_FromFile(ctypes.cast(values.stderr.value, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('w'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes_wrapped.c_int)), g._check_and_flush)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int(0L)).value ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('stdin'), ctypes.POINTER(ctypes_wrapped.c_byte)), sysin))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte)), sysout))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('stderr'), ctypes.POINTER(ctypes_wrapped.c_byte)), syserr))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('__stdin__'), ctypes.POINTER(ctypes_wrapped.c_byte)), sysin))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('__stdout__'), ctypes.POINTER(ctypes_wrapped.c_byte)), sysout))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('__stderr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), syserr))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('__displayhook__'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyDict_GetItemString(sysdict, ctypes.cast(intp._make_string('displayhook'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))))) ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('__excepthook__'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyDict_GetItemString(sysdict, ctypes.cast(intp._make_string('excepthook'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))))) while True: if ctypes_wrapped.c_int(((ctypes.cast(sysin, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sysin, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sysin, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sysin, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(sysout, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sysout, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sysout, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sysout, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(syserr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(syserr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(syserr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(syserr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(intp._getPtr(g.Py_GetVersion(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('version'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(2L)).value << ctypes_wrapped.c_int(int(24L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(7L)).value << ctypes_wrapped.c_int(int(16L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(5L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(15L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(0L)).value << ctypes_wrapped.c_int(int(0L)).value))).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('hexversion'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.svnversion_init() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(ssz)'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._make_string('CPython'), g.branch, g.svn_revision), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('subversion'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(szz)'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._make_string('CPython'), intp._getPtr(g._Py_hgidentifier(), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g._Py_hgversion(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('_mercurial'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(g.Py_DontWriteBytecodeFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('dont_write_bytecode'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1013L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('api_version'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(intp._getPtr(g.Py_GetCopyright(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('copyright'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(intp._getPtr(g.Py_GetPlatform(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('platform'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(intp._getPtr(g.Py_GetProgramFullPath(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('executable'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(intp._getPtr(g.Py_GetPrefix(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('prefix'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(intp._getPtr(g.Py_GetExecPrefix(), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('exec_prefix'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('maxsize'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(g.PyInt_GetMax()))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('maxint'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(g.Py_Py3kWarningFlag.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('py3kwarning'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFloat_GetInfo(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('float_info'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_GetInfo(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('long_info'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.list_builtin_module_names(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('builtin_module_names'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break number = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)) value = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(s, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(number), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._make_string('big')), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._make_string('little')), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('byteorder'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del number del value if ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.warnoptions, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.postfixInc(ctypes.cast(g.warnoptions, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(((ctypes.cast(g.warnoptions, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('warnoptions'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.warnoptions))) if ctypes_wrapped.c_int(((ctypes.cast(g.VersionInfoType.tp_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyStructSequence_InitType(ctypes.pointer(g.VersionInfoType), ctypes.pointer(g.version_info_desc)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.make_version_info(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('version_info'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(g.VersionInfoType.tp_init, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(g.VersionInfoType.tp_new, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(g.FlagsType.tp_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyStructSequence_InitType(ctypes.pointer(g.FlagsType), ctypes.pointer(g.flags_desc)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.make_flags(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('flags'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(g.FlagsType.tp_init, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(g.FlagsType.tp_new, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('legacy'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ctypes_wrapped.c_int(int(g.PyDict_SetItemString(sysdict, ctypes.cast(intp._make_string('float_repr_style'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(m), ctypes_wrapped.c_void_p).value or 0) del syserr del v del m del s del sysout del sysdict del sysin return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def makepathobject(path, delim): first_iteration = None path = ctypes.cast(path, ctypes.POINTER(ctypes_wrapped.c_byte)) delim = ctypes_wrapped.c_int(int(delim.value)) i = ctypes_wrapped.c_int() n = ctypes_wrapped.c_int() p = ctypes.POINTER(ctypes_wrapped.c_byte)() v = ctypes.POINTER(g.PyObject)() w = ctypes.POINTER(g.PyObject)() helpers.assign(n, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(path), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(p, (ctypes.cast(intp._storePtr(values.strchr.value(p, delim)), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(n) helpers.postfixIncPtr(p) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(values.strchr.value(path, delim)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(values.strchr.value(path, ctypes_wrapped.c_int(ctypes.c_byte(0).value))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(path, g.Py_ssize_t(int(ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(path, ctypes_wrapped.c_void_p).value or 0)) / 1)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value ctypes_wrapped.c_int(int(g.PyList_SetItem(v, g.Py_ssize_t(int(i.value)), w))) if ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(0).value)).value: break helpers.assignPtr(path, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del i del delim del n del p del w del v del path return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySys_SetPath(path): path = ctypes.cast(path, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.makepathobject(path, ctypes_wrapped.c_int(int(ctypes.c_byte(58).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("can't create sys.path"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('path'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("can't assign sys.path"), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del path del v return @staticmethod def makeargvobject(argc, argv): first_iteration = None argc = ctypes_wrapped.c_int(int(argc.value)) argv = ctypes.cast(argv, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) av = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((argc.value <= ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(argv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: empty_argv = (ctypes.POINTER(ctypes_wrapped.c_byte) * 1L)(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(argv, (ctypes.cast(intp._storePtr(empty_argv), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(argc, ctypes_wrapped.c_int(int(1L)).value) del empty_argv helpers.assignPtr(av, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(argc.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(av, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: i = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < argc.value)).value: pass else: break v = ctypes.cast(intp._getPtr(g.PyString_FromString(helpers.ptrArithmetic(argv, '+', i.value).contents), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(av, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(av, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(av, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(av, ctypes_wrapped.c_int(int(0L)).value) break ctypes_wrapped.c_int(int(g.PyList_SetItem(av, g.Py_ssize_t(int(i.value)), v))) del v del i return (ctypes.cast(intp._storePtr(av), ctypes_wrapped.c_void_p).value or 0) del argc del argv del av return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySys_SetArgvEx(argc, argv, updatepath): argc = ctypes_wrapped.c_int(int(argc.value)) argv = ctypes.cast(argv, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) updatepath = ctypes_wrapped.c_int(int(updatepath.value)) av = ctypes.cast(intp._getPtr(g.makeargvobject(argc, argv), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) path = ctypes.cast(intp._getPtr(g.PySys_GetObject(ctypes.cast(intp._make_string('path'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(av, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('no mem for sys.argv'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySys_SetObject(ctypes.cast(intp._make_string('argv'), ctypes.POINTER(ctypes_wrapped.c_byte)), av))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("can't assign sys.argv"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((updatepath.value and ctypes_wrapped.c_int(((ctypes.cast(path, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: argv0 = ctypes.cast(helpers.ptrArithmetic(argv, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(ctypes_wrapped.c_byte)) p = ctypes.POINTER(ctypes_wrapped.c_byte)() n = g.Py_ssize_t() a = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((argc.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(argv0, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((values.strcmp.value(argv0, ctypes.cast(intp._make_string('-c'), ctypes.POINTER(ctypes_wrapped.c_byte))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(p, (ctypes.cast(intp._storePtr(values.strrchr.value(argv0, ctypes_wrapped.c_int(ctypes.c_byte(47).value))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes_wrapped.c_long((((ctypes.cast(helpers.ptrArithmetic(p, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(argv0, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) if ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(1L)).value)).value: helpers.postfixDec(n) helpers.assignPtr(a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(argv0, n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('no mem for sys.path insertion'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Insert(path, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), a))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('sys.path.insert(0) failed'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del a del p del argv0 del n while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(av, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(av, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(av, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del path del argc del updatepath del argv del av return @staticmethod def PySys_SetArgv(argc, argv): argc = ctypes_wrapped.c_int(int(argc.value)) argv = ctypes.cast(argv, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) g.PySys_SetArgvEx(argc, argv, ctypes_wrapped.c_int(int(1L))) del argc del argv return @staticmethod def mywrite(name, fp, format_a, va): name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(va) file_a = ctypes.POINTER(g.PyObject)() error_type = ctypes.POINTER(g.PyObject)() error_value = ctypes.POINTER(g.PyObject)() error_traceback = ctypes.POINTER(g.PyObject)() g.PyErr_Fetch(ctypes.pointer(error_type), ctypes.pointer(error_value), ctypes.pointer(error_traceback)) helpers.assignPtr(file_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySys_GetObject(name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(file_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyFile_AsFile(file_a), ctypes.POINTER(ctypes_wrapped.c_int)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(fp, ctypes_wrapped.c_void_p).value or 0))).value)).value: values.vfprintf.value(fp, format_a, va) else: buffer_a = (ctypes_wrapped.c_byte * 1001L)() written = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyOS_vsnprintf(ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_size_t(ctypes.sizeof(buffer_a)), format_a, va))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyFile_WriteString(ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)), file_a))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() values.fputs.value(ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((written.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(written.value)).value >= ctypes_wrapped.c_size_t(ctypes.sizeof(buffer_a)).value)).value)).value: truncated = ctypes.cast(intp._make_string('... truncated'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyFile_WriteString(truncated, file_a))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() values.fputs.value(truncated, ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) del truncated del written del buffer_a g.PyErr_Restore(error_type, error_value, error_traceback) del fp del va del error_value del name del error_traceback del error_type del file_a del format_a return @staticmethod def PySys_WriteStdout(format_a, *varargs): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) values.va_start.value(va, format_a) g.mywrite(ctypes.cast(intp._make_string('stdout'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(values.stdout.value, ctypes.POINTER(ctypes_wrapped.c_int)), format_a, va) values.va_end.value(va) del va del format_a return @staticmethod def PySys_WriteStderr(format_a, *varargs): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) values.va_start.value(va, format_a) g.mywrite(ctypes.cast(intp._make_string('stderr'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(values.stderr.value, ctypes.POINTER(ctypes_wrapped.c_int)), format_a, va) values.va_end.value(va) del va del format_a return _Py_HashSecret_Initialized = ctypes_wrapped.c_int() @staticmethod def dev_urandom_noraise(buffer_a, size): buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)) size = g.Py_ssize_t(int(size.value)) fd = ctypes_wrapped.c_int() n = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < size.value))) helpers.assign(fd, values.open_a.value(ctypes.cast(intp._make_string('/dev/urandom'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(0L))).value) if ctypes_wrapped.c_int((fd.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('Failed to open /dev/urandom'), ctypes.POINTER(ctypes_wrapped.c_byte))) while ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < size.value)).value: while True: helpers.assign(n, values.read.value(fd, ctypes.cast(buffer_a, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int(size.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((values.errno.value.value == ctypes_wrapped.c_int(int(4L)).value)).value)).value: continue else: break if ctypes_wrapped.c_int((n.value <= ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('Failed to read bytes from /dev/urandom'), ctypes.POINTER(ctypes_wrapped.c_byte))) break helpers.augAssignPtr(buffer_a, u'+=', n.value) helpers.augAssign(size, u'-=', g.Py_ssize_t(int(n.value)).value) values.close.value(fd) del n del fd del buffer_a del size return @staticmethod def dev_urandom_python(buffer_a, size): buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)) size = g.Py_ssize_t(int(size.value)) fd = ctypes_wrapped.c_int() n = g.Py_ssize_t() if ctypes_wrapped.c_int((size.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(fd, values.open_a.value(ctypes.cast(intp._make_string('/dev/urandom'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(0L))).value) if ctypes_wrapped.c_int((fd.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_NotImplementedError, ctypes.cast(intp._make_string('/dev/urandom (or equivalent) not found'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: while True: helpers.assign(n, values.read.value(fd, ctypes.cast(buffer_a, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int(size.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((values.errno.value.value == ctypes_wrapped.c_int(int(4L)).value)).value)).value: continue else: break if ctypes_wrapped.c_int((n.value <= ctypes_wrapped.c_int(int(0L)).value)).value: break helpers.augAssignPtr(buffer_a, u'+=', n.value) helpers.augAssign(size, u'-=', g.Py_ssize_t(int(n.value)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < size.value)).value: continue else: break if ctypes_wrapped.c_int((n.value <= ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_SetFromErrno(g.PyExc_OSError), ctypes.POINTER(g.PyObject)) else: intp._getPtr(g.PyErr_Format(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('Failed to read %zi bytes from /dev/urandom'), ctypes.POINTER(ctypes_wrapped.c_byte)), size), ctypes.POINTER(g.PyObject)) values.close.value(fd) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.close.value(fd) return ctypes_wrapped.c_int(int(0L)).value del n del fd del buffer_a del size return ctypes_wrapped.c_int().value @staticmethod def lcg_urandom(x0, buffer_a, size): first_iteration = None x0 = ctypes_wrapped.c_uint(int(x0.value)) buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_ubyte)) size = ctypes_wrapped.c_ulong(int(size.value)) index = ctypes_wrapped.c_ulong() x = ctypes_wrapped.c_uint() helpers.assign(x, x0.value) if True: first_iteration = True helpers.assign(index, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(index) if ctypes_wrapped.c_int((index.value < size.value)).value: pass else: break helpers.augAssign(x, u'*=', ctypes_wrapped.c_int(int(214013L)).value) helpers.augAssign(x, u'+=', ctypes_wrapped.c_int(int(2531011L)).value) helpers.assign(helpers.ptrArithmetic(buffer_a, '+', index.value).contents, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((x.value >> ctypes_wrapped.c_int(int(16L)).value))).value & ctypes_wrapped.c_int(int(255L)).value))).value) del index del x0 del x del buffer_a del size return @staticmethod def _PyOS_URandom(buffer_a, size): buffer_a = ctypes.cast(buffer_a, ctypes_wrapped.c_void_p) size = g.Py_ssize_t(int(size.value)) if ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('negative argument not allowed'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(g.dev_urandom_python(ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)), size))).value del buffer_a del size return ctypes_wrapped.c_int().value @staticmethod def _PyRandom_Init(): env = ctypes.POINTER(ctypes_wrapped.c_byte)() secret = ctypes.cast(ctypes.pointer(g._Py_HashSecret), ctypes_wrapped.c_void_p) secret_size = g.Py_ssize_t(int(ctypes_wrapped.c_size_t(16).value)) if g._Py_HashSecret_Initialized.value: return helpers.assign(g._Py_HashSecret_Initialized, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int(int((not g.Py_HashRandomizationFlag.value))).value: values.memset.value(secret, ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_ulong(secret_size.value)) return helpers.assignPtr(env, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)) if g.Py_IgnoreEnvironmentFlag.value else ctypes.cast(values.getenv.value(intp._make_string('PYTHONHASHSEED')), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(env, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((env.contents.value != ctypes.c_byte(0).value)).value)).value and ctypes_wrapped.c_int((values.strcmp.value(env, ctypes.cast(intp._make_string('random'), ctypes.POINTER(ctypes_wrapped.c_byte))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: endptr = ctypes.cast(env, ctypes.POINTER(ctypes_wrapped.c_byte)) seed = ctypes_wrapped.c_ulong() helpers.assign(seed, values.strtoul.value(env, ctypes.cast(ctypes.pointer(endptr), ctypes.POINTER(ctypes_wrapped.c_char_p)), ctypes_wrapped.c_int(int(10L))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((endptr.contents.value != ctypes.c_byte(0).value)).value or ctypes_wrapped.c_int((seed.value > ctypes_wrapped.c_long(int(4294967295L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((values.errno.value.value == ctypes_wrapped.c_int(int(34L)).value)).value and ctypes_wrapped.c_int((seed.value == ctypes_wrapped.c_long(int(18446744073709551615L)).value)).value)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PYTHONHASHSEED must be "random" or an integer in range [0; 4294967295]'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((seed.value == ctypes_wrapped.c_int(int(0L)).value)).value: values.memset.value(secret, ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_ulong(secret_size.value)) else: g.lcg_urandom(ctypes_wrapped.c_uint(int(seed.value)), ctypes.cast(secret, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes_wrapped.c_ulong(int(secret_size.value))) del seed del endptr else: g.dev_urandom_noraise(ctypes.cast(secret, ctypes.POINTER(ctypes_wrapped.c_byte)), secret_size) del secret del secret_size del env return Py_DivisionWarningFlag = ctypes_wrapped.c_int() Py_Py3kWarningFlag = ctypes_wrapped.c_int() @staticmethod def Py_IncRef(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del o return @staticmethod def Py_DecRef(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del o return @staticmethod def PyObject_Init(op, tp): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(tp, ctypes.POINTER(g.PyTypeObject)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(tp), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del tp del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_InitVar(op, tp, size): op = ctypes.cast(op, ctypes.POINTER(g.PyVarObject)) tp = ctypes.cast(tp, ctypes.POINTER(g.PyTypeObject)) size = g.Py_ssize_t(int(size.value)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyVarObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(op.contents.ob_size, size.value) helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(tp), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del size del tp del op return (ctypes.cast(ctypes.POINTER(g.PyVarObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_New(tp): tp = ctypes.cast(tp, ctypes.POINTER(g.PyTypeObject)) op = ctypes.POINTER(g.PyObject)() helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(tp.contents.tp_basicsize.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_long(int(tp.contents.tp_basicsize.value)) if tp.contents.tp_basicsize.value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(tp), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1]), ctypes_wrapped.c_void_p).value or 0) del tp del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_NewVar(tp, nitems): tp = ctypes.cast(tp, ctypes.POINTER(g.PyTypeObject)) nitems = g.Py_ssize_t(int(nitems.value)) op = ctypes.POINTER(g.PyVarObject)() size = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((tp.contents.tp_basicsize.value + ctypes_wrapped.c_long(int((nitems.value * tp.contents.tp_itemsize.value))).value))).value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value)).value)) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(size.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(size.value)) if size.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyVarObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyVarObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr((helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, nitems.value), ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(tp), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1])[1]), ctypes_wrapped.c_void_p).value or 0) del size del nitems del tp del op return (ctypes.cast(ctypes.POINTER(g.PyVarObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_Del(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) values.free.value(op) del op return @staticmethod def internal_print(op, fp, flags, nesting): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) flags = ctypes_wrapped.c_int(int(flags.value)) nesting = ctypes_wrapped.c_int(int(nesting.value)) ret = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((nesting.value > ctypes_wrapped.c_int(int(10L)).value)).value: g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('print recursion'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int(g.PyErr_CheckSignals())).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.clearerr.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))) elif ctypes_wrapped.c_int((op.contents.ob_refcnt.value <= ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(op.contents.ob_refcnt.value)), op) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_print, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: s = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(1L)).value))).value: helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(ret, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) else: helpers.assign(ret, ctypes_wrapped.c_int(int(g.internal_print(s, fp, ctypes_wrapped.c_int(int(1L)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((nesting.value + ctypes_wrapped.c_int(int(1L)).value))).value))))).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del s else: helpers.assign(ret, helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_print, op, fp, flags).value) if ctypes_wrapped.c_int((ret.value == ctypes_wrapped.c_int(int(0L)).value)).value: if values.ferror.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))).value: intp._getPtr(g.PyErr_SetFromErrno(g.PyExc_IOError), ctypes.POINTER(g.PyObject)) values.clearerr.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) helpers.assign(ret, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) return ret.value del fp del flags del nesting del ret del op return ctypes_wrapped.c_int().value @staticmethod def PyObject_Print(op, fp, flags): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) flags = ctypes_wrapped.c_int(int(flags.value)) return ctypes_wrapped.c_int(int(g.internal_print(op, fp, flags, ctypes_wrapped.c_int(int(0L))))).value del fp del flags del op return ctypes_wrapped.c_int().value @staticmethod def _PyObject_Dump(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('NULL\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) else: values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('object : '), ctypes.POINTER(ctypes_wrapped.c_byte))) (ctypes_wrapped.c_int(int(g.PyObject_Print(op, ctypes.cast(values.stderr.value, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes_wrapped.c_int(int(0L))))), None)[1] values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('\ntype : %s\nrefcount: %ld\naddress : %p\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(intp._make_string('NULL'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_long(int(op.contents.ob_refcnt.value)), op) del op return @staticmethod def PyObject_Repr(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int(g.PyErr_CheckSignals())).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('<%s object at %p>'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: res = ctypes.POINTER(g.PyObject)() helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_repr, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__repr__ returned non-string (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_Str(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() type_ok = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' while getting the str of an object'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_str, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(type_ok, ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value) if ctypes_wrapped.c_int(int((not type_ok.value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__str__ returned non-string (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del type_ok del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Str(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) res = ctypes.cast(intp._getPtr(g._PyObject_Str(v), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def adjust_tp_compare(c): c = ctypes_wrapped.c_int(int(c.value)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value: t = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() tb = ctypes.POINTER(g.PyObject)() g.PyErr_Fetch(ctypes.pointer(t), ctypes.pointer(v), ctypes.pointer(tb)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_RuntimeWarning, ctypes.cast(intp._make_string("tp_compare didn't return -1 or -2 for exception"), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(t, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(t, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(t, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(t, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(tb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tb, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break else: g.PyErr_Restore(t, v, tb) del tb del t del v return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value or ctypes_wrapped.c_int((c.value > ctypes_wrapped.c_int(int(1L)).value)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_RuntimeWarning, ctypes.cast(intp._make_string("tp_compare didn't return -1, 0 or 1"), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value else: return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value))).value else: values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int((c.value <= ctypes_wrapped.c_int(int(1L)).value)).value))) return c.value del c return ctypes_wrapped.c_int().value _Py_SwappedOp = (ctypes_wrapped.c_int * 6)() # TODO init _Py_SwappedOp with (ctypes_wrapped.c_int * 6)(ctypes_wrapped.c_int(int(4L)), ctypes_wrapped.c_int(int(5L)), ctypes_wrapped.c_int(int(2L)), ctypes_wrapped.c_int(int(3L)), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_int(int(1L))) @staticmethod def try_rich_compare(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) f = g.richcmpfunc() res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(w.contents.ob_type, v.contents.ob_type))).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(f, (ctypes.cast((ctypes.cast(w.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, w, v, helpers.ptrArithmetic(g._Py_SwappedOp, '+', op.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(f, (ctypes.cast((ctypes.cast(v.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(f, (ctypes.cast((ctypes.cast(w.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, w, v, helpers.ptrArithmetic(g._Py_SwappedOp, '+', op.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del op del f del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def try_rich_compare_bool(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) res = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(v.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(w.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(2L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.try_rich_compare(v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(2L)).value helpers.assign(ok, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value del res del op del ok del w del v return ctypes_wrapped.c_int().value class _class_struct__local__anonymous_58(ctypes.Structure): pass structs._local__anonymous_58 = _class_struct__local__anonymous_58 _class_struct__local__anonymous_58.fields = [ ('op', ctypes_wrapped.c_int), ('outcome', ctypes_wrapped.c_int)] del _class_struct__local__anonymous_58 values.anonymous_value_a = cparser.CWrapValue(structs._local__anonymous_58) @staticmethod def try_rich_to_3way_compare(v, w): first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) tries = (values.anonymous_value_a.value * 3L)(structs._local__anonymous_58(ctypes_wrapped.c_int(int(2L)), ctypes_wrapped.c_int(int(0L))), structs._local__anonymous_58(ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value)))), structs._local__anonymous_58(ctypes_wrapped.c_int(int(4L)), ctypes_wrapped.c_int(int(1L)))) i = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(v.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(w.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(2L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(3L)).value)).value: pass else: break if True: _switchvalue = None _switchvalue = ctypes_wrapped.c_int(int(g.try_rich_compare_bool(v, w, helpers.ptrArithmetic(tries, '+', i.value).contents.op))).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)): _switchfallthrough = True return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True return helpers.ptrArithmetic(tries, '+', i.value).contents.outcome.value break del _switchfallthrough del _switchvalue return ctypes_wrapped.c_int(int(2L)).value del i del tries del w del v return ctypes_wrapped.c_int().value @staticmethod def try_3way_compare(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) c = ctypes_wrapped.c_int() f = g.cmpfunc() helpers.assignPtr(f, (ctypes.cast(v.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(f, v, w).value if ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(w.contents.ob_type.contents.tp_compare, v, w).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(c, helpers.checkedFuncPtrCall(f, v, w).value) return ctypes_wrapped.c_int(int(g.adjust_tp_compare(c))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g._PyObject_SlotCompare), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g._PyObject_SlotCompare), ctypes_wrapped.c_void_p).value or 0))).value)).value: return ctypes_wrapped.c_int(int(g._PyObject_SlotCompare(v, w))).value helpers.assign(c, ctypes_wrapped.c_int(int(g.PyNumber_CoerceEx(ctypes.pointer(v), ctypes.pointer(w)))).value) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value if ctypes_wrapped.c_int((c.value > ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(2L)).value helpers.assignPtr(f, (ctypes.cast(v.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(c, helpers.checkedFuncPtrCall(f, v, w).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(g.adjust_tp_compare(c))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(2L)).value del c del f del w del v return ctypes_wrapped.c_int().value @staticmethod def default_3way_compare(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) c = ctypes_wrapped.c_int() vname = ctypes.POINTER(ctypes_wrapped.c_byte)() wname = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value: vv = g.Py_uintptr_t(int(g.Py_uintptr_t(int((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value)) ww = g.Py_uintptr_t(int(g.Py_uintptr_t(int((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value)) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((vv.value < ww.value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((vv.value > ww.value)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value del ww del vv if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int(int(g.PyNumber_Check(v))).value: helpers.assignPtr(vname, (ctypes.cast(intp._storePtr(intp._make_string('')), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(vname, (ctypes.cast(intp._storePtr(v.contents.ob_type.contents.tp_name), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int(g.PyNumber_Check(w))).value: helpers.assignPtr(wname, (ctypes.cast(intp._storePtr(intp._make_string('')), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(wname, (ctypes.cast(intp._storePtr(w.contents.ob_type.contents.tp_name), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(c, values.strcmp.value(vname, wname).value) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((c.value > ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((g.Py_uintptr_t(int((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value < g.Py_uintptr_t(int((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value))).value del c del wname del vname del w del v return ctypes_wrapped.c_int().value @staticmethod def do_cmp(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) c = ctypes_wrapped.c_int() f = g.cmpfunc() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(f, (ctypes.cast(v.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(c, helpers.checkedFuncPtrCall(f, v, w).value) if ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int(2L)).value)).value: return c.value else: return ctypes_wrapped.c_int(int(g.adjust_tp_compare(c))).value helpers.assign(c, ctypes_wrapped.c_int(int(g.try_rich_to_3way_compare(v, w))).value) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(2L)).value)).value: return c.value helpers.assign(c, ctypes_wrapped.c_int(int(g.try_3way_compare(v, w))).value) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(2L)).value)).value: return c.value return ctypes_wrapped.c_int(int(g.default_3way_compare(v, w))).value del c del f del w del v return ctypes_wrapped.c_int().value @staticmethod def PyObject_Compare(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) result = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/object.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(859))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' in cmp'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(result, ctypes_wrapped.c_int(int(g.do_cmp(v, w))).value) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((result.value < ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(result.value))).value del result del w del v return ctypes_wrapped.c_int().value @staticmethod def convert_3way_to_object(op, c): op = ctypes_wrapped.c_int(int(op.value)) c = ctypes_wrapped.c_int(int(c.value)) result = ctypes.POINTER(g.PyObject)() if True: _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(0L)).value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value <= ctypes_wrapped.c_int(int(0L)).value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value)): _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value == ctypes_wrapped.c_int(int(0L)).value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value)): _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int(0L)).value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value)): _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value > ctypes_wrapped.c_int(int(0L)).value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value)): _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(0L)).value)).value) break break del _switchfallthrough del _switchvalue helpers.assignPtr(result, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if c.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del c del result del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def try_3way_to_rich_compare(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) c = ctypes_wrapped.c_int() helpers.assign(c, ctypes_wrapped.c_int(int(g.try_3way_compare(v, w))).value) if ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(2L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int((op.value != ctypes_wrapped.c_int(int(2L)).value)).value)).value and ctypes_wrapped.c_int((op.value != ctypes_wrapped.c_int(int(3L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('comparing unequal types not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(c, ctypes_wrapped.c_int(int(g.default_3way_compare(v, w))).value) if ctypes_wrapped.c_int((c.value <= ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.convert_3way_to_object(op, c), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del c del op del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_richcmp(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) res = ctypes.POINTER(g.PyObject)() helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.try_rich_compare(v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.try_3way_to_rich_compare(v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del op del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_RichCompare(v, w, op): goto = None while True: if (goto is None): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) res = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value <= op.value)).value and ctypes_wrapped.c_int((op.value <= ctypes_wrapped.c_int(int(5L)).value)).value))) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' in cmp'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value): goto = 2 continue fcmp = g.cmpfunc() frich = ctypes.cast((ctypes.cast(v.contents.ob_type.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), g.richcmpfunc) if (not ctypes_wrapped.c_int(((ctypes.cast(frich, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(frich, v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 4 continue goto = u'Done' continue if (goto == 4): goto = None if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto == 3): goto = None if (goto is None): helpers.assignPtr(fcmp, (ctypes.cast(v.contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(fcmp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue c = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(fcmp, v, w).value)) helpers.assign(c, ctypes_wrapped.c_int(int(g.adjust_tp_compare(c))).value) if (not ctypes_wrapped.c_int((c.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value): goto = 12 continue helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) goto = u'Done' continue if (goto == 12): goto = None if (goto is None): helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.convert_3way_to_object(op, c), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'Done' continue del c if (goto == 11): goto = None if (goto is None): del frich del fcmp if (goto == 2): goto = None if (goto is None): helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.do_richcmp(v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'Done'): goto = None if (goto is None): helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del op del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyObject_RichCompareBool(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) res = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value elif ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(3L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_RichCompare(v, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyBool_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(ok, ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value) else: helpers.assign(ok, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value del res del op del ok del w del v return ctypes_wrapped.c_int().value @staticmethod def _Py_HashDouble(v): v = ctypes_wrapped.c_double(v.value) intpart = ctypes_wrapped.c_double() fractpart = ctypes_wrapped.c_double() expo = ctypes_wrapped.c_int() hipart = ctypes_wrapped.c_long() x = ctypes_wrapped.c_long() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((v.value and ctypes_wrapped.c_int((ctypes_wrapped.c_double((v.value * ctypes_wrapped.c_double(0.5).value)).value == v.value)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((v.value != v.value)).value)).value)).value)).value: if ctypes_wrapped.c_int((v.value and ctypes_wrapped.c_int((ctypes_wrapped.c_double((v.value * ctypes_wrapped.c_double(0.5).value)).value == v.value)).value)).value: return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(271828L)).value))).value)) if ctypes_wrapped.c_int((v.value < ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(314159L)).value))).value else: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(fractpart, ctypes_wrapped.c_double(g.modf(v, ctypes.pointer(intpart))).value) if ctypes_wrapped.c_int((fractpart.value == ctypes_wrapped.c_double(0.0).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((intpart.value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int(9223372036854775807L)).value / ctypes_wrapped.c_int(int(2L)).value))).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_double((- intpart.value)).value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int(9223372036854775807L)).value / ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value: plong = ctypes.POINTER(g.PyObject)() helpers.assignPtr(plong, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromDouble(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(plong, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(x, ctypes_wrapped.c_long(int(g.PyObject_Hash(plong))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(plong, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(plong, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(plong, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return x.value del plong helpers.assign(x, ctypes_wrapped.c_long(int(intpart.value)).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return x.value helpers.assign(v, ctypes_wrapped.c_double(g.frexp(v, ctypes.pointer(expo))).value) helpers.augAssign(v, u'*=', ctypes_wrapped.c_double(2147483648.0).value) helpers.assign(hipart, ctypes_wrapped.c_long(int(v.value)).value) helpers.assign(v, ctypes_wrapped.c_double((ctypes_wrapped.c_double((v.value - ctypes_wrapped.c_double(hipart.value).value)).value * ctypes_wrapped.c_double(2147483648.0).value)).value) helpers.assign(x, ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((hipart.value + ctypes_wrapped.c_long(int(v.value)).value))).value + ctypes_wrapped.c_int(int((expo.value << ctypes_wrapped.c_int(int(15L)).value))).value))).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return x.value del fractpart del hipart del expo del v del x del intpart return ctypes_wrapped.c_long().value @staticmethod def _Py_HashPointer(p): p = ctypes.cast(p, ctypes_wrapped.c_void_p) x = ctypes_wrapped.c_long() y = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0))).value)) helpers.assign(y, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((y.value >> ctypes_wrapped.c_int(int(4L)).value))).value | ctypes_wrapped.c_ulong(int((y.value << ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value * ctypes_wrapped.c_int(int(8L)).value))).value - ctypes_wrapped.c_int(int(4L)).value))).value))).value))).value) helpers.assign(x, ctypes_wrapped.c_long(int(y.value)).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return x.value del y del p del x return ctypes_wrapped.c_long().value @staticmethod def PyObject_HashNotImplemented(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("unhashable type: '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), self.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del self return ctypes_wrapped.c_long().value _Py_HashSecret = _Py_HashSecret_t() @staticmethod def PyObject_Hash(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(v.contents.ob_type, ctypes.POINTER(g.PyTypeObject)) if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_hash, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.checkedFuncPtrCall(tp.contents.tp_hash, v).value if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(tp))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_hash, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.checkedFuncPtrCall(tp.contents.tp_hash, v).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(tp.contents.tp_richcompare, ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((tp.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_long(int(g._Py_HashPointer(ctypes.cast(v, ctypes_wrapped.c_void_p)))).value return ctypes_wrapped.c_long(int(g.PyObject_HashNotImplemented(v))).value del tp del v return ctypes_wrapped.c_long().value @staticmethod def PyObject_GetAttrString(v, name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) w = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_getattr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_getattr, v, ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del name del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_HasAttrString(v, name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) res = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(v, name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value del res del name del v return ctypes_wrapped.c_int().value @staticmethod def PyObject_SetAttrString(v, name, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) s = ctypes.POINTER(g.PyObject)() res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_setattr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.checkedFuncPtrCall(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_setattr, v, ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)), w).value helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(res, ctypes_wrapped.c_int(int(g.PyObject_SetAttr(v, s, w))).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return res.value del res del s del name del w del v return ctypes_wrapped.c_int().value @staticmethod def PyObject_GetAttr(v, name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("attribute name must be string, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_getattro, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(tp.contents.tp_getattro, v, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_getattr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(tp.contents.tp_getattr, v, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("'%.50s' object has no attribute '%.400s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), tp.contents.tp_name, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del name del tp del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_HasAttr(v, name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) res = ctypes.cast(intp._getPtr(g.PyObject_GetAttr(v, name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value del res del name del v return ctypes_wrapped.c_int().value @staticmethod def PyObject_SetAttr(v, name, value): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) err = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("attribute name must be string, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: helpers.postfixInc(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) g.PyString_InternInPlace(ctypes.pointer(name)) if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_setattro, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, helpers.checkedFuncPtrCall(tp.contents.tp_setattro, v, name, value).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return err.value if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_setattr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(err, helpers.checkedFuncPtrCall(tp.contents.tp_setattr, v, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), value).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return err.value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_getattr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_getattro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%.100s' object has no attributes (%s .%.100s)"), ctypes.POINTER(ctypes_wrapped.c_byte)), tp.contents.tp_name, (ctypes.cast(intp._make_string('del'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(intp._make_string('assign to'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%.100s' object has only read-only attributes (%s .%.100s)"), ctypes.POINTER(ctypes_wrapped.c_byte)), tp.contents.tp_name, (ctypes.cast(intp._make_string('del'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(intp._make_string('assign to'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del err del tp del name del value del v return ctypes_wrapped.c_int().value @staticmethod def _PyObject_GetDictPtr(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) dictoffset = g.Py_ssize_t() tp = ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) if ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((tp.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(dictoffset, tp.contents.tp_dictoffset.value) if ctypes_wrapped.c_int((dictoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((dictoffset.value < ctypes_wrapped.c_int(int(0L)).value)).value: tsize = g.Py_ssize_t() size = ctypes_wrapped.c_ulong() helpers.assign(tsize, ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((tsize.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(tsize, g.Py_ssize_t(int((- tsize.value))).value) helpers.assign(size, ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((tp.contents.tp_basicsize.value + ctypes_wrapped.c_long(int((tsize.value * tp.contents.tp_itemsize.value))).value))).value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value)).value) helpers.augAssign(dictoffset, u'+=', ctypes_wrapped.c_long(int(size.value)).value) values.assert_a.value(ctypes_wrapped.c_int((dictoffset.value > ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((dictoffset.value % ctypes_wrapped.c_int(int(8L)).value))).value == ctypes_wrapped.c_int(int(0L)).value))) del tsize del size return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', dictoffset.value), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0) del dictoffset del obj del tp return (ctypes.cast(ctypes.POINTER(ctypes.POINTER(g.PyObject))(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_SelfIter(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0) del obj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_NextNotImplemented(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%.200s' object is not iterable"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_GenericGetAttrWithDict(obj, name, dict_a): goto = None while True: if (goto is None): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) descr = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() f = g.descrgetfunc() dictoffset = g.Py_ssize_t() dictptr = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("attribute name must be string, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value goto = 1 continue if (goto == 2): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(tp))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue goto = u'done' continue if (goto == 4): goto = None if (goto == 3): goto = None if (goto is None): helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(tp, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.assignPtr(f, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((descr.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 11 continue helpers.assignPtr(f, (ctypes.cast(descr.contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 12 continue helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, descr, obj, ctypes.cast(obj.contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = u'done' continue if (goto == 12): goto = None if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue helpers.assign(dictoffset, tp.contents.tp_dictoffset.value) if (not ctypes_wrapped.c_int((dictoffset.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue if (not ctypes_wrapped.c_int((dictoffset.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue tsize = g.Py_ssize_t() size = ctypes_wrapped.c_ulong() helpers.assign(tsize, ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not ctypes_wrapped.c_int((tsize.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue helpers.assign(tsize, g.Py_ssize_t(int((- tsize.value))).value) if (goto == 22): goto = None if (goto is None): helpers.assign(size, ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((tp.contents.tp_basicsize.value + ctypes_wrapped.c_long(int((tsize.value * tp.contents.tp_itemsize.value))).value))).value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value)).value) helpers.augAssign(dictoffset, u'+=', ctypes_wrapped.c_long(int(size.value)).value) values.assert_a.value(ctypes_wrapped.c_int((dictoffset.value > ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((dictoffset.value % ctypes_wrapped.c_int(int(8L)).value))).value == ctypes_wrapped.c_int(int(0L)).value))) del tsize del size if (goto == 21): goto = None if (goto is None): helpers.assignPtr(dictptr, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', dictoffset.value), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(dictptr.contents), ctypes_wrapped.c_void_p).value or 0)) if (goto == 20): goto = None if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue helpers.postfixInc(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(dict_a, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 25): goto = None if (goto is None): if (not True): goto = 26 continue if (not ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue pass goto = 27 continue if (goto == 28): goto = None if (goto == 29): goto = None if (goto is None): if (not True): goto = 30 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue pass goto = 31 continue if (goto == 32): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 34 continue continue goto = 33 continue if (goto == 34): goto = None if (goto is None): goto = 30 continue if (goto == 33): goto = None if (goto is None): goto = 29 continue if (goto == 30): goto = None if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 36 continue continue goto = 35 continue if (goto == 36): goto = None if (goto is None): goto = 26 continue if (goto == 35): goto = None if (goto is None): goto = 25 continue if (goto == 26): goto = None if (goto == 37): goto = None if (goto is None): if (not True): goto = 38 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 40 continue pass goto = 39 continue if (goto == 40): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 42 continue continue goto = 41 continue if (goto == 42): goto = None if (goto is None): goto = 38 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = u'done' continue if (goto == 24): goto = None if (goto == 43): goto = None if (goto is None): if (not True): goto = 44 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue pass goto = 45 continue if (goto == 46): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 45): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 44): goto = None if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 49 continue helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, descr, obj, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 50): goto = None if (goto is None): if (not True): goto = 51 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 53 continue pass goto = 52 continue if (goto == 53): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 52): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 55 continue continue goto = 54 continue if (goto == 55): goto = None if (goto is None): goto = 51 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 51): goto = None if (goto is None): goto = u'done' continue if (goto == 49): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue helpers.assignPtr(res, (ctypes.cast(intp._storePtr(descr), ctypes_wrapped.c_void_p).value or 0)) goto = u'done' continue if (goto == 56): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("'%.50s' object has no attribute '%.400s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), tp.contents.tp_name, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) if (goto == u'done'): goto = None if (goto == 57): goto = None if (goto is None): if (not True): goto = 58 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 60 continue pass goto = 59 continue if (goto == 60): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 62 continue continue goto = 61 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 61): goto = None if (goto is None): goto = 57 continue if (goto == 58): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del obj del name del descr del f del res del dict_a del dictoffset del tp del dictptr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyObject_GenericGetAttr(obj, name): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_GenericGetAttrWithDict(obj, name, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del obj del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_GenericSetAttrWithDict(obj, name, value, dict_a): goto = None while True: if (goto is None): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) descr = ctypes.POINTER(g.PyObject)() f = g.descrsetfunc() dictptr = ctypes.POINTER(ctypes.POINTER(g.PyObject))() res = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("attribute name must be string, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value goto = 1 continue if (goto == 2): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(tp))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue goto = u'done' continue if (goto == 4): goto = None if (goto == 3): goto = None if (goto is None): helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(tp, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(f, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((descr.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 5 continue helpers.assignPtr(f, (ctypes.cast(descr.contents.ob_type.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 6 continue helpers.assign(res, helpers.checkedFuncPtrCall(f, descr, obj, value).value) goto = u'done' continue if (goto == 6): goto = None if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue helpers.assignPtr(dictptr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_GetDictPtr(obj), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dictptr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(dictptr.contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 9 continue helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue goto = u'done' continue if (goto == 10): goto = None if (goto is None): helpers.assignPtr(dictptr.contents, (ctypes.cast(intp._storePtr(dict_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 9): goto = None if (goto == 8): goto = None if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue helpers.postfixInc(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue helpers.assign(res, ctypes_wrapped.c_int(int(g.PyDict_DelItem(dict_a, name))).value) goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.assign(res, ctypes_wrapped.c_int(int(g.PyDict_SetItem(dict_a, name, value))).value) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_KeyError))).value)).value): goto = 14 continue g.PyErr_SetObject(g.PyExc_AttributeError, name) if (goto == 14): goto = None if (goto == 15): goto = None if (goto is None): if (not True): goto = 16 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue pass goto = 17 continue if (goto == 18): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 20 continue continue goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = 16 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = u'done' continue if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue helpers.assign(res, helpers.checkedFuncPtrCall(f, descr, obj, value).value) goto = u'done' continue if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("'%.100s' object has no attribute '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), tp.contents.tp_name, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) goto = u'done' continue if (goto == 22): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("'%.50s' object attribute '%.400s' is read-only"), ctypes.POINTER(ctypes_wrapped.c_byte)), tp.contents.tp_name, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) if (goto == u'done'): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto is None): return res.value del obj del name del descr del f del dictptr del dict_a del tp del value del res return ctypes_wrapped.c_int().value break @staticmethod def PyObject_GenericSetAttr(obj, name, value): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g._PyObject_GenericSetAttrWithDict(obj, name, value, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value del obj del name del value return ctypes_wrapped.c_int().value @staticmethod def PyObject_IsTrue(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) res = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number.contents.nb_nonzero, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(res, helpers.checkedFuncPtrCall(v.contents.ob_type.contents.tp_as_number.contents.nb_nonzero, v).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_mapping.contents.mp_length, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(res, helpers.checkedFuncPtrCall(v.contents.ob_type.contents.tp_as_mapping.contents.mp_length, v).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_sequence.contents.sq_length, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(res, helpers.checkedFuncPtrCall(v.contents.ob_type.contents.tp_as_sequence.contents.sq_length, v).value) else: return ctypes_wrapped.c_int(int(1L)).value return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int((res.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(res.value)).value))).value del res del v return ctypes_wrapped.c_int().value @staticmethod def PyObject_Not(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int() helpers.assign(res, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(v))).value) if ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value: return res.value return ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int(0L)).value)).value del res del v return ctypes_wrapped.c_int().value @staticmethod def PyNumber_CoerceEx(pv, pw): pv = ctypes.cast(pv, ctypes.POINTER(ctypes.POINTER(g.PyObject))) pw = ctypes.cast(pw, ctypes.POINTER(ctypes.POINTER(g.PyObject))) v = ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)) w = ctypes.cast(pw.contents, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(v.contents.ob_type.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(res, helpers.checkedFuncPtrCall(v.contents.ob_type.contents.tp_as_number.contents.nb_coerce, pv, pw).value) if ctypes_wrapped.c_int((res.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return res.value if ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(w.contents.ob_type.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(res, helpers.checkedFuncPtrCall(w.contents.ob_type.contents.tp_as_number.contents.nb_coerce, pw, pv).value) if ctypes_wrapped.c_int((res.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return res.value return ctypes_wrapped.c_int(int(1L)).value del res del pv del pw del w del v return ctypes_wrapped.c_int().value @staticmethod def PyNumber_Coerce(pv, pw): pv = ctypes.cast(pv, ctypes.POINTER(ctypes.POINTER(g.PyObject))) pw = ctypes.cast(pw, ctypes.POINTER(ctypes.POINTER(g.PyObject))) err = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyNumber_CoerceEx(pv, pw))).value)) if ctypes_wrapped.c_int((err.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return err.value g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('number coercion failed'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del pv del pw del err return ctypes_wrapped.c_int().value @staticmethod def PyCallable_Check(x): x = ctypes.cast(x, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(x.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: call = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(x, ctypes.cast(intp._make_string('__call__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(call, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(call, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(call, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(call, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value del call else: return ctypes_wrapped.c_int(((ctypes.cast(x.contents.ob_type.contents.tp_call, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value del x return ctypes_wrapped.c_int().value @staticmethod def merge_class_dict(dict_a, aclass): first_iteration = None dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) aclass = ctypes.cast(aclass, ctypes.POINTER(g.PyObject)) classdict = ctypes.POINTER(g.PyObject)() bases = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(aclass) helpers.assignPtr(classdict, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(aclass, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(classdict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: status = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyDict_Update(dict_a, classdict))).value)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(classdict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(classdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(classdict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del status helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(aclass, ctypes.cast(intp._make_string('__bases__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: i = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assign(n, g.Py_ssize_t(int(g.PySequence_Size(bases))).value) if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break status = ctypes_wrapped.c_int() base = ctypes.cast(intp._getPtr(g.PySequence_GetItem(bases, i), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(status, ctypes_wrapped.c_int(int(g.merge_class_dict(dict_a, base))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del status del base while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del i del n return ctypes_wrapped.c_int(int(0L)).value del aclass del dict_a del bases del classdict return ctypes_wrapped.c_int().value @staticmethod def merge_list_attr(dict_a, obj, attrname): first_iteration = None dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) attrname = ctypes.cast(attrname, ctypes.POINTER(ctypes_wrapped.c_byte)) list_a = ctypes.POINTER(g.PyObject)() result = ctypes_wrapped.c_int() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(obj) values.assert_a.value(attrname) helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, attrname), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: i = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break item = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(result, ctypes_wrapped.c_int(int(g.PyDict_SetItem(dict_a, item, ctypes.pointer(g._Py_NoneStruct)))).value) if ctypes_wrapped.c_int((result.value < ctypes_wrapped.c_int(int(0L)).value)).value: break del item if ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((values.strcmp.value(attrname, ctypes.cast(intp._make_string('__members__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((values.strcmp.value(attrname, ctypes.cast(intp._make_string('__methods__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('__members__ and __methods__ not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del i while True: if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return result.value del attrname del dict_a del obj del list_a del result return ctypes_wrapped.c_int().value @staticmethod def _dir_locals(): names = ctypes.POINTER(g.PyObject)() locals_a = ctypes.cast(intp._getPtr(g.PyEval_GetLocals(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(locals_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('frame does not exist'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(names, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(locals_a, ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(names, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(names, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("dir(): expected keys() of locals to be a list, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(names, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(names, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(names), ctypes_wrapped.c_void_p).value or 0) del locals_a del names return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _specialized_dir_type(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() dict_a = ctypes.cast(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.merge_class_dict(dict_a, obj))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Keys(dict_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del dict_a del obj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _specialized_dir_module(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() dict_a = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Keys(dict_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: name = ctypes.cast(intp._getPtr(g.PyModule_GetName(obj), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.POINTER(ctypes_wrapped.c_byte)) if (ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0): intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s.__dict__ is not a dictionary'), ctypes.POINTER(ctypes_wrapped.c_byte)), name), ctypes.POINTER(g.PyObject)) del name while True: if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del dict_a del obj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _generic_dir(obj): goto = None while True: if (goto is None): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() dict_a = ctypes.POINTER(g.PyObject)() itsclass = ctypes.POINTER(g.PyObject)() helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_Clear() helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 1 continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 4): goto = None if (goto is None): temp = ctypes.cast(intp._getPtr(g.PyDict_Copy(dict_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(temp), ctypes_wrapped.c_void_p).value or 0)) del temp if (goto == 3): goto = None if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue goto = u'error' continue if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.merge_list_attr(dict_a, obj, ctypes.cast(intp._make_string('__members__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue goto = u'error' continue if (goto == 18): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.merge_list_attr(dict_a, obj, ctypes.cast(intp._make_string('__methods__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue goto = u'error' continue if (goto == 19): goto = None if (goto is None): helpers.assignPtr(itsclass, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(itsclass, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue g.PyErr_Clear() goto = 20 continue if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.merge_class_dict(dict_a, itsclass))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue goto = u'error' continue if (goto == 22): goto = None if (goto == 20): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Keys(dict_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'error'): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int(((ctypes.cast(itsclass, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(itsclass, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(itsclass, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(itsclass, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 32 continue continue goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 34 continue continue goto = 33 continue if (goto == 34): goto = None if (goto is None): goto = 24 continue if (goto == 33): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto == 35): goto = None if (goto is None): if (not True): goto = 36 continue if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue pass goto = 37 continue if (goto == 38): goto = None if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 44 continue continue goto = 43 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 46 continue continue goto = 45 continue if (goto == 46): goto = None if (goto is None): goto = 36 continue if (goto == 45): goto = None if (goto is None): goto = 35 continue if (goto == 36): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del dict_a del obj del result del itsclass return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _dir_object(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() dir_str = ctypes.POINTER(g.PyObject)() dirfunc = ctypes.POINTER(g.PyObject)() values.assert_a.value(obj) if ctypes_wrapped.c_int(((ctypes.cast(obj.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(dirfunc, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__dir__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dirfunc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value: g.PyErr_Clear() else: return ctypes_wrapped.c_int(int(0L)).value else: helpers.assignPtr(dirfunc, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_LookupSpecial(obj, ctypes.cast(intp._make_string('__dir__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(dir_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(dirfunc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyModule_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyModule_Type)))).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._specialized_dir_module(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(obj.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._specialized_dir_type(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._generic_dir(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(dirfunc, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dirfunc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dirfunc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dirfunc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__dir__() must return a list, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del dirfunc del dir_str del obj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Dir(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._dir_locals(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._dir_object(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Sort(result))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del obj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def none_repr(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('None'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def none_dealloc(ignore): ignore = ctypes.cast(ignore, ctypes.POINTER(g.PyObject)) g.Py_FatalError(ctypes.cast(intp._make_string('deallocating None'), ctypes.POINTER(ctypes_wrapped.c_byte))) del ignore return PyNone_Type = PyTypeObject() # TODO init PyNone_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('NoneType'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), none_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), none_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), helpers.makeFuncPtr(hashfunc, _Py_HashPointer)) _Py_NoneStruct = PyObject() # TODO init _Py_NoneStruct with PyObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyNone_Type)) @staticmethod def NotImplemented_repr(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('NotImplemented'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyNotImplemented_Type = PyTypeObject() # TODO init PyNotImplemented_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('NotImplementedType'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), none_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), NotImplemented_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) _Py_NotImplementedStruct = PyObject() # TODO init _Py_NotImplementedStruct with PyObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyNotImplemented_Type)) @staticmethod def _Py_ReadyTypes(): if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyType_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize type type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g._PyWeakref_RefType)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize weakref type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g._PyWeakref_CallableProxyType)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize callable weakref proxy type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g._PyWeakref_ProxyType)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize weakref proxy type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyBool_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize bool type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyString_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize str type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyByteArray_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize bytearray type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyList_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize list type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyNone_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize None type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyNotImplemented_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize NotImplemented type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyTraceBack_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize traceback type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PySuper_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize super type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyBaseObject_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize object type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyRange_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize xrange type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyDict_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize dict type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PySet_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize set type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PySlice_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize slice type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyStaticMethod_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize static method type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyComplex_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize complex type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyFloat_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize float type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyBuffer_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize buffer type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyLong_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize long type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyInt_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize int type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyFrozenSet_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize frozenset type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyProperty_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize property type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyMemoryView_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize memoryview type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyTuple_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize tuple type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyEnum_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize enumerate type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyReversed_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize reversed type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyCode_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize code type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyFrame_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize frame type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyCFunction_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize builtin function type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyMethod_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize method type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyFunction_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize function type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyClass_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize class type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyDictProxy_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize dict proxy type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyGen_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize generator type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyGetSetDescr_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize get-set descriptor type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyWrapperDescr_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize wrapper type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyInstance_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize instance type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyEllipsis_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize ellipsis type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyMemberDescr_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize member descriptor type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyFile_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize file type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyCapsule_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize capsule type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyCell_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize cell type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PyCallIter_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize call iter type"), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(ctypes.pointer(g.PySeqIter_Type)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("Can't initialize sequence iterator type"), ctypes.POINTER(ctypes_wrapped.c_byte))) return _Py_capsule_hack = ctypes.POINTER(PyTypeObject)() # TODO init _Py_capsule_hack with ctypes.cast(ctypes.pointer(PyCapsule_Type), ctypes.POINTER(PyTypeObject)) _Py_cobject_hack = ctypes.POINTER(PyTypeObject)() # TODO init _Py_cobject_hack with ctypes.cast(ctypes.pointer(PyCObject_Type), ctypes.POINTER(PyTypeObject)) _Py_abstract_hack = ctypes.CFUNCTYPE(helpers.fixReturnType(Py_ssize_t), ctypes.POINTER(PyObject))() # TODO init _Py_abstract_hack with helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(Py_ssize_t), ctypes.POINTER(PyObject)), PyObject_Size) @staticmethod def PyMem_Malloc(nbytes): nbytes = ctypes_wrapped.c_ulong(int(nbytes.value)) return (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(nbytes.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(nbytes.value)) if nbytes.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0) del nbytes return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMem_Realloc(p, nbytes): p = ctypes.cast(p, ctypes_wrapped.c_void_p) nbytes = ctypes_wrapped.c_ulong(int(nbytes.value)) return (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(nbytes.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.realloc.value(p, (ctypes_wrapped.c_ulong(int(nbytes.value)) if nbytes.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0) del p del nbytes return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMem_Free(p): p = ctypes.cast(p, ctypes_wrapped.c_void_p) values.free.value(p) del p return @staticmethod def Py_ReprEnter(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) dict_a = ctypes.POINTER(g.PyObject)() list_a = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyThreadState_GetDict(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(dict_a, ctypes.cast(intp._make_string('Py_Repr'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, ctypes.cast(intp._make_string('Py_Repr'), ctypes.POINTER(ctypes_wrapped.c_byte)), list_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(i, ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value ctypes_wrapped.c_int(int(g.PyList_Append(list_a, obj))) return ctypes_wrapped.c_int(int(0L)).value del i del dict_a del obj del list_a return ctypes_wrapped.c_int().value @staticmethod def Py_ReprLeave(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) dict_a = ctypes.POINTER(g.PyObject)() list_a = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyThreadState_GetDict(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(dict_a, ctypes.cast(intp._make_string('Py_Repr'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: return helpers.assign(i, ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0))).value: ctypes_wrapped.c_int(int(g.PyList_SetSlice(list_a, i, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))) break del i del dict_a del obj del list_a return _PyTrash_delete_nesting = ctypes_wrapped.c_int() _PyTrash_delete_later = ctypes.POINTER(PyObject)() @staticmethod def _PyTrash_deposit_object(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, op).value)).value))) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) values.assert_a.value(ctypes_wrapped.c_int((op.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_prev, (ctypes.cast(intp._storePtr(ctypes.cast(g._PyTrash_delete_later, ctypes.POINTER(g.PyGC_Head))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyTrash_delete_later, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) del op return @staticmethod def _PyTrash_thread_deposit_object(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, op).value)).value))) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) values.assert_a.value(ctypes_wrapped.c_int((op.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_prev, (ctypes.cast(intp._storePtr(ctypes.cast(tstate.contents.trash_delete_later, ctypes.POINTER(g.PyGC_Head))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tstate.contents.trash_delete_later, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) del tstate del op return @staticmethod def _PyTrash_destroy_chain(): while (ctypes.cast(g._PyTrash_delete_later, ctypes_wrapped.c_void_p).value or 0): op = ctypes.cast(g._PyTrash_delete_later, ctypes.POINTER(g.PyObject)) dealloc = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, g.destructor) helpers.assignPtr(g._PyTrash_delete_later, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_prev, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((op.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(0L)).value))) helpers.prefixInc(g._PyTrash_delete_nesting) helpers.checkedFuncPtrCall(dealloc, op) helpers.prefixDec(g._PyTrash_delete_nesting) del dealloc del op return @staticmethod def _PyTrash_thread_destroy_chain(): tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) while (ctypes.cast(tstate.contents.trash_delete_later, ctypes_wrapped.c_void_p).value or 0): op = ctypes.cast(tstate.contents.trash_delete_later, ctypes.POINTER(g.PyObject)) dealloc = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, g.destructor) helpers.assignPtr(tstate.contents.trash_delete_later, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_prev, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((op.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(0L)).value))) helpers.prefixInc(tstate.contents.trash_delete_nesting) helpers.checkedFuncPtrCall(dealloc, op) helpers.prefixDec(tstate.contents.trash_delete_nesting) del dealloc del op del tstate return method_cache = (structs.method_cache_entry * 1024L)() next_version_tag = ctypes_wrapped.c_uint() @staticmethod def PyType_ClearCache(): first_iteration = None i = g.Py_ssize_t() cur_version_tag = ctypes_wrapped.c_uint(int(ctypes_wrapped.c_uint(int((g.next_version_tag.value - ctypes_wrapped.c_int(int(1L)).value))).value)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.version, ctypes_wrapped.c_int(int(0L)).value) while True: if (ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.value, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(g.next_version_tag, ctypes_wrapped.c_int(int(0L)).value) g.PyType_Modified(ctypes.pointer(g.PyBaseObject_Type)) return cur_version_tag.value del i del cur_version_tag return ctypes_wrapped.c_uint().value @staticmethod def PyType_Modified(type_a): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) raw = ctypes.POINTER(g.PyObject)() ref = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(19L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return helpers.assignPtr(raw, (ctypes.cast(intp._storePtr(type_a.contents.tp_subclasses), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(raw, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes.cast(raw, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(ref, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(raw, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ref, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ref, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: g.PyType_Modified(ctypes.cast(ref, ctypes.POINTER(g.PyTypeObject))) helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(19L)).value))).value))).value) del i del raw del type_a del ref del n return @staticmethod def type_mro_modified(type_a, bases): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) bases = ctypes.cast(bases, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() clear = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(18L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break b = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) cls = ctypes.POINTER(g.PyTypeObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(clear, ctypes_wrapped.c_int(int(1L)).value) break helpers.assignPtr(cls, (ctypes.cast(intp._storePtr(ctypes.cast(b, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((cls.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(18L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(type_a, cls))).value))).value)).value: helpers.assign(clear, ctypes_wrapped.c_int(int(1L)).value) break del b del cls if clear.value: helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(18L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(19L)).value))).value))).value))).value) del i del type_a del bases del clear del n return @staticmethod def assign_version_tag(type_a): first_iteration_a = None first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() bases = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(19L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(18L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(12L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(type_a.contents.tp_version_tag, helpers.postfixInc(g.next_version_tag).value) if ctypes_wrapped.c_int((type_a.contents.tp_version_tag.value == ctypes_wrapped.c_int(int(0L)).value)).value: if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value)).value: pass else: break helpers.assignPtr(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.value, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(helpers.ptrArithmetic(g.method_cache, '+', i.value).contents.name, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) g.PyType_Modified(ctypes.pointer(g.PyBaseObject_Type)) return ctypes_wrapped.c_int(int(1L)).value helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(type_a.contents.tp_bases), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break b = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.assign_version_tag(ctypes.cast(b, ctypes.POINTER(g.PyTypeObject))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value del b helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(19L)).value))).value) return ctypes_wrapped.c_int(int(1L)).value del i del type_a del bases del n return ctypes_wrapped.c_int().value type_members = (PyMemberDef * 8)() # TODO init type_members with (PyMemberDef * 8)(structs.PyMemberDef(ctypes.cast(intp._make_string('__basicsize__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(19L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(32)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__itemsize__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(19L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(40)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__flags__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(168)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__weakrefoffset__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(208)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__base__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(256)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__dictoffset__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(288)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__mro__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(344)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def type_name(type_a, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) s = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value: et = ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject)), ctypes.POINTER(g.PyHeapTypeObject)) helpers.postfixInc(ctypes.cast(et.contents.ht_name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(et.contents.ht_name), ctypes_wrapped.c_void_p).value or 0) del et else: helpers.assignPtr(s, (ctypes.cast(intp._storePtr(values.strrchr.value(type_a.contents.tp_name, ctypes_wrapped.c_int(ctypes.c_byte(46).value))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(s, (ctypes.cast(intp._storePtr(type_a.contents.tp_name), ctypes_wrapped.c_void_p).value or 0)) else: helpers.postfixIncPtr(s) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del s del context return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_set_name(type_a, value, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) et = ctypes.POINTER(g.PyHeapTypeObject)() tmp = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't set %s.__name__"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not (ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't delete %s.__name__"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can only assign string to %s.__name__, not '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((values.strlen.value(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte))).value != ctypes_wrapped.c_ulong(int(ctypes.cast(value, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('__name__ must not contain null bytes'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(et, (ctypes.cast(intp._storePtr(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(et.contents.ht_name), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(et.contents.ht_name, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_name, (ctypes.cast(intp._storePtr(ctypes.cast(value, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del tmp del et del type_a del context del value return ctypes_wrapped.c_int().value @staticmethod def type_module(type_a, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) mod = ctypes.POINTER(g.PyObject)() s = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value: helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(mod), ctypes_wrapped.c_void_p).value or 0) else: helpers.assignPtr(s, (ctypes.cast(intp._storePtr(values.strrchr.value(type_a.contents.tp_name, ctypes_wrapped.c_int(ctypes.c_byte(46).value))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(type_a.contents.tp_name, g.Py_ssize_t(int(ctypes_wrapped.c_long((((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(type_a.contents.tp_name, ctypes_wrapped.c_void_p).value or 0)) / 1)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del s del context del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_set_module(type_a, value, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't set %s.__module__"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not (ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't delete %s.__module__"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value g.PyType_Modified(type_a) return ctypes_wrapped.c_int(int(g.PyDict_SetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte)), value))).value del type_a del context del value return ctypes_wrapped.c_int().value @staticmethod def type_abstractmethods(type_a, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) mod = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyType_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__abstractmethods__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_AttributeError, ctypes.cast(intp._make_string('__abstractmethods__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(mod), ctypes_wrapped.c_void_p).value or 0) del type_a del context del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_set_abstractmethods(type_a, value, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) abstract = ctypes_wrapped.c_int() res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(abstract, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(value))).value) if ctypes_wrapped.c_int((abstract.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(res, ctypes_wrapped.c_int(int(g.PyDict_SetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__abstractmethods__'), ctypes.POINTER(ctypes_wrapped.c_byte)), value))).value) else: helpers.assign(abstract, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(res, ctypes_wrapped.c_int(int(g.PyDict_DelItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__abstractmethods__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value) if ctypes_wrapped.c_int((res.value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_KeyError))).value)).value: g.PyErr_SetString(g.PyExc_AttributeError, ctypes.cast(intp._make_string('__abstractmethods__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyType_Modified(type_a) if abstract.value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(20L)).value))).value) else: helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(20L)).value))).value))).value) return res.value del abstract del res del type_a del context del value return ctypes_wrapped.c_int().value @staticmethod def type_get_bases(type_a, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) helpers.postfixInc(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(type_a.contents.tp_bases), ctypes_wrapped.c_void_p).value or 0) del type_a del context return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) update_callback = ctypes.CFUNCTYPE(ctypes_wrapped.c_int, ctypes.POINTER(PyTypeObject), ctypes_wrapped.c_void_p) @staticmethod def mro_subclasses(type_a, temp): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) temp = ctypes.cast(temp, ctypes.POINTER(g.PyObject)) subclass = ctypes.POINTER(g.PyTypeObject)() ref = ctypes.POINTER(g.PyObject)() subclasses = ctypes.POINTER(g.PyObject)() old_mro = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assignPtr(subclasses, (ctypes.cast(intp._storePtr(type_a.contents.tp_subclasses), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(subclasses, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subclasses, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(subclasses, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(ref, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(subclasses, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_RefType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g._PyWeakref_RefType)))).value))) helpers.assignPtr(subclass, (ctypes.cast(intp._storePtr(ctypes.cast((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(subclass, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(subclass, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: continue values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subclass, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(old_mro, (ctypes.cast(intp._storePtr(subclass.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.mro_internal(subclass))).value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(subclass.contents.tp_mro, (ctypes.cast(intp._storePtr(old_mro), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: tuple_a = ctypes.POINTER(g.PyObject)() helpers.assignPtr(tuple_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), subclass, old_mro), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((not (ctypes.cast(tuple_a, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Append(temp, tuple_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tuple_a if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.mro_subclasses(subclass, temp))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value del type_a del temp del i del ref del subclass del n del old_mro del subclasses return ctypes_wrapped.c_int().value @staticmethod def type_set_bases(type_a, value, context): goto = None while True: if (goto is None): first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) i = g.Py_ssize_t() r = ctypes_wrapped.c_int() ob = ctypes.POINTER(g.PyObject)() temp = ctypes.POINTER(g.PyObject)() new_base = ctypes.POINTER(g.PyTypeObject)() old_base = ctypes.POINTER(g.PyTypeObject)() old_bases = ctypes.POINTER(g.PyObject)() old_mro = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value): goto = 1 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't set %s.__bases__"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not (ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0))).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't delete %s.__bases__"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 3 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('can only assign tuple to %s.__bases__, not %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes.cast(value, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('can only assign non-empty tuple to %s.__bases__, not ()'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not first_iteration): goto = 9 continue first_iteration = False goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < ctypes.cast(value, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): helpers.assignPtr(ob, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(value, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ob.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 12 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%s.__bases__ must be tuple of old- or new-style classes, not '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue if (not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(ob, ctypes.POINTER(g.PyTypeObject)), type_a))).value): goto = 14 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('a __bases__ item causes an inheritance cycle'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 14): goto = None if (goto == 13): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto == 5): goto = None if (goto is None): helpers.assignPtr(new_base, (ctypes.cast(intp._storePtr(intp._getPtr(g.best_base(value), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(new_base, ctypes_wrapped.c_void_p).value or 0))).value): goto = 15 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.compatible_for_assignment(type_a.contents.tp_base, new_base, ctypes.cast(intp._make_string('__bases__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value): goto = 16 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 16): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(new_base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(old_bases, (ctypes.cast(intp._storePtr(type_a.contents.tp_bases), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(old_base, (ctypes.cast(intp._storePtr(type_a.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(old_mro, (ctypes.cast(intp._storePtr(type_a.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_bases, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_base, (ctypes.cast(intp._storePtr(new_base), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.mro_internal(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue goto = u'bail' continue if (goto == 17): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0))).value): goto = 18 continue goto = u'bail' continue if (goto == 18): goto = None if (goto is None): helpers.assign(r, ctypes_wrapped.c_int(int(g.mro_subclasses(type_a, temp))).value) if (not ctypes_wrapped.c_int((r.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue if (not True): goto = 20 continue first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 21): goto = None if (goto is None): if (not True): goto = 22 continue if (not first_iteration_a): goto = 24 continue first_iteration_a = False goto = 23 continue if (goto == 24): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < g.Py_ssize_t(int(g.PyList_Size(temp))).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 25): goto = None if (goto is None): cls = ctypes.POINTER(g.PyTypeObject)() mro = ctypes.POINTER(g.PyObject)() ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(helpers.ptrArithmetic(ctypes.cast(temp, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(cls), ctypes.pointer(mro)))) helpers.postfixInc(ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(ob, (ctypes.cast(intp._storePtr(cls.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(cls.contents.tp_mro, (ctypes.cast(intp._storePtr(mro), ctypes_wrapped.c_void_p).value or 0)) if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ob, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ob, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 32 continue continue goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto is None): del mro del cls goto = 21 continue if (goto == 22): goto = None if (goto == 20): goto = None if (goto == 33): goto = None if (goto is None): if (not True): goto = 34 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 36 continue pass goto = 35 continue if (goto == 36): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 35): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 38 continue continue goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = 34 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto is None): goto = u'bail' continue if (goto == 19): goto = None if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 44 continue continue goto = 43 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto is None): if (not True): goto = 45 continue first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_ulong(int((ctypes.cast(old_bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 46): goto = None if (goto is None): if (not True): goto = 47 continue if (not first_iteration_b): goto = 49 continue first_iteration_b = False goto = 48 continue if (goto == 49): goto = None if (goto is None): helpers.postfixDec(i) if (goto == 48): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue pass goto = 50 continue if (goto == 51): goto = None if (goto is None): goto = 47 continue if (goto == 50): goto = None if (goto is None): helpers.assignPtr(ob, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(old_bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 52 continue g.remove_subclass(ctypes.cast(ob, ctypes.POINTER(g.PyTypeObject)), type_a) if (goto == 52): goto = None if (goto is None): goto = 46 continue if (goto == 47): goto = None if (goto == 45): goto = None if (goto is None): if (not True): goto = 53 continue first_iteration_c = True helpers.assign(i, ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 54): goto = None if (goto is None): if (not True): goto = 55 continue if (not first_iteration_c): goto = 57 continue first_iteration_c = False goto = 56 continue if (goto == 57): goto = None if (goto is None): helpers.postfixDec(i) if (goto == 56): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 59 continue pass goto = 58 continue if (goto == 59): goto = None if (goto is None): goto = 55 continue if (goto == 58): goto = None if (goto is None): helpers.assignPtr(ob, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(value, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 60 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_subclass(ctypes.cast(ob, ctypes.POINTER(g.PyTypeObject)), type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 61 continue helpers.assign(r, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 61): goto = None if (goto == 60): goto = None if (goto is None): goto = 54 continue if (goto == 55): goto = None if (goto == 53): goto = None if (goto is None): g.update_all_slots(type_a) if (goto == 62): goto = None if (goto is None): if (not True): goto = 63 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 65 continue pass goto = 64 continue if (goto == 65): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 64): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 67 continue continue goto = 66 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 66): goto = None if (goto is None): goto = 62 continue if (goto == 63): goto = None if (goto == 68): goto = None if (goto is None): if (not True): goto = 69 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 71 continue pass goto = 70 continue if (goto == 71): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 70): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 73 continue continue goto = 72 continue if (goto == 73): goto = None if (goto is None): goto = 69 continue if (goto == 72): goto = None if (goto is None): goto = 68 continue if (goto == 69): goto = None if (goto == 74): goto = None if (goto is None): if (not True): goto = 75 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 77 continue pass goto = 76 continue if (goto == 77): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 76): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 79 continue continue goto = 78 continue if (goto == 79): goto = None if (goto is None): goto = 75 continue if (goto == 78): goto = None if (goto is None): goto = 74 continue if (goto == 75): goto = None if (goto is None): return r.value if (goto == u'bail'): goto = None if (goto == 80): goto = None if (goto is None): if (not True): goto = 81 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 83 continue pass goto = 82 continue if (goto == 83): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 82): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 85 continue continue goto = 84 continue if (goto == 85): goto = None if (goto is None): goto = 81 continue if (goto == 84): goto = None if (goto is None): goto = 80 continue if (goto == 81): goto = None if (goto == 86): goto = None if (goto is None): if (not True): goto = 87 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 89 continue pass goto = 88 continue if (goto == 89): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 88): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 91 continue continue goto = 90 continue if (goto == 91): goto = None if (goto is None): goto = 87 continue if (goto == 90): goto = None if (goto is None): goto = 86 continue if (goto == 87): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_mro, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(old_mro, ctypes_wrapped.c_void_p).value or 0))).value): goto = 92 continue if (goto == 93): goto = None if (goto is None): if (not True): goto = 94 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 96 continue pass goto = 95 continue if (goto == 96): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 95): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 98 continue continue goto = 97 continue if (goto == 98): goto = None if (goto is None): goto = 94 continue if (goto == 97): goto = None if (goto is None): goto = 93 continue if (goto == 94): goto = None if (goto == 92): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_bases, (ctypes.cast(intp._storePtr(old_bases), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_base, (ctypes.cast(intp._storePtr(old_base), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_mro, (ctypes.cast(intp._storePtr(old_mro), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del type_a del temp del i del old_base del ob del value del r del context del old_mro del new_base del old_bases return ctypes_wrapped.c_int().value break @staticmethod def type_dict(type_a, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDictProxy_New(type_a.contents.tp_dict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del context return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_get_doc(type_a, context): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_doc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(type_a.contents.tp_doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) elif (ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, result, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), ctypes.cast(type_a, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del type_a del result del context return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type___instancecheck__(type_a, inst): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) inst = ctypes.cast(inst, ctypes.POINTER(g.PyObject)) if True: _switchvalue = None _switchvalue = ctypes_wrapped.c_int(int(g._PyObject_RealIsInstance(inst, type_a))).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)): _switchfallthrough = True return ctypes_wrapped.c_int(int(0L)).value if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) if (not _switchfallthrough): return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) break del _switchfallthrough del _switchvalue del type_a del inst return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type___subclasscheck__(type_a, inst): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) inst = ctypes.cast(inst, ctypes.POINTER(g.PyObject)) if True: _switchvalue = None _switchvalue = ctypes_wrapped.c_int(int(g._PyObject_RealIsSubclass(inst, type_a))).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)): _switchfallthrough = True return ctypes_wrapped.c_int(int(0L)).value if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) if (not _switchfallthrough): return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) break del _switchfallthrough del _switchvalue del type_a del inst return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) type_getsets = (PyGetSetDef * 7)() # TODO init type_getsets with (PyGetSetDef * 7)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__name__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, type_name), helpers.makeFuncPtr(setter, type_set_name), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__bases__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, type_get_bases), helpers.makeFuncPtr(setter, type_set_bases), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, type_module), helpers.makeFuncPtr(setter, type_set_module), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__abstractmethods__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, type_abstractmethods), helpers.makeFuncPtr(setter, type_set_abstractmethods), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, type_dict), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, type_get_doc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def type_richcompare(v, w, op): goto = None while True: if (goto is None): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) result = ctypes.POINTER(g.PyObject)() vv = g.Py_uintptr_t() ww = g.Py_uintptr_t() c = ctypes_wrapped.c_int() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or (ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0))).value)).value or (ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) goto = u'out' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((g.Py_Py3kWarningFlag.value and ctypes_wrapped.c_int((op.value != ctypes_wrapped.c_int(int(2L)).value)).value)).value and ctypes_wrapped.c_int((op.value != ctypes_wrapped.c_int(int(3L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('type inequality comparisons not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assign(vv, g.Py_uintptr_t(int((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0))).value) helpers.assign(ww, g.Py_uintptr_t(int((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0))).value) if (not True): goto = 3 continue _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value))): goto = 6 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((vv.value < ww.value)).value) goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value))): goto = 7 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((vv.value <= ww.value)).value) goto = 5 continue if (goto == 7): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value))): goto = 8 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((vv.value == ww.value)).value) goto = 5 continue if (goto == 8): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value))): goto = 9 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((vv.value != ww.value)).value) goto = 5 continue if (goto == 9): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value))): goto = 10 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((vv.value > ww.value)).value) goto = 5 continue if (goto == 10): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value))): goto = 11 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((vv.value >= ww.value)).value) goto = 5 continue if (goto == 11): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 12 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) goto = u'out' continue if (goto == 12): goto = None if (goto is None): goto = 5 continue goto = 4 continue if (goto == 5): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if c.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'out'): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del c del w del ww del result del vv del v del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def type_repr(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) mod = ctypes.POINTER(g.PyObject)() name = ctypes.POINTER(g.PyObject)() rtn = ctypes.POINTER(g.PyObject)() kind = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.type_module(type_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(mod, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(name, (ctypes.cast(intp._storePtr(intp._getPtr(g.type_name(type_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value: helpers.assignPtr(kind, (ctypes.cast(intp._storePtr(intp._make_string('class')), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(kind, (ctypes.cast(intp._storePtr(intp._make_string('type')), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and values.strcmp.value(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value)).value: helpers.assignPtr(rtn, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string("<%s '%s.%s'>"), ctypes.POINTER(ctypes_wrapped.c_byte)), kind, ctypes.cast(mod, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(rtn, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string("<%s '%s'>"), ctypes.POINTER(ctypes_wrapped.c_byte)), kind, type_a.contents.tp_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(rtn), ctypes_wrapped.c_void_p).value or 0) del type_a del rtn del name del kind del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_call(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) obj = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("cannot create '%.100s' instances"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_new, type_a, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyType_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwds, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kwds))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: return (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(obj.contents.ob_type, type_a))).value))).value: return (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(obj.contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(type_a.contents.tp_init, obj, args, kwds).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(obj, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0) del type_a del args del obj del kwds return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyType_GenericAlloc(type_a, nitems): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) nitems = g.Py_ssize_t(int(nitems.value)) obj = ctypes.POINTER(g.PyObject)() size = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_basicsize.value + ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((nitems.value + ctypes_wrapped.c_int(int(1L)).value))).value * type_a.contents.tp_itemsize.value))).value))).value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_GC_Malloc(size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(size.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(size.value)) if size.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) values.memset.value(ctypes.cast(obj, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes.c_byte(0).value), size) if ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value: helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((type_a.contents.tp_itemsize.value == ctypes_wrapped.c_int(int(0L)).value)).value: ((helpers.assignPtr(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], obj)[1] else: ((helpers.assign(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size, nitems.value), ((helpers.assignPtr(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)), ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)))[1])[1], None)[1] if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0) del obj del type_a del nitems del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyType_GenericNew(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_alloc, type_a, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del args del kwds return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def traverse_slots(type_a, self, visit, arg): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) i = g.Py_ssize_t() n = g.Py_ssize_t() mp = ctypes.POINTER(g.PyMemberDef)() helpers.assign(n, ctypes.cast(type_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject)), ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_basicsize.value), ctypes.POINTER(g.PyMemberDef))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: (helpers.postfixInc(i), helpers.postfixIncPtr(mp))[1] if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int((mp.contents.type.value == ctypes_wrapped.c_int(int(16L)).value)).value: addr = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', mp.contents.offset.value), ctypes.POINTER(ctypes_wrapped.c_byte)) obj = ctypes.cast(ctypes.cast(addr, ctypes.POINTER(ctypes.POINTER(g.PyObject))).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: err = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, obj, arg).value)) if err.value: return err.value del err del obj del addr return ctypes_wrapped.c_int(int(0L)).value del type_a del i del self del visit del n del mp del arg return ctypes_wrapped.c_int().value @staticmethod def subtype_traverse(self, visit, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) type_a = ctypes.POINTER(g.PyTypeObject)() base = ctypes.POINTER(g.PyTypeObject)() basetraverse = g.traverseproc() helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(basetraverse, (ctypes.cast(base.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), g.visitproc, ctypes_wrapped.c_void_p), g.subtype_traverse), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes.cast(base, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value: err = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.traverse_slots(base, self, visit, arg))).value)) if err.value: return err.value del err helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(base) if ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value != base.contents.tp_dictoffset.value)).value: dictptr = ctypes.cast(intp._getPtr(g._PyObject_GetDictPtr(self), ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(((ctypes.cast(dictptr, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(dictptr.contents, ctypes_wrapped.c_void_p).value or 0))).value: while True: if (ctypes.cast(dictptr.contents, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(dictptr.contents, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break del dictptr if ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value: while True: if (ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break if (ctypes.cast(basetraverse, ctypes_wrapped.c_void_p).value or 0): return helpers.checkedFuncPtrCall(basetraverse, self, visit, arg).value return ctypes_wrapped.c_int(int(0L)).value del type_a del self del visit del base del basetraverse del arg return ctypes_wrapped.c_int().value @staticmethod def clear_slots(type_a, self): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() mp = ctypes.POINTER(g.PyMemberDef)() helpers.assign(n, ctypes.cast(type_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject)), ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_basicsize.value), ctypes.POINTER(g.PyMemberDef))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: (helpers.postfixInc(i), helpers.postfixIncPtr(mp))[1] if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((mp.contents.type.value == ctypes_wrapped.c_int(int(16L)).value)).value and ctypes_wrapped.c_uint(int((not ctypes_wrapped.c_uint(int((mp.contents.flags.value & ctypes_wrapped.c_int(int(1L)).value))).value))).value)).value: addr = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', mp.contents.offset.value), ctypes.POINTER(ctypes_wrapped.c_byte)) obj = ctypes.cast(ctypes.cast(addr, ctypes.POINTER(ctypes.POINTER(g.PyObject))).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(ctypes.cast(addr, ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_int(int(0L)).value).contents while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del obj del addr del i del type_a del mp del self del n return @staticmethod def subtype_clear(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) type_a = ctypes.POINTER(g.PyTypeObject)() base = ctypes.POINTER(g.PyTypeObject)() baseclear = g.inquiry() helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(baseclear, (ctypes.cast(base.contents.tp_clear, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject)), g.subtype_clear), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes.cast(base, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value: g.clear_slots(base, self) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(base) if ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value != base.contents.tp_dictoffset.value)).value: dictptr = ctypes.cast(intp._getPtr(g._PyObject_GetDictPtr(self), ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(((ctypes.cast(dictptr, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(dictptr.contents, ctypes_wrapped.c_void_p).value or 0))).value: while True: if (ctypes.cast(dictptr.contents, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(dictptr.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(dictptr.contents, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break del dictptr if (ctypes.cast(baseclear, ctypes_wrapped.c_void_p).value or 0): return helpers.checkedFuncPtrCall(baseclear, self).value return ctypes_wrapped.c_int(int(0L)).value del self del base del type_a del baseclear return ctypes_wrapped.c_int().value @staticmethod def subtype_dealloc(self): goto = None while True: if (goto is None): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) type_a = ctypes.POINTER(g.PyTypeObject)() base = ctypes.POINTER(g.PyTypeObject)() basedealloc = g.destructor() tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value)))) if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue if (not (ctypes.cast(type_a.contents.tp_del, ctypes_wrapped.c_void_p).value or 0)): goto = 2 continue helpers.checkedFuncPtrCall(type_a.contents.tp_del, self) if (not ctypes_wrapped.c_int((self.contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue return if (goto == 3): goto = None if (goto == 2): goto = None if (goto is None): helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(basedealloc, (ctypes.cast(base.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(g.PyObject)), g.subtype_dealloc), ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue values.assert_a.value(ctypes_wrapped.c_int((ctypes.cast(base, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(base) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(basedealloc) helpers.checkedFuncPtrCall(basedealloc, self) if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 11 continue continue goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): return if (goto == 1): goto = None if (goto is None): g.PyObject_GC_UnTrack(ctypes.cast(self, ctypes_wrapped.c_void_p)) helpers.prefixInc(g._PyTrash_delete_nesting) helpers.prefixInc(tstate.contents.trash_delete_nesting) if (goto == 12): goto = None if (goto is None): if (not True): goto = 13 continue _tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value < ctypes_wrapped.c_int(int(50L)).value)).value)).value): goto = 15 continue if (not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0)): goto = 16 continue helpers.prefixInc(_tstate.contents.trash_delete_nesting) if (goto == 16): goto = None if (goto is None): helpers.prefixDec(g._PyTrash_delete_nesting) helpers.prefixDec(tstate.contents.trash_delete_nesting) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(basedealloc, (ctypes.cast(base.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(g.PyObject)), g.subtype_dealloc), ctypes_wrapped.c_void_p).value or 0))).value): goto = 18 continue helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(base) goto = 17 continue if (goto == 18): goto = None if (goto is None): if (not ctypes_wrapped.c_int((type_a.contents.tp_weaklistoffset.value and g.Py_ssize_t(int((not base.contents.tp_weaklistoffset.value))).value)).value): goto = 19 continue g.PyObject_ClearWeakRefs(self) if (goto == 19): goto = None if (goto is None): if (not (ctypes.cast(type_a.contents.tp_del, ctypes_wrapped.c_void_p).value or 0)): goto = 20 continue if (goto == 21): goto = None if (goto is None): if (not True): goto = 22 continue g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if (not ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value): goto = 23 continue g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == 23): goto = None if (goto is None): helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 22 continue if (goto == 24): goto = None if (goto is None): goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.checkedFuncPtrCall(type_a.contents.tp_del, self) if (not ctypes_wrapped.c_int((self.contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue goto = u'endlabel' continue goto = 26 continue if (goto == 27): goto = None if (goto == 28): goto = None if (goto is None): if (not True): goto = 29 continue g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if (not ctypes_wrapped.c_int(int(0L)).value): goto = 31 continue continue goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 28 continue if (goto == 29): goto = None if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int((type_a.contents.tp_weaklistoffset.value and g.Py_ssize_t(int((not base.contents.tp_weaklistoffset.value))).value)).value): goto = 32 continue list_a = ctypes.cast(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value), ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes.POINTER(g.PyWeakReference))), ctypes.POINTER(ctypes.POINTER(g.PyWeakReference))) if (goto == 33): goto = None if (goto is None): if (not (ctypes.cast(list_a.contents, ctypes_wrapped.c_void_p).value or 0)): goto = 34 continue g._PyWeakref_ClearRef(list_a.contents) goto = 33 continue if (goto == 34): goto = None if (goto is None): del list_a if (goto == 32): goto = None if (goto == 20): goto = None if (goto is None): helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 35): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(g.PyObject)), g.subtype_dealloc), ctypes_wrapped.c_void_p).value or 0))).value): goto = 36 continue if (not ctypes.cast(base, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value): goto = 37 continue g.clear_slots(base, self) if (goto == 37): goto = None if (goto is None): helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(base) goto = 35 continue if (goto == 36): goto = None if (goto is None): if (not ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value and g.Py_ssize_t(int((not base.contents.tp_dictoffset.value))).value)).value): goto = 38 continue dictptr = ctypes.cast(intp._getPtr(g._PyObject_GetDictPtr(self), ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes.POINTER(g.PyObject))) if (not ctypes_wrapped.c_int(((ctypes.cast(dictptr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue dict_a = ctypes.cast(dictptr.contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 40 continue if (goto == 41): goto = None if (goto is None): if (not True): goto = 42 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue pass goto = 43 continue if (goto == 44): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 46 continue continue goto = 45 continue if (goto == 46): goto = None if (goto is None): goto = 42 continue if (goto == 45): goto = None if (goto is None): goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.assignPtr(dictptr.contents, ctypes_wrapped.c_int(int(0L)).value) if (goto == 40): goto = None if (goto is None): del dict_a if (goto == 39): goto = None if (goto is None): del dictptr if (goto == 38): goto = None if (goto is None): helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue if (goto == 48): goto = None if (goto is None): if (not True): goto = 49 continue g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if (not ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value): goto = 50 continue g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == 50): goto = None if (goto is None): helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if (not ctypes_wrapped.c_int(int(0L)).value): goto = 52 continue continue goto = 51 continue if (goto == 52): goto = None if (goto is None): goto = 49 continue if (goto == 51): goto = None if (goto is None): goto = 48 continue if (goto == 49): goto = None if (goto == 47): goto = None if (goto is None): values.assert_a.value(basedealloc) helpers.checkedFuncPtrCall(basedealloc, self) if (goto == 53): goto = None if (goto is None): if (not True): goto = 54 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue pass goto = 55 continue if (goto == 56): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 55): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 58 continue continue goto = 57 continue if (goto == 58): goto = None if (goto is None): goto = 54 continue if (goto == 57): goto = None if (goto is None): goto = 53 continue if (goto == 54): goto = None if (goto == u'endlabel'): goto = None if (goto is None): helpers.prefixInc(g._PyTrash_delete_nesting) helpers.prefixInc(tstate.contents.trash_delete_nesting) if (not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0)): goto = 59 continue helpers.prefixDec(_tstate.contents.trash_delete_nesting) if (not ctypes_wrapped.c_int(((ctypes.cast(_tstate.contents.trash_delete_later, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value <= ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 60 continue g._PyTrash_thread_destroy_chain() if (goto == 60): goto = None if (goto == 59): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto is None): g._PyTrash_thread_deposit_object(ctypes.cast(self, ctypes.POINTER(g.PyObject))) if (goto == 14): goto = None if (goto is None): del _tstate if (not ctypes_wrapped.c_int(int(0L)).value): goto = 62 continue continue goto = 61 continue if (goto == 62): goto = None if (goto is None): goto = 13 continue if (goto == 61): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.prefixDec(g._PyTrash_delete_nesting) helpers.prefixDec(tstate.contents.trash_delete_nesting) del self del base del basedealloc del type_a del tstate return break @staticmethod def PyType_IsSubtype(a, b): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyTypeObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyTypeObject)) mro = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value))).value: return ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyBaseObject_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value helpers.assignPtr(mro, (ctypes.cast(intp._storePtr(a.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mro, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: i = g.Py_ssize_t() n = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(mro, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(mro, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del i del n else: while True: if ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value helpers.assignPtr(a, (ctypes.cast(intp._storePtr(a.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: continue else: break return ctypes_wrapped.c_int(((ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyBaseObject_Type), ctypes_wrapped.c_void_p).value or 0))).value del a del b del mro return ctypes_wrapped.c_int().value @staticmethod def lookup_maybe(self, attrstr, attrobj): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) attrstr = ctypes.cast(attrstr, ctypes.POINTER(ctypes_wrapped.c_byte)) attrobj = ctypes.cast(attrobj, ctypes.POINTER(ctypes.POINTER(g.PyObject))) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(attrobj.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(attrobj.contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(attrstr), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(attrobj.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, attrobj.contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: f = g.descrgetfunc() if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(f, (ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, res, self, ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del f return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del attrstr del self del res del attrobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def lookup_method(self, attrstr, attrobj): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) attrstr = ctypes.cast(attrstr, ctypes.POINTER(ctypes_wrapped.c_byte)) attrobj = ctypes.cast(attrobj, ctypes.POINTER(ctypes.POINTER(g.PyObject))) res = ctypes.cast(intp._getPtr(g.lookup_maybe(self, attrstr, attrobj), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetObject(g.PyExc_AttributeError, attrobj.contents) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del attrstr del self del res del attrobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_LookupSpecial(self, attrstr, attrobj): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) attrstr = ctypes.cast(attrstr, ctypes.POINTER(ctypes_wrapped.c_byte)) attrobj = ctypes.cast(attrobj, ctypes.POINTER(ctypes.POINTER(g.PyObject))) values.assert_a.value(ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(self.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value))) return (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(self, attrstr, attrobj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del attrstr del self del attrobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def call_method(o, name, nameobj, format_a, *varargs): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) nameobj = ctypes.cast(nameobj, ctypes.POINTER(ctypes.POINTER(g.PyObject))) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() retval = ctypes.POINTER(g.PyObject)() values.va_start.value(va, format_a) helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(o, name, nameobj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.va_end.value(va) if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetObject(g.PyExc_AttributeError, nameobj.contents) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) and format_a.contents.value)).value: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_VaBuildValue(format_a, va), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del va del name del args del o del func del retval del format_a del nameobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def call_maybe(o, name, nameobj, format_a, *varargs): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) nameobj = ctypes.cast(nameobj, ctypes.POINTER(ctypes.POINTER(g.PyObject))) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() retval = ctypes.POINTER(g.PyObject)() values.va_start.value(va, format_a) helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(o, name, nameobj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.va_end.value(va) if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) and format_a.contents.value)).value: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_VaBuildValue(format_a, va), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del va del name del args del o del func del retval del format_a del nameobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def fill_classic_mro(mro, cls): first_iteration = None mro = ctypes.cast(mro, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) bases = ctypes.POINTER(g.PyObject)() base = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(i, ctypes_wrapped.c_int(int(g.PySequence_Contains(mro, cls))).value) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if g.Py_ssize_t(int((not i.value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Append(mro, cls))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(ctypes.cast(cls, ctypes.POINTER(g.PyClassObject)).contents.cl_bases), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(base, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.fill_classic_mro(mro, base))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value del i del n del bases del base del cls del mro return ctypes_wrapped.c_int().value @staticmethod def classic_mro(cls): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) mro = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0)))) helpers.assignPtr(mro, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mro, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.fill_classic_mro(mro, cls))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(mro), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del mro del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tail_contains(list_a, whence, o): first_iteration = None list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyObject)) whence = ctypes_wrapped.c_int(int(whence.value)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) j = g.Py_ssize_t() size = g.Py_ssize_t() helpers.assign(size, ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(j, ctypes_wrapped.c_uint(int((whence.value + ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(j) if ctypes_wrapped.c_int((j.value < size.value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del list_a del j del whence del o del size return ctypes_wrapped.c_int().value @staticmethod def class_name(cls): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) name = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(cls, ctypes.cast(intp._make_string('__name__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() while True: if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(cls), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(name), ctypes_wrapped.c_void_p).value or 0) del name del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def check_duplicates(list_a): first_iteration_a = None first_iteration = None list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() j = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assign(n, ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break o = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if True: first_iteration_a = True helpers.assign(j, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(j) if ctypes_wrapped.c_int((j.value < n.value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(o, (ctypes.cast(intp._storePtr(intp._getPtr(g.class_name(o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('duplicate base class %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) if (ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(intp._make_string('?'), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del o return ctypes_wrapped.c_int(int(0L)).value del i del list_a del j del n return ctypes_wrapped.c_int().value @staticmethod def set_mro_error(to_merge, remain): first_iteration = None to_merge = ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)) remain = ctypes.cast(remain, ctypes.POINTER(ctypes_wrapped.c_int)) i = g.Py_ssize_t() n = g.Py_ssize_t() off = g.Py_ssize_t() to_merge_size = g.Py_ssize_t() buf = (ctypes_wrapped.c_byte * 1000L)() k = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() set_a = ctypes.cast(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(set_a, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.assign(to_merge_size, ctypes.cast(to_merge, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < to_merge_size.value)).value: pass else: break L = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(to_merge, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((helpers.ptrArithmetic(remain, '+', i.value).contents.value < ctypes.cast(L, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: c = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(L, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', helpers.ptrArithmetic(remain, '+', i.value).contents.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItem(set_a, c, ctypes.pointer(g._Py_NoneStruct)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return del c del L helpers.assign(n, g.Py_ssize_t(int(g.PyDict_Size(set_a))).value) helpers.assign(off, ctypes_wrapped.c_int(int(g.PyOS_snprintf(ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_size_t(ctypes.sizeof(buf)), ctypes.cast(intp._make_string('Cannot create a consistent method resolution\norder (MRO) for bases'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value) helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_Next(set_a, ctypes.pointer(i), ctypes.pointer(k), ctypes.pointer(v)))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(off.value)).value < ctypes_wrapped.c_size_t(ctypes.sizeof(buf)).value)).value)).value: name = ctypes.cast(intp._getPtr(g.class_name(k), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.augAssign(off, u'+=', ctypes_wrapped.c_int(int(g.PyOS_snprintf(helpers.ptrArithmetic(buf, u'+', off.value), ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(ctypes.sizeof(buf)).value - off.value))), ctypes.cast(intp._make_string(' %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) if (ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(intp._make_string('?'), ctypes.POINTER(ctypes_wrapped.c_byte)))))).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((helpers.prefixDec(n).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((off.value + ctypes_wrapped.c_int(int(1L)).value))).value)).value < ctypes_wrapped.c_size_t(ctypes.sizeof(buf)).value)).value)).value: helpers.assign(helpers.ptrArithmetic(buf, '+', helpers.postfixInc(off).value).contents, ctypes.c_byte(44).value) helpers.assign(helpers.ptrArithmetic(buf, '+', off.value).contents, ctypes.c_byte(0).value) del name g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del off del i del k del to_merge_size del remain del to_merge del v del set_a del n del buf return @staticmethod def pmerge(acc, to_merge): goto = None while True: if (goto is None): first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None acc = ctypes.cast(acc, ctypes.POINTER(g.PyObject)) to_merge = ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() j = g.Py_ssize_t() to_merge_size = g.Py_ssize_t() empty_cnt = g.Py_ssize_t() remain = ctypes.POINTER(ctypes_wrapped.c_int)() ok = ctypes_wrapped.c_int() helpers.assign(to_merge_size, ctypes.cast(to_merge, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(remain, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(4L)).value * to_merge_size.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(4L)).value * to_merge_size.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(4L)).value * to_merge_size.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes_wrapped.c_int))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(remain, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 6 continue first_iteration = False goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < to_merge_size.value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): helpers.assign(helpers.ptrArithmetic(remain, '+', i.value).contents, ctypes_wrapped.c_int(int(0L)).value) goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto == u'again'): goto = None if (goto is None): helpers.assign(empty_cnt, ctypes_wrapped.c_int(int(0L)).value) if (not True): goto = 9 continue first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not first_iteration_a): goto = 13 continue first_iteration_a = False goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < to_merge_size.value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): candidate = ctypes.POINTER(g.PyObject)() cur_list = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(to_merge, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int((helpers.ptrArithmetic(remain, '+', i.value).contents.value >= ctypes.cast(cur_list, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 16 continue helpers.postfixInc(empty_cnt) continue if (goto == 16): goto = None if (goto is None): helpers.assignPtr(candidate, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(cur_list, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', helpers.ptrArithmetic(remain, '+', i.value).contents.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 17 continue first_iteration_b = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not first_iteration_b): goto = 21 continue first_iteration_b = False goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < to_merge_size.value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 22): goto = None if (goto is None): j_lst = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(to_merge, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(int(g.tail_contains(j_lst, helpers.ptrArithmetic(remain, '+', j.value).contents, candidate))).value): goto = 24 continue goto = u'skip' continue if (goto == 24): goto = None if (goto is None): del j_lst goto = 18 continue if (goto == 19): goto = None if (goto == 17): goto = None if (goto is None): helpers.assign(ok, ctypes_wrapped.c_int(int(g.PyList_Append(acc, candidate))).value) if (not ctypes_wrapped.c_int((ok.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue g.PyMem_Free(ctypes.cast(remain, ctypes_wrapped.c_void_p)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 25): goto = None if (goto is None): if (not True): goto = 26 continue first_iteration_c = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not first_iteration_c): goto = 30 continue first_iteration_c = False goto = 29 continue if (goto == 30): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < to_merge_size.value)).value): goto = 32 continue pass goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 31): goto = None if (goto is None): j_lst = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(to_merge, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(remain, '+', j.value).contents.value < ctypes.cast(j_lst, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(j_lst, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', helpers.ptrArithmetic(remain, '+', j.value).contents.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(candidate, ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 33 continue helpers.postfixInc(helpers.ptrArithmetic(remain, '+', j.value).contents) if (goto == 33): goto = None if (goto is None): del j_lst goto = 27 continue if (goto == 28): goto = None if (goto == 26): goto = None if (goto is None): goto = u'again' continue if (goto == u'skip'): goto = None if (goto is None): del cur_list del candidate goto = 10 continue if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int((empty_cnt.value == to_merge_size.value)).value): goto = 34 continue values.free.value(remain) return ctypes_wrapped.c_int(int(0L)).value if (goto == 34): goto = None if (goto is None): g.set_mro_error(to_merge, remain) values.free.value(remain) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del acc del empty_cnt del ok del i del j del to_merge_size del remain del to_merge return ctypes_wrapped.c_int().value break @staticmethod def mro_implementation(type_a): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() ok = ctypes_wrapped.c_int() bases = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() to_merge = ctypes.POINTER(g.PyObject)() bases_aslist = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(type_a.contents.tp_bases), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(to_merge, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(to_merge, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break base = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) parentMRO = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(base, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(parentMRO, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_List(ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)).contents.tp_mro), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(parentMRO, (ctypes.cast(intp._storePtr(intp._getPtr(g.classic_mro(base), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(parentMRO, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(to_merge, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(parentMRO), ctypes_wrapped.c_void_p).value or 0)) del parentMRO del base helpers.assignPtr(bases_aslist, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_List(bases), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(bases_aslist, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.check_duplicates(bases_aslist))).value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases_aslist, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases_aslist, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases_aslist, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(to_merge, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', n.value).contents, (ctypes.cast(intp._storePtr(bases_aslist), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('[O]'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(type_a, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assign(ok, ctypes_wrapped.c_int(int(g.pmerge(result, to_merge))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(to_merge, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ok.value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del type_a del ok del i del n del bases del result del to_merge del bases_aslist return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def mro_external(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyTypeObject)), ctypes.POINTER(g.PyTypeObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.mro_implementation(type_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del type_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def mro_internal(type_a): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) mro = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() tuple_a = ctypes.POINTER(g.PyObject)() checkit = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyType_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.mro_implementation(type_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: mro_str = ctypes.POINTER(g.PyObject)() helpers.assign(checkit, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(mro, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.cast(intp._make_string('mro'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(mro_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallObject(mro, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del mro_str if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(tuple_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Tuple(result), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(tuple_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if checkit.value: i = g.Py_ssize_t() len_a = g.Py_ssize_t() cls = ctypes.POINTER(g.PyObject)() solid = ctypes.POINTER(g.PyTypeObject)() helpers.assignPtr(solid, (ctypes.cast(intp._storePtr(intp._getPtr(g.solid_base(type_a), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes.cast(tuple_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < len_a.value)).value: pass else: break t = ctypes.POINTER(g.PyTypeObject)() helpers.assignPtr(cls, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(tuple_a, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value: continue elif ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("mro() returned a non-class ('%.500s')"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(t, (ctypes.cast(intp._storePtr(ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(solid, intp._getPtr(g.solid_base(t), ctypes.POINTER(g.PyTypeObject))))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("mro() returned base with unsuitable layout ('%.500s')"), ctypes.POINTER(ctypes_wrapped.c_byte)), t.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tuple_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del t del i del solid del len_a del cls helpers.assignPtr(type_a.contents.tp_mro, (ctypes.cast(intp._storePtr(tuple_a), ctypes_wrapped.c_void_p).value or 0)) g.type_mro_modified(type_a, type_a.contents.tp_mro) g.type_mro_modified(type_a, type_a.contents.tp_bases) g.PyType_Modified(type_a) return ctypes_wrapped.c_int(int(0L)).value del checkit del type_a del mro del result del tuple_a return ctypes_wrapped.c_int().value @staticmethod def best_base(bases): first_iteration = None bases = ctypes.cast(bases, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() base = ctypes.POINTER(g.PyTypeObject)() winner = ctypes.POINTER(g.PyTypeObject)() candidate = ctypes.POINTER(g.PyTypeObject)() base_i = ctypes.POINTER(g.PyTypeObject)() base_proto = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) values.assert_a.value(ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(base, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(winner, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(base_proto, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(base_proto.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value: continue if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(base_proto, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('bases must be types'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(base_i, (ctypes.cast(intp._storePtr(ctypes.cast(base_proto, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(base_i.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(base_i))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(candidate, (ctypes.cast(intp._storePtr(intp._getPtr(g.solid_base(base_i), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(winner, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(winner, (ctypes.cast(intp._storePtr(candidate), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base_i), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(winner, candidate))).value: pass elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(candidate, winner))).value: helpers.assignPtr(winner, (ctypes.cast(intp._storePtr(candidate), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(base_i), ctypes_wrapped.c_void_p).value or 0)) else: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('multiple bases have instance lay-out conflict'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string("a new-style class can't have only classic bases"), ctypes.POINTER(ctypes_wrapped.c_byte))) return (ctypes.cast(intp._storePtr(base), ctypes_wrapped.c_void_p).value or 0) del base_i del base_proto del candidate del i del winner del n del bases del base return (ctypes.cast(ctypes.POINTER(g.PyTypeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def extra_ivars(type_a, base): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) base = ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)) t_size = ctypes_wrapped.c_ulong(int(type_a.contents.tp_basicsize.value)) b_size = ctypes_wrapped.c_ulong(int(base.contents.tp_basicsize.value)) values.assert_a.value(ctypes_wrapped.c_int((t_size.value >= b_size.value))) if ctypes_wrapped.c_int((type_a.contents.tp_itemsize.value or base.contents.tp_itemsize.value)).value: return ctypes_wrapped.c_int((ctypes_wrapped.c_int((t_size.value != b_size.value)).value or ctypes_wrapped.c_int((type_a.contents.tp_itemsize.value != base.contents.tp_itemsize.value)).value)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.contents.tp_weaklistoffset.value and ctypes_wrapped.c_int((base.contents.tp_weaklistoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_weaklistoffset.value + ctypes_wrapped.c_size_t(8).value))).value == t_size.value)).value)).value and ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value)).value: helpers.augAssign(t_size, u'-=', ctypes_wrapped.c_size_t(8).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value and ctypes_wrapped.c_int((base.contents.tp_dictoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_dictoffset.value + ctypes_wrapped.c_size_t(8).value))).value == t_size.value)).value)).value and ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value)).value: helpers.augAssign(t_size, u'-=', ctypes_wrapped.c_size_t(8).value) return ctypes_wrapped.c_int((t_size.value != b_size.value)).value del b_size del type_a del base del t_size return ctypes_wrapped.c_int().value @staticmethod def solid_base(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) base = ctypes.POINTER(g.PyTypeObject)() if (ctypes.cast(type_a.contents.tp_base, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(base, (ctypes.cast(intp._storePtr(intp._getPtr(g.solid_base(type_a.contents.tp_base), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(base, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyBaseObject_Type)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int(g.extra_ivars(type_a, base))).value: return (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(base), ctypes_wrapped.c_void_p).value or 0) del type_a del base return (ctypes.cast(ctypes.POINTER(g.PyTypeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def get_builtin_base_with_dict(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) while ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_base, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value)).value: return (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(type_a.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del type_a return (ctypes.cast(ctypes.POINTER(g.PyTypeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def get_dict_descriptor(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) dict_str = ctypes.POINTER(g.PyObject)() descr = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(dict_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(dict_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dict_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(type_a, dict_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(descr), ctypes_wrapped.c_void_p).value or 0) del dict_str del type_a del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def raise_dict_descr_error(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("this __dict__ descriptor does not support '%.200s' objects"), ctypes.POINTER(ctypes_wrapped.c_byte)), obj.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) del obj return @staticmethod def subtype_dict(obj, context): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) dictptr = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dict_a = ctypes.POINTER(g.PyObject)() base = ctypes.POINTER(g.PyTypeObject)() helpers.assignPtr(base, (ctypes.cast(intp._storePtr(intp._getPtr(g.get_builtin_base_with_dict(obj.contents.ob_type), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: func = g.descrgetfunc() descr = ctypes.cast(intp._getPtr(g.get_dict_descriptor(base), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.raise_dict_descr_error(obj) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(descr.contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.raise_dict_descr_error(obj) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, descr, obj, ctypes.cast(obj.contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del descr del func helpers.assignPtr(dictptr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_GetDictPtr(obj), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dictptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_AttributeError, ctypes.cast(intp._make_string('This object has no __dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(dictptr.contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(dictptr.contents, (ctypes.cast(intp._storePtr(helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(dict_a), ctypes_wrapped.c_void_p).value or 0) del dictptr del dict_a del base del obj del context return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def subtype_setdict(obj, value, context): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) dictptr = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dict_a = ctypes.POINTER(g.PyObject)() base = ctypes.POINTER(g.PyTypeObject)() helpers.assignPtr(base, (ctypes.cast(intp._storePtr(intp._getPtr(g.get_builtin_base_with_dict(obj.contents.ob_type), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: func = g.descrsetfunc() descr = ctypes.cast(intp._getPtr(g.get_dict_descriptor(base), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.raise_dict_descr_error(obj) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(func, (ctypes.cast(descr.contents.ob_type.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.raise_dict_descr_error(obj) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return helpers.checkedFuncPtrCall(func, descr, obj, value).value del descr del func helpers.assignPtr(dictptr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_GetDictPtr(obj), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dictptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_AttributeError, ctypes.cast(intp._make_string('This object has no __dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("__dict__ must be set to a dictionary, not a '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(dictptr.contents), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(dictptr.contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del obj del dictptr del dict_a del value del base del context return ctypes_wrapped.c_int().value @staticmethod def subtype_getweakref(obj, context): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) context = ctypes.cast(context, ctypes_wrapped.c_void_p) weaklistptr = ctypes.POINTER(ctypes.POINTER(g.PyObject))() result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_AttributeError, ctypes.cast(intp._make_string('This object has no __weakref__'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value > ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value + ctypes_wrapped.c_size_t(8).value))).value <= ctypes_wrapped.c_ulong(int(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_basicsize.value)).value))) helpers.assignPtr(weaklistptr, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(weaklistptr.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(weaklistptr.contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del obj del weaklistptr del context del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) subtype_getsets_full = (PyGetSetDef * 3)() # TODO init subtype_getsets_full with (PyGetSetDef * 3)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), subtype_dict), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), subtype_setdict), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__weakref__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), subtype_getweakref), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) subtype_getsets_dict_only = (PyGetSetDef * 2)() # TODO init subtype_getsets_dict_only with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), subtype_dict), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), subtype_setdict), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) subtype_getsets_weakref_only = (PyGetSetDef * 2)() # TODO init subtype_getsets_weakref_only with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__weakref__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), subtype_getweakref), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def valid_identifier(s): first_iteration = None s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) p = ctypes.POINTER(ctypes_wrapped.c_ubyte)() i = g.Py_ssize_t() n = g.Py_ssize_t() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("__slots__ items must be strings, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(s, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes_wrapped.c_int(int(1L)).value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: (helpers.postfixInc(i), helpers.postfixIncPtr(p))[1] if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not (ctypes_wrapped.c_int(int(values.isalpha.value(ctypes_wrapped.c_int(p.contents.value)).value)) if ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(values.isalnum.value(ctypes_wrapped.c_int(p.contents.value)).value))).value))).value and ctypes_wrapped.c_int((p.contents.value != ctypes.c_byte(95).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('__slots__ must be identifiers'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(1L)).value del i del p del s del n return ctypes_wrapped.c_int().value @staticmethod def type_init(cls, args, kwds): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwds, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwds, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kwds))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('type.__init__() takes no keyword arguments'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(3L)).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('type.__init__() takes 1 or 3 arguments'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetSlice(args, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(res, ctypes_wrapped.c_int(int(g.object_init(cls, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return res.value del res del args del kwds del cls return ctypes_wrapped.c_int().value @staticmethod def type_new(metatype, args, kwds): goto = None while True: if (goto is None): first_iteration_d = None first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None metatype = ctypes.cast(metatype, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) name = ctypes.POINTER(g.PyObject)() bases = ctypes.POINTER(g.PyObject)() dict_a = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 4)(ctypes.cast(intp._make_string('name'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('bases'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('dict'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) slots = ctypes.POINTER(g.PyObject)() tmp = ctypes.POINTER(g.PyObject)() newslots = ctypes.POINTER(g.PyObject)() type_a = ctypes.POINTER(g.PyTypeObject)() base = ctypes.POINTER(g.PyTypeObject)() tmptype = ctypes.POINTER(g.PyTypeObject)() winner = ctypes.POINTER(g.PyTypeObject)() et = ctypes.POINTER(g.PyHeapTypeObject)() mp = ctypes.POINTER(g.PyMemberDef)() i = g.Py_ssize_t() nbases = g.Py_ssize_t() nslots = g.Py_ssize_t() slotoffset = g.Py_ssize_t() add_dict = g.Py_ssize_t() add_weak = g.Py_ssize_t() j = ctypes_wrapped.c_int() may_add_dict = ctypes_wrapped.c_int() may_add_weak = ctypes_wrapped.c_int() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwds, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) nargs = g.Py_ssize_t(int(ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) nkwds = g.Py_ssize_t(int((ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)) if ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_long(int(g.Py_ssize_t(int(g.PyDict_Size(kwds))).value))).value)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(metatype, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyType_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((nargs.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value and ctypes_wrapped.c_int((nkwds.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue x = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del x if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((nargs.value + nkwds.value))).value != ctypes_wrapped.c_int(int(3L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('type() takes 1 or 3 arguments'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): del nargs del nkwds if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwds, ctypes.cast(intp._make_string('SO!O!:type'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(name), ctypes.pointer(g.PyTuple_Type), ctypes.pointer(bases), ctypes.pointer(g.PyDict_Type), ctypes.pointer(dict_a)))).value))).value): goto = 3 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 3): goto = None if (goto is None): helpers.assign(nbases, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(winner, (ctypes.cast(intp._storePtr(metatype), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 4 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 8 continue first_iteration = False goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < nbases.value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmptype, (ctypes.cast(intp._storePtr(tmp.contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmptype, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 11 continue continue if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(winner, tmptype))).value): goto = 12 continue continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(tmptype, winner))).value): goto = 13 continue helpers.assignPtr(winner, (ctypes.cast(intp._storePtr(tmptype), ctypes_wrapped.c_void_p).value or 0)) continue if (goto == 13): goto = None if (goto is None): g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(winner, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(metatype, ctypes_wrapped.c_void_p).value or 0))).value): goto = 14 continue if (not ctypes_wrapped.c_int(((ctypes.cast(winner.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.type_new), ctypes_wrapped.c_void_p).value or 0))).value): goto = 15 continue return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(winner.contents.tp_new, winner, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 15): goto = None if (goto is None): helpers.assignPtr(metatype, (ctypes.cast(intp._storePtr(winner), ctypes_wrapped.c_void_p).value or 0)) if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int((nbases.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(g.PyBaseObject_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 18): goto = None if (goto is None): helpers.assign(nbases, ctypes_wrapped.c_int(int(1L)).value) goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 16): goto = None if (goto is None): helpers.assignPtr(base, (ctypes.cast(intp._storePtr(intp._getPtr(g.best_base(bases), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 21): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 26 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("type '%.100s' is not an acceptable base type"), ctypes.POINTER(ctypes_wrapped.c_byte)), base.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 32 continue continue goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 26): goto = None if (goto is None): helpers.assignPtr(slots, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(dict_a, ctypes.cast(intp._make_string('__slots__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(nslots, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(add_dict, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(add_weak, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(may_add_dict, ctypes_wrapped.c_int((base.contents.tp_dictoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value) helpers.assign(may_add_weak, ctypes_wrapped.c_int((ctypes_wrapped.c_int((base.contents.tp_weaklistoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((base.contents.tp_itemsize.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value) if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue if (not may_add_dict.value): goto = 35 continue helpers.postfixInc(add_dict) if (goto == 35): goto = None if (goto is None): if (not may_add_weak.value): goto = 36 continue helpers.postfixInc(add_weak) if (goto == 36): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(slots, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue helpers.assignPtr(slots, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), slots), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 37 continue if (goto == 38): goto = None if (goto is None): helpers.assignPtr(slots, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Tuple(slots), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue if (goto == 40): goto = None if (goto is None): if (not True): goto = 41 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 43 continue pass goto = 42 continue if (goto == 43): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 42): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 45 continue continue goto = 44 continue if (goto == 45): goto = None if (goto is None): goto = 41 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 41): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 39): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(slots, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(nslots, ctypes.cast(slots, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((nslots.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((base.contents.tp_itemsize.value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 46 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("nonempty __slots__ not supported for subtype of '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), base.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == u'bad_slots'): goto = None if (goto == 47): goto = None if (goto is None): if (not True): goto = 48 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue pass goto = 49 continue if (goto == 50): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 49): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 52 continue continue goto = 51 continue if (goto == 52): goto = None if (goto is None): goto = 48 continue if (goto == 51): goto = None if (goto is None): goto = 47 continue if (goto == 48): goto = None if (goto == 53): goto = None if (goto is None): if (not True): goto = 54 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue pass goto = 55 continue if (goto == 56): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 55): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 58 continue continue goto = 57 continue if (goto == 58): goto = None if (goto is None): goto = 54 continue if (goto == 57): goto = None if (goto is None): goto = 53 continue if (goto == 54): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 46): goto = None if (goto is None): if (not True): goto = 59 continue first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 60): goto = None if (goto is None): if (not True): goto = 61 continue if (not first_iteration_a): goto = 63 continue first_iteration_a = False goto = 62 continue if (goto == 63): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 62): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < nslots.value)).value): goto = 65 continue pass goto = 64 continue if (goto == 65): goto = None if (goto is None): goto = 61 continue if (goto == 64): goto = None if (goto is None): tmp_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(slots, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) s = ctypes.POINTER(ctypes_wrapped.c_byte)() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.valid_identifier(tmp_a))).value))).value): goto = 66 continue goto = u'bad_slots' continue if (goto == 66): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(tmp_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(ctypes.cast(tmp_a, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((values.strcmp.value(s, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 67 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not may_add_dict.value))).value or add_dict.value)).value): goto = 68 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('__dict__ slot disallowed: we already got one'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'bad_slots' continue if (goto == 68): goto = None if (goto is None): helpers.postfixInc(add_dict) if (goto == 67): goto = None if (goto is None): if (not ctypes_wrapped.c_int((values.strcmp.value(s, ctypes.cast(intp._make_string('__weakref__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 69 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not may_add_weak.value))).value or add_weak.value)).value): goto = 70 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('__weakref__ slot disallowed: either we already got one, or __itemsize__ != 0'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'bad_slots' continue if (goto == 70): goto = None if (goto is None): helpers.postfixInc(add_weak) if (goto == 69): goto = None if (goto is None): del s del tmp_a goto = 60 continue if (goto == 61): goto = None if (goto == 59): goto = None if (goto is None): helpers.assignPtr(newslots, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((nslots.value - add_dict.value))).value - add_weak.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(newslots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 71 continue goto = u'bad_slots' continue if (goto == 71): goto = None if (goto is None): if (not True): goto = 72 continue first_iteration_b = True helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value).value) if (goto == 73): goto = None if (goto is None): if (not True): goto = 74 continue if (not first_iteration_b): goto = 76 continue first_iteration_b = False goto = 75 continue if (goto == 76): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 75): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < nslots.value)).value): goto = 78 continue pass goto = 77 continue if (goto == 78): goto = None if (goto is None): goto = 74 continue if (goto == 77): goto = None if (goto is None): s = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(slots, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(ctypes.cast(tmp, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((add_dict.value and ctypes_wrapped.c_int((values.strcmp.value(s, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((add_weak.value and ctypes_wrapped.c_int((values.strcmp.value(s, ctypes.cast(intp._make_string('__weakref__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 79 continue continue if (goto == 79): goto = None if (goto is None): helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g._Py_Mangle(name, tmp), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0))).value): goto = 80 continue if (goto == 81): goto = None if (goto is None): if (not True): goto = 82 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 84 continue pass goto = 83 continue if (goto == 84): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 83): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 86 continue continue goto = 85 continue if (goto == 86): goto = None if (goto is None): goto = 82 continue if (goto == 85): goto = None if (goto is None): goto = 81 continue if (goto == 82): goto = None if (goto is None): goto = u'bad_slots' continue if (goto == 80): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(newslots, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(j) del s goto = 73 continue if (goto == 74): goto = None if (goto == 72): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((j.value == ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((nslots.value - add_dict.value))).value - add_weak.value))).value))) helpers.assign(nslots, j.value) if (goto == 87): goto = None if (goto is None): if (not True): goto = 88 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 90 continue pass goto = 89 continue if (goto == 90): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 89): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 92 continue continue goto = 91 continue if (goto == 92): goto = None if (goto is None): goto = 88 continue if (goto == 91): goto = None if (goto is None): goto = 87 continue if (goto == 88): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Sort(newslots))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 93 continue if (goto == 94): goto = None if (goto is None): if (not True): goto = 95 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 97 continue pass goto = 96 continue if (goto == 97): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 96): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 99 continue continue goto = 98 continue if (goto == 99): goto = None if (goto is None): goto = 95 continue if (goto == 98): goto = None if (goto is None): goto = 94 continue if (goto == 95): goto = None if (goto == 100): goto = None if (goto is None): if (not True): goto = 101 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 103 continue pass goto = 102 continue if (goto == 103): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 102): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 105 continue continue goto = 104 continue if (goto == 105): goto = None if (goto is None): goto = 101 continue if (goto == 104): goto = None if (goto is None): goto = 100 continue if (goto == 101): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 93): goto = None if (goto is None): helpers.assignPtr(slots, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_AsTuple(newslots), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 106): goto = None if (goto is None): if (not True): goto = 107 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 109 continue pass goto = 108 continue if (goto == 109): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newslots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 108): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 111 continue continue goto = 110 continue if (goto == 111): goto = None if (goto is None): goto = 107 continue if (goto == 110): goto = None if (goto is None): goto = 106 continue if (goto == 107): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 112 continue if (goto == 113): goto = None if (goto is None): if (not True): goto = 114 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 116 continue pass goto = 115 continue if (goto == 116): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 115): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 118 continue continue goto = 117 continue if (goto == 118): goto = None if (goto is None): goto = 114 continue if (goto == 117): goto = None if (goto is None): goto = 113 continue if (goto == 114): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 112): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((nbases.value > ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((may_add_dict.value and g.Py_ssize_t(int((not add_dict.value))).value)).value or ctypes_wrapped.c_int((may_add_weak.value and g.Py_ssize_t(int((not add_weak.value))).value)).value)).value)).value): goto = 119 continue if (not True): goto = 120 continue first_iteration_c = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 121): goto = None if (goto is None): if (not True): goto = 122 continue if (not first_iteration_c): goto = 124 continue first_iteration_c = False goto = 123 continue if (goto == 124): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 123): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < nbases.value)).value): goto = 126 continue pass goto = 125 continue if (goto == 126): goto = None if (goto is None): goto = 122 continue if (goto == 125): goto = None if (goto is None): helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(base, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 127 continue continue if (goto == 127): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tmp.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 128 continue if (not ctypes_wrapped.c_int((may_add_dict.value and g.Py_ssize_t(int((not add_dict.value))).value)).value): goto = 129 continue helpers.postfixInc(add_dict) if (goto == 129): goto = None if (goto is None): if (not ctypes_wrapped.c_int((may_add_weak.value and g.Py_ssize_t(int((not add_weak.value))).value)).value): goto = 130 continue helpers.postfixInc(add_weak) if (goto == 130): goto = None if (goto is None): goto = 122 continue if (goto == 128): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(tmptype, (ctypes.cast(intp._storePtr(ctypes.cast(tmp, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((may_add_dict.value and g.Py_ssize_t(int((not add_dict.value))).value)).value and ctypes_wrapped.c_int((tmptype.contents.tp_dictoffset.value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 131 continue helpers.postfixInc(add_dict) if (goto == 131): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((may_add_weak.value and g.Py_ssize_t(int((not add_weak.value))).value)).value and ctypes_wrapped.c_int((tmptype.contents.tp_weaklistoffset.value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 132 continue helpers.postfixInc(add_weak) if (goto == 132): goto = None if (goto is None): if (not ctypes_wrapped.c_int((may_add_dict.value and g.Py_ssize_t(int((not add_dict.value))).value)).value): goto = 133 continue continue if (goto == 133): goto = None if (goto is None): if (not ctypes_wrapped.c_int((may_add_weak.value and g.Py_ssize_t(int((not add_weak.value))).value)).value): goto = 134 continue continue if (goto == 134): goto = None if (goto is None): goto = 122 continue goto = 121 continue if (goto == 122): goto = None if (goto == 120): goto = None if (goto == 119): goto = None if (goto == 33): goto = None if (goto is None): helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(metatype.contents.tp_alloc, metatype, nslots), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 135 continue if (goto == 136): goto = None if (goto is None): if (not True): goto = 137 continue if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 139 continue pass goto = 138 continue if (goto == 139): goto = None if (goto == 140): goto = None if (goto is None): if (not True): goto = 141 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 143 continue pass goto = 142 continue if (goto == 143): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 142): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 145 continue continue goto = 144 continue if (goto == 145): goto = None if (goto is None): goto = 141 continue if (goto == 144): goto = None if (goto is None): goto = 140 continue if (goto == 141): goto = None if (goto == 138): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 147 continue continue goto = 146 continue if (goto == 147): goto = None if (goto is None): goto = 137 continue if (goto == 146): goto = None if (goto is None): goto = 136 continue if (goto == 137): goto = None if (goto == 148): goto = None if (goto is None): if (not True): goto = 149 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 151 continue pass goto = 150 continue if (goto == 151): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 150): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 153 continue continue goto = 152 continue if (goto == 153): goto = None if (goto is None): goto = 149 continue if (goto == 152): goto = None if (goto is None): goto = 148 continue if (goto == 149): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 135): goto = None if (goto is None): helpers.assignPtr(et, (ctypes.cast(intp._storePtr(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(et.contents.ht_name, (ctypes.cast(intp._storePtr(name), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(et.contents.ht_slots, (ctypes.cast(intp._storePtr(slots), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(type_a.contents.tp_flags, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value) if (not ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value): goto = 154 continue helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value) if (goto == 154): goto = None if (goto is None): if (not ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value): goto = 155 continue helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value) if (goto == 155): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 156 continue helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value) if (goto == 156): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_as_number, (ctypes.cast(intp._storePtr(ctypes.pointer(et.contents.as_number)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_as_sequence, (ctypes.cast(intp._storePtr(ctypes.pointer(et.contents.as_sequence)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_as_mapping, (ctypes.cast(intp._storePtr(ctypes.pointer(et.contents.as_mapping)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_as_buffer, (ctypes.cast(intp._storePtr(ctypes.pointer(et.contents.as_buffer)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_name, (ctypes.cast(intp._storePtr(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_bases, (ctypes.cast(intp._storePtr(bases), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(type_a.contents.tp_base, (ctypes.cast(intp._storePtr(base), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_dict, (ctypes.cast(intp._storePtr(helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Copy(dict_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 157 continue if (goto == 158): goto = None if (goto is None): if (not True): goto = 159 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 161 continue pass goto = 160 continue if (goto == 161): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 160): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 163 continue continue goto = 162 continue if (goto == 163): goto = None if (goto is None): goto = 159 continue if (goto == 162): goto = None if (goto is None): goto = 158 continue if (goto == 159): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 157): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(dict_a, ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 164 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_GetGlobals(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 165 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(tmp, ctypes.cast(intp._make_string('__name__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 166 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte)), tmp))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 167 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 167): goto = None if (goto == 166): goto = None if (goto == 165): goto = None if (goto == 164): goto = None if (goto is None): doc = ctypes.cast(intp._getPtr(g.PyDict_GetItemString(dict_a, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(doc, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 168 continue n = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(ctypes.cast(doc, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)) tp_doc = ctypes.cast(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.POINTER(ctypes_wrapped.c_byte)) if (not ctypes_wrapped.c_int(((ctypes.cast(tp_doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 169 continue if (goto == 170): goto = None if (goto is None): if (not True): goto = 171 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 173 continue pass goto = 172 continue if (goto == 173): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 172): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 175 continue continue goto = 174 continue if (goto == 175): goto = None if (goto is None): goto = 171 continue if (goto == 174): goto = None if (goto is None): goto = 170 continue if (goto == 171): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 169): goto = None if (goto is None): values.memcpy.value(ctypes.cast(tp_doc, ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(doc, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value)))) helpers.assignPtr(type_a.contents.tp_doc, (ctypes.cast(intp._storePtr(tp_doc), ctypes_wrapped.c_void_p).value or 0)) del tp_doc del n if (goto == 168): goto = None if (goto is None): del doc helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(dict_a, ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 176 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyStaticMethod_New(tmp), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 177 continue if (goto == 178): goto = None if (goto is None): if (not True): goto = 179 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 181 continue pass goto = 180 continue if (goto == 181): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 180): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 183 continue continue goto = 182 continue if (goto == 183): goto = None if (goto is None): goto = 179 continue if (goto == 182): goto = None if (goto is None): goto = 178 continue if (goto == 179): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 177): goto = None if (goto is None): ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte)), tmp))) if (goto == 184): goto = None if (goto is None): if (not True): goto = 185 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 187 continue pass goto = 186 continue if (goto == 187): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 186): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 189 continue continue goto = 188 continue if (goto == 189): goto = None if (goto is None): goto = 185 continue if (goto == 188): goto = None if (goto is None): goto = 184 continue if (goto == 185): goto = None if (goto == 176): goto = None if (goto is None): helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(et, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(et, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_basicsize.value), ctypes.POINTER(g.PyMemberDef))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(slotoffset, base.contents.tp_basicsize.value) if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 190 continue if (not True): goto = 191 continue first_iteration_d = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 192): goto = None if (goto is None): if (not True): goto = 193 continue if (not first_iteration_d): goto = 195 continue first_iteration_d = False goto = 194 continue if (goto == 195): goto = None if (goto is None): (helpers.postfixInc(i), helpers.postfixIncPtr(mp))[1] if (goto == 194): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < nslots.value)).value): goto = 197 continue pass goto = 196 continue if (goto == 197): goto = None if (goto is None): goto = 193 continue if (goto == 196): goto = None if (goto is None): helpers.assignPtr(mp.contents.name, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(slots, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.type, ctypes_wrapped.c_int(int(16L)).value) helpers.assign(mp.contents.offset, slotoffset.value) values.assert_a.value(ctypes_wrapped.c_int((values.strcmp.value(mp.contents.name, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((values.strcmp.value(mp.contents.name, ctypes.cast(intp._make_string('__weakref__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.augAssign(slotoffset, u'+=', ctypes_wrapped.c_size_t(8).value) goto = 192 continue if (goto == 193): goto = None if (goto == 191): goto = None if (goto == 190): goto = None if (goto is None): if (not add_dict.value): goto = 198 continue if (not base.contents.tp_itemsize.value): goto = 200 continue helpers.assign(type_a.contents.tp_dictoffset, ctypes_wrapped.c_long(int((- ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(8).value)).value))).value) goto = 199 continue if (goto == 200): goto = None if (goto is None): helpers.assign(type_a.contents.tp_dictoffset, slotoffset.value) if (goto == 199): goto = None if (goto is None): helpers.augAssign(slotoffset, u'+=', ctypes_wrapped.c_size_t(8).value) if (goto == 198): goto = None if (goto is None): if (not add_weak.value): goto = 201 continue values.assert_a.value(g.Py_ssize_t(int((not base.contents.tp_itemsize.value)))) helpers.assign(type_a.contents.tp_weaklistoffset, slotoffset.value) helpers.augAssign(slotoffset, u'+=', ctypes_wrapped.c_size_t(8).value) if (goto == 201): goto = None if (goto is None): helpers.assign(type_a.contents.tp_basicsize, slotoffset.value) helpers.assign(type_a.contents.tp_itemsize, base.contents.tp_itemsize.value) helpers.assignPtr(type_a.contents.tp_members, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(et, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(et, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_basicsize.value), ctypes.POINTER(g.PyMemberDef))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((type_a.contents.tp_weaklistoffset.value and type_a.contents.tp_dictoffset.value)).value): goto = 203 continue helpers.assignPtr(type_a.contents.tp_getset, (ctypes.cast(intp._storePtr(g.subtype_getsets_full), ctypes_wrapped.c_void_p).value or 0)) goto = 202 continue if (goto == 203): goto = None if (goto is None): if (not ctypes_wrapped.c_int((type_a.contents.tp_weaklistoffset.value and g.Py_ssize_t(int((not type_a.contents.tp_dictoffset.value))).value)).value): goto = 205 continue helpers.assignPtr(type_a.contents.tp_getset, (ctypes.cast(intp._storePtr(g.subtype_getsets_weakref_only), ctypes_wrapped.c_void_p).value or 0)) goto = 204 continue if (goto == 205): goto = None if (goto is None): if (not ctypes_wrapped.c_int((g.Py_ssize_t(int((not type_a.contents.tp_weaklistoffset.value))).value and type_a.contents.tp_dictoffset.value)).value): goto = 207 continue helpers.assignPtr(type_a.contents.tp_getset, (ctypes.cast(intp._storePtr(g.subtype_getsets_dict_only), ctypes_wrapped.c_void_p).value or 0)) goto = 206 continue if (goto == 207): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_getset, ctypes_wrapped.c_int(int(0L)).value) if (goto == 206): goto = None if (goto == 204): goto = None if (goto == 202): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((nslots.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 208 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_getattr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_getattro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 209 continue helpers.assignPtr(type_a.contents.tp_getattro, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.PyObject_GenericGetAttr), ctypes_wrapped.c_void_p).value or 0)) if (goto == 209): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_setattr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_setattro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 210 continue helpers.assignPtr(type_a.contents.tp_setattro, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.PyObject_GenericSetAttr), ctypes_wrapped.c_void_p).value or 0)) if (goto == 210): goto = None if (goto == 208): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_dealloc, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(g.PyObject)), g.subtype_dealloc), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.contents.tp_basicsize.value == ctypes_wrapped.c_size_t(16).value)).value and ctypes_wrapped.c_int((type_a.contents.tp_itemsize.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 211 continue helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value) if (goto == 211): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_alloc, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject), g.Py_ssize_t), g.PyType_GenericAlloc), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value): goto = 213 continue helpers.assignPtr(type_a.contents.tp_free, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), g.PyObject_GC_Del), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_traverse, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), g.visitproc, ctypes_wrapped.c_void_p), g.subtype_traverse), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_clear, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject)), g.subtype_clear), ctypes_wrapped.c_void_p).value or 0)) goto = 212 continue if (goto == 213): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_free, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), g.PyObject_Free), ctypes_wrapped.c_void_p).value or 0)) if (goto == 212): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 214 continue if (goto == 215): goto = None if (goto is None): if (not True): goto = 216 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 218 continue pass goto = 217 continue if (goto == 218): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 217): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 220 continue continue goto = 219 continue if (goto == 220): goto = None if (goto is None): goto = 216 continue if (goto == 219): goto = None if (goto is None): goto = 215 continue if (goto == 216): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 214): goto = None if (goto is None): g.fixup_slot_dispatchers(type_a) return (ctypes.cast(intp._storePtr(ctypes.cast(type_a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del metatype del tmptype del nbases del et del slots del kwlist del tmp del may_add_weak del winner del bases del type_a del dict_a del args del base del name del kwds del may_add_dict del slotoffset del i del j del newslots del add_dict del mp del nslots del add_weak return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _PyType_Lookup(type_a, name): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() mro = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() base = ctypes.POINTER(g.PyObject)() dict_a = ctypes.POINTER(g.PyObject)() h = ctypes_wrapped.c_uint() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.cast(name, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value <= ctypes_wrapped.c_int(int(100L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(19L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(h, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int(type_a.contents.tp_version_tag.value)).value * ctypes_wrapped.c_uint(int(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value)).value))).value >> ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(8L)).value * ctypes_wrapped.c_size_t(4).value))).value - ctypes_wrapped.c_int(int(10L)).value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.version.value == type_a.contents.tp_version_tag.value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.name, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.value), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(mro, (ctypes.cast(intp._storePtr(type_a.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(mro, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(base, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(mro, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(base.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(ctypes.cast(base, ctypes.POINTER(g.PyClassObject)).contents.cl_dict), ctypes_wrapped.c_void_p).value or 0)) else: values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(base, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)).contents.tp_dict), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(dict_a, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.cast(name, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value <= ctypes_wrapped.c_int(int(100L)).value)).value)).value and ctypes_wrapped.c_int(int(g.assign_version_tag(type_a))).value)).value: helpers.assign(h, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int(type_a.contents.tp_version_tag.value)).value * ctypes_wrapped.c_uint(int(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value)).value))).value >> ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(8L)).value * ctypes_wrapped.c_size_t(4).value))).value - ctypes_wrapped.c_int(int(10L)).value))).value))).value) helpers.assign(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.version, type_a.contents.tp_version_tag.value) helpers.assignPtr(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.value, (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(helpers.ptrArithmetic(g.method_cache, '+', h.value).contents.name, (ctypes.cast(intp._storePtr(name), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del type_a del name del i del res del dict_a del n del mro del base del h return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_getattro(type_a, name): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) metatype = ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) meta_attribute = ctypes.POINTER(g.PyObject)() attribute = ctypes.POINTER(g.PyObject)() meta_get = g.descrgetfunc() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("attribute name must be string, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), name.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(meta_get, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(meta_attribute, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(metatype, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(meta_attribute, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(meta_get, (ctypes.cast(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(meta_get, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meta_get, meta_attribute, ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.cast(metatype, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(attribute, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(type_a, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(attribute, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: local_get = ctypes.cast(ctypes.cast(attribute, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, g.descrgetfunc) while True: if ctypes_wrapped.c_int(((ctypes.cast(meta_attribute, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(local_get, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(local_get, attribute, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), ctypes.cast(type_a, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(attribute, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(attribute), ctypes_wrapped.c_void_p).value or 0) del local_get if ctypes_wrapped.c_int(((ctypes.cast(meta_get, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: res = ctypes.POINTER(g.PyObject)() helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meta_get, meta_attribute, ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.cast(metatype, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(meta_attribute, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res if ctypes_wrapped.c_int(((ctypes.cast(meta_attribute, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(meta_attribute), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("type object '%.50s' has no attribute '%.400s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del type_a del name del meta_get del metatype del attribute del meta_attribute return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_setattro(type_a, name, value): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't set attributes of built-in/extension type '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_GenericSetAttr(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), name, value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.update_slot(type_a, name))).value del type_a del name del value return ctypes_wrapped.c_int().value @staticmethod def type_dealloc(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) et = ctypes.POINTER(g.PyHeapTypeObject)() values.assert_a.value(ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value)))) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(type_a, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_ClearWeakRefs(ctypes.cast(type_a, ctypes.POINTER(g.PyObject))) helpers.assignPtr(et, (ctypes.cast(intp._storePtr(ctypes.cast(type_a, ctypes.POINTER(g.PyHeapTypeObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_base, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_mro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_cache, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_cache, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_cache, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_cache, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_subclasses, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a.contents.tp_subclasses, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a.contents.tp_subclasses, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a.contents.tp_subclasses, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_Free(ctypes.cast(ctypes.cast(type_a.contents.tp_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_void_p)) while True: if ctypes_wrapped.c_int(((ctypes.cast(et.contents.ht_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(et.contents.ht_name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(et.contents.ht_name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(et.contents.ht_name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(et.contents.ht_slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(et.contents.ht_slots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(et.contents.ht_slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(et.contents.ht_slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.checkedFuncPtrCall(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p)) del et del type_a return @staticmethod def type_subclasses(type_a, args_ignored): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args_ignored = ctypes.cast(args_ignored, ctypes.POINTER(g.PyObject)) list_a = ctypes.POINTER(g.PyObject)() raw = ctypes.POINTER(g.PyObject)() ref = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(raw, (ctypes.cast(intp._storePtr(type_a.contents.tp_subclasses), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(raw, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(raw, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(raw, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(ref, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(raw, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_RefType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g._PyWeakref_RefType)))).value))) helpers.assignPtr(ref, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ref, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Append(list_a, ref))).value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) del args_ignored del type_a del i del n del raw del list_a del ref return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) type_methods = (PyMethodDef * 5)() # TODO init type_methods with (PyMethodDef * 5)(structs.PyMethodDef(ctypes.cast(intp._make_string('mro'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, mro_external), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__subclasses__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, type_subclasses), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__instancecheck__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), type___instancecheck__), ctypes_wrapped.c_int(int(8L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__subclasscheck__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), type___subclasscheck__), ctypes_wrapped.c_int(int(8L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) type_doc = (ctypes_wrapped.c_byte * 1)() # TODO init type_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def type_traverse(type_a, visit, arg): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) values.assert_a.value(ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value)))) while True: if (ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(type_a.contents.tp_cache, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(type_a.contents.tp_cache, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(type_a.contents.tp_mro, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(type_a.contents.tp_bases, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(type_a.contents.tp_bases, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(type_a.contents.tp_base, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(type_a.contents.tp_base, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del type_a del visit del arg return ctypes_wrapped.c_int().value @staticmethod def type_clear(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) values.assert_a.value(ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value)))) g.PyType_Modified(type_a) if (ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0): g.PyDict_Clear(type_a.contents.tp_dict) while True: if (ctypes.cast(type_a.contents.tp_mro, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(type_a.contents.tp_mro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(type_a.contents.tp_mro, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del type_a return ctypes_wrapped.c_int().value @staticmethod def type_is_gc(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) return ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value del type_a return ctypes_wrapped.c_int().value PyType_Type = PyTypeObject() # TODO init PyType_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('type'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(872).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), helpers.makeFuncPtr(destructor, type_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, type_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), helpers.makeFuncPtr(hashfunc, _Py_HashPointer), helpers.makeFuncPtr(ternaryfunc, type_call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(getattrofunc, type_getattro), helpers.makeFuncPtr(setattrofunc, type_setattro), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value)), ctypes.cast(type_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, type_traverse), helpers.makeFuncPtr(inquiry, type_clear), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), type_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(368)).value)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(type_methods, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(type_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(type_getsets, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(264)).value)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), type_init), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), type_new), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_GC_Del), helpers.makeFuncPtr(inquiry, type_is_gc)) @staticmethod def excess_args(args, kwds): args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwds, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and g.Py_ssize_t(int(g.PyDict_Size(kwds))).value)).value)).value del args del kwds return ctypes_wrapped.c_int().value @staticmethod def object_init(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) err = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int(g.excess_args(args, kwds))).value: type_a = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_init), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_new), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(err, ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('object.__init__() takes no parameters'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_init), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_new), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('object.__init__() takes no parameters'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) del type_a return err.value del self del args del kwds del err return ctypes_wrapped.c_int().value @staticmethod def object_new(type_a, args, kwds): goto = None while True: if (goto is None): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) err = ctypes_wrapped.c_int() if (not ctypes_wrapped.c_int(int(g.excess_args(args, kwds))).value): goto = 1 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_new), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_init), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 3 continue helpers.assign(err, ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('object() takes no parameters'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value) goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTypeObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_new), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.object_init), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 4 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('object() takes no parameters'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(err, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 4): goto = None if (goto == 2): goto = None if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((err.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 5 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(20L)).value))).value))).value): goto = 6 continue comma = ctypes.POINTER(g.PyObject)() abstract_methods = ctypes.POINTER(g.PyObject)() builtins = ctypes.POINTER(g.PyObject)() sorted_a = ctypes.POINTER(g.PyObject)() sorted_methods = ctypes.POINTER(g.PyObject)() joined = ctypes.POINTER(g.PyObject)() joined_str = ctypes.POINTER(ctypes_wrapped.c_byte)() helpers.assignPtr(abstract_methods, (ctypes.cast(intp._storePtr(intp._getPtr(g.type_abstractmethods(type_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(abstract_methods, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue goto = u'error' continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(builtins, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_GetBuiltins(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(builtins, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue goto = u'error' continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(sorted_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(builtins, ctypes.cast(intp._make_string('sorted'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sorted_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue goto = u'error' continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(sorted_methods, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(sorted_a, abstract_methods, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sorted_methods, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue goto = u'error' continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(comma, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue helpers.assignPtr(comma, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(comma, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'error' continue if (goto == 12): goto = None if (goto == 11): goto = None if (goto is None): helpers.assignPtr(joined, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(comma, ctypes.cast(intp._make_string('join'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('O'), ctypes.POINTER(ctypes_wrapped.c_byte)), sorted_methods), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(joined, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'error' continue if (goto == 13): goto = None if (goto is None): helpers.assignPtr(joined_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(joined), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(joined_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue goto = u'error' continue if (goto == 14): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("Can't instantiate abstract class %s with abstract methods %s"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, joined_str), ctypes.POINTER(g.PyObject)) if (goto == u'error'): goto = None if (goto == 15): goto = None if (goto is None): if (not True): goto = 16 continue if (not ctypes_wrapped.c_int(((ctypes.cast(joined, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue pass goto = 17 continue if (goto == 18): goto = None if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(joined, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(joined, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(joined, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 24 continue continue goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 26 continue continue goto = 25 continue if (goto == 26): goto = None if (goto is None): goto = 16 continue if (goto == 25): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not ctypes_wrapped.c_int(((ctypes.cast(sorted_methods, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sorted_methods, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sorted_methods, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sorted_methods, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 36 continue continue goto = 35 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 38 continue continue goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = 28 continue if (goto == 37): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int(((ctypes.cast(abstract_methods, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto == 43): goto = None if (goto is None): if (not True): goto = 44 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(abstract_methods, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue pass goto = 45 continue if (goto == 46): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(abstract_methods, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(abstract_methods, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 45): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 44): goto = None if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 50 continue continue goto = 49 continue if (goto == 50): goto = None if (goto is None): goto = 40 continue if (goto == 49): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del builtins del sorted_methods del joined del sorted_a del comma del joined_str del abstract_methods if (goto == 6): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_alloc, type_a, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del args del kwds del err return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def object_dealloc(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) helpers.checkedFuncPtrCall(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(self, ctypes_wrapped.c_void_p)) del self return @staticmethod def object_repr(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) type_a = ctypes.POINTER(g.PyTypeObject)() mod = ctypes.POINTER(g.PyObject)() name = ctypes.POINTER(g.PyObject)() rtn = ctypes.POINTER(g.PyObject)() helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(mod, (ctypes.cast(intp._storePtr(intp._getPtr(g.type_module(type_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(mod, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(name, (ctypes.cast(intp._storePtr(intp._getPtr(g.type_name(type_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and values.strcmp.value(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__builtin__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value)).value: helpers.assignPtr(rtn, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('<%s.%s object at %p>'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(mod, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(rtn, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('<%s object at %p>'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(mod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(mod, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(mod, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(rtn), ctypes_wrapped.c_void_p).value or 0) del self del rtn del type_a del name del mod return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def object_str(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) f = g.unaryfunc() helpers.assignPtr(f, (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(f, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)), g.object_repr), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del f return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def object_get_class(self, closure): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) helpers.postfixInc(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del closure del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def equiv_structs(a, b): a = ctypes.cast(a, ctypes.POINTER(g.PyTypeObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyTypeObject)) return ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((a.contents.tp_basicsize.value == b.contents.tp_basicsize.value)).value)).value and ctypes_wrapped.c_int((a.contents.tp_itemsize.value == b.contents.tp_itemsize.value)).value)).value and ctypes_wrapped.c_int((a.contents.tp_dictoffset.value == b.contents.tp_dictoffset.value)).value)).value and ctypes_wrapped.c_int((a.contents.tp_weaklistoffset.value == b.contents.tp_weaklistoffset.value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value == ctypes_wrapped.c_ulong(int((b.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)).value)).value)).value del a del b return ctypes_wrapped.c_int().value @staticmethod def same_slots_added(a, b): a = ctypes.cast(a, ctypes.POINTER(g.PyTypeObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyTypeObject)) base = ctypes.cast(a.contents.tp_base, ctypes.POINTER(g.PyTypeObject)) size = g.Py_ssize_t() slots_a = ctypes.POINTER(g.PyObject)() slots_b = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b.contents.tp_base, ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(size, base.contents.tp_basicsize.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((a.contents.tp_dictoffset.value == size.value)).value and ctypes_wrapped.c_int((b.contents.tp_dictoffset.value == size.value)).value)).value: helpers.augAssign(size, u'+=', ctypes_wrapped.c_size_t(8).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((a.contents.tp_weaklistoffset.value == size.value)).value and ctypes_wrapped.c_int((b.contents.tp_weaklistoffset.value == size.value)).value)).value: helpers.augAssign(size, u'+=', ctypes_wrapped.c_size_t(8).value) helpers.assignPtr(slots_a, (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyHeapTypeObject)).contents.ht_slots), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(slots_b, (ctypes.cast(intp._storePtr(ctypes.cast(b, ctypes.POINTER(g.PyHeapTypeObject)).contents.ht_slots), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(slots_a, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(slots_b, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_Compare(slots_a, slots_b))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.augAssign(size, u'+=', ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(8).value * ctypes.cast(slots_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) return ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == a.contents.tp_basicsize.value)).value and ctypes_wrapped.c_int((size.value == b.contents.tp_basicsize.value)).value)).value del a del slots_a del b del slots_b del base del size return ctypes_wrapped.c_int().value @staticmethod def compatible_for_assignment(oldto, newto, attr): oldto = ctypes.cast(oldto, ctypes.POINTER(g.PyTypeObject)) newto = ctypes.cast(newto, ctypes.POINTER(g.PyTypeObject)) attr = ctypes.cast(attr, ctypes.POINTER(ctypes_wrapped.c_byte)) newbase = ctypes.POINTER(g.PyTypeObject)() oldbase = ctypes.POINTER(g.PyTypeObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(newto.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(oldto.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(newto.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(oldto.contents.tp_free, ctypes_wrapped.c_void_p).value or 0))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%s assignment: '%s' deallocator differs from '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), attr, newto.contents.tp_name, oldto.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(newbase, (ctypes.cast(intp._storePtr(newto), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(oldbase, (ctypes.cast(intp._storePtr(oldto), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(int(g.equiv_structs(newbase, newbase.contents.tp_base))).value: helpers.assignPtr(newbase, (ctypes.cast(intp._storePtr(newbase.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(int(g.equiv_structs(oldbase, oldbase.contents.tp_base))).value: helpers.assignPtr(oldbase, (ctypes.cast(intp._storePtr(oldbase.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(newbase, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(oldbase, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(newbase.contents.tp_base, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(oldbase.contents.tp_base, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.same_slots_added(newbase, oldbase))).value))).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%s assignment: '%s' object layout differs from '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), attr, newto.contents.tp_name, oldto.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(1L)).value del oldto del newto del attr del newbase del oldbase return ctypes_wrapped.c_int().value @staticmethod def object_set_class(self, value, closure): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) oldto = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) newto = ctypes.POINTER(g.PyTypeObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't delete __class__ attribute"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("__class__ must be set to new-style class, not '%s' object"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(newto, (ctypes.cast(intp._storePtr(ctypes.cast(value, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((newto.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value or ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((oldto.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__class__ assignment: only for heap types'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int(g.compatible_for_assignment(newto, oldto, ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value: helpers.postfixInc(ctypes.cast(newto, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(newto), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(oldto, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(oldto, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(oldto, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value else: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del closure del oldto del self del newto del value return ctypes_wrapped.c_int().value object_getsets = (PyGetSetDef * 2)() # TODO init object_getsets with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), object_get_class), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), object_set_class), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def import_copyreg(): copyreg_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((not (ctypes.cast(copyreg_str, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(copyreg_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('copy_reg'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(copyreg_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_Import(copyreg_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del copyreg_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slotnames(cls): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) clsdict = ctypes.POINTER(g.PyObject)() copyreg = ctypes.POINTER(g.PyObject)() slotnames_a = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(clsdict, (ctypes.cast(intp._storePtr(ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject)).contents.tp_dict), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(slotnames_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(clsdict, ctypes.cast(intp._make_string('__slotnames__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(slotnames_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(slotnames_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(slotnames_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(slotnames_a), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(copyreg, (ctypes.cast(intp._storePtr(intp._getPtr(g.import_copyreg(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(copyreg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(slotnames_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(copyreg, ctypes.cast(intp._make_string('_slotnames'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('O'), ctypes.POINTER(ctypes_wrapped.c_byte)), cls), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(slotnames_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(slotnames_a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(slotnames_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string("copy_reg._slotnames didn't return a list or None"), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slotnames_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slotnames_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slotnames_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(slotnames_a, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(slotnames_a), ctypes_wrapped.c_void_p).value or 0) del copyreg del clsdict del slotnames_a del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def reduce_2(obj): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) cls = ctypes.POINTER(g.PyObject)() getnewargs = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() args2 = ctypes.POINTER(g.PyObject)() getstate = ctypes.POINTER(g.PyObject)() state_a = ctypes.POINTER(g.PyObject)() names = ctypes.POINTER(g.PyObject)() slots = ctypes.POINTER(g.PyObject)() listitems = ctypes.POINTER(g.PyObject)() dictitems = ctypes.POINTER(g.PyObject)() copyreg = ctypes.POINTER(g.PyObject)() newobj = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assignPtr(cls, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(cls, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(getnewargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__getnewargs__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(getnewargs, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallObject(getnewargs, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(getnewargs, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(getnewargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(getnewargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 9 continue continue goto = 8 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 10 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("__getnewargs__ should return a tuple, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'end' continue if (goto == 10): goto = None if (goto is None): goto = 2 continue if (goto == 3): goto = None if (goto is None): g.PyErr_Clear() helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue goto = u'end' continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(getstate, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__getstate__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(getstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue helpers.assignPtr(state_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallObject(getstate, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(getstate, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(getstate, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(getstate, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(state_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue goto = u'end' continue if (goto == 20): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): g.PyErr_Clear() helpers.assignPtr(state_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__dict__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(state_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue g.PyErr_Clear() helpers.assignPtr(state_a, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(state_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 21): goto = None if (goto is None): helpers.assignPtr(names, (ctypes.cast(intp._storePtr(intp._getPtr(g.slotnames(cls), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(names, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue goto = u'end' continue if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(names, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 23 continue values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(names, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(slots, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue goto = u'end' continue if (goto == 24): goto = None if (goto is None): helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) if (not True): goto = 25 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 26): goto = None if (goto is None): if (not True): goto = 27 continue if (not first_iteration): goto = 29 continue first_iteration = False goto = 28 continue if (goto == 29): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < ctypes.cast(names, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 31 continue pass goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 30): goto = None if (goto is None): name = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() helpers.assignPtr(name, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(names, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(obj, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 33 continue g.PyErr_Clear() goto = 32 continue if (goto == 33): goto = None if (goto is None): err = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyDict_SetItem(slots, name, value))).value)) if (goto == 34): goto = None if (goto is None): if (not True): goto = 35 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 37 continue pass goto = 36 continue if (goto == 37): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 36): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 39 continue continue goto = 38 continue if (goto == 39): goto = None if (goto is None): goto = 35 continue if (goto == 38): goto = None if (goto is None): goto = 34 continue if (goto == 35): goto = None if (goto is None): if (not err.value): goto = 40 continue goto = u'end' continue if (goto == 40): goto = None if (goto is None): helpers.postfixInc(n) del err if (goto == 32): goto = None if (goto is None): del name del value goto = 26 continue if (goto == 27): goto = None if (goto == 25): goto = None if (goto is None): if (not n.value): goto = 41 continue helpers.assignPtr(state_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(NO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), state_a, slots), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(state_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue goto = u'end' continue if (goto == 42): goto = None if (goto == 41): goto = None if (goto == 23): goto = None if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 44 continue helpers.assignPtr(listitems, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(listitems, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) goto = 43 continue if (goto == 44): goto = None if (goto is None): helpers.assignPtr(listitems, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(listitems, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue goto = u'end' continue if (goto == 45): goto = None if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 47 continue helpers.assignPtr(dictitems, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(dictitems, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) goto = 46 continue if (goto == 47): goto = None if (goto is None): helpers.assignPtr(dictitems, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(obj, ctypes.cast(intp._make_string('iteritems'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dictitems, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue goto = u'end' continue if (goto == 48): goto = None if (goto == 46): goto = None if (goto is None): helpers.assignPtr(copyreg, (ctypes.cast(intp._storePtr(intp._getPtr(g.import_copyreg(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(copyreg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 49 continue goto = u'end' continue if (goto == 49): goto = None if (goto is None): helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(copyreg, ctypes.cast(intp._make_string('__newobj__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue goto = u'end' continue if (goto == 50): goto = None if (goto is None): helpers.assign(n, ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(args2, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(args2, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue goto = u'end' continue if (goto == 51): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args2, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(cls), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(cls, ctypes_wrapped.c_int(int(0L)).value) if (not True): goto = 52 continue first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 53): goto = None if (goto is None): if (not True): goto = 54 continue if (not first_iteration_a): goto = 56 continue first_iteration_a = False goto = 55 continue if (goto == 56): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 55): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 58 continue pass goto = 57 continue if (goto == 58): goto = None if (goto is None): goto = 54 continue if (goto == 57): goto = None if (goto is None): v = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args2, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v goto = 53 continue if (goto == 54): goto = None if (goto == 52): goto = None if (goto is None): helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(5L)).value)), newobj, args2, state_a, listitems, dictitems), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'end'): goto = None if (goto == 59): goto = None if (goto is None): if (not True): goto = 60 continue if (not ctypes_wrapped.c_int(((ctypes.cast(cls, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 62 continue pass goto = 61 continue if (goto == 62): goto = None if (goto == 63): goto = None if (goto is None): if (not True): goto = 64 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 66 continue pass goto = 65 continue if (goto == 66): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(cls, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(cls, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 65): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 68 continue continue goto = 67 continue if (goto == 68): goto = None if (goto is None): goto = 64 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 64): goto = None if (goto == 61): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 70 continue continue goto = 69 continue if (goto == 70): goto = None if (goto is None): goto = 60 continue if (goto == 69): goto = None if (goto is None): goto = 59 continue if (goto == 60): goto = None if (goto == 71): goto = None if (goto is None): if (not True): goto = 72 continue if (not ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 74 continue pass goto = 73 continue if (goto == 74): goto = None if (goto == 75): goto = None if (goto is None): if (not True): goto = 76 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 78 continue pass goto = 77 continue if (goto == 78): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 77): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 80 continue continue goto = 79 continue if (goto == 80): goto = None if (goto is None): goto = 76 continue if (goto == 79): goto = None if (goto is None): goto = 75 continue if (goto == 76): goto = None if (goto == 73): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 82 continue continue goto = 81 continue if (goto == 82): goto = None if (goto is None): goto = 72 continue if (goto == 81): goto = None if (goto is None): goto = 71 continue if (goto == 72): goto = None if (goto == 83): goto = None if (goto is None): if (not True): goto = 84 continue if (not ctypes_wrapped.c_int(((ctypes.cast(args2, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 86 continue pass goto = 85 continue if (goto == 86): goto = None if (goto == 87): goto = None if (goto is None): if (not True): goto = 88 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 90 continue pass goto = 89 continue if (goto == 90): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 89): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 92 continue continue goto = 91 continue if (goto == 92): goto = None if (goto is None): goto = 88 continue if (goto == 91): goto = None if (goto is None): goto = 87 continue if (goto == 88): goto = None if (goto == 85): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 94 continue continue goto = 93 continue if (goto == 94): goto = None if (goto is None): goto = 84 continue if (goto == 93): goto = None if (goto is None): goto = 83 continue if (goto == 84): goto = None if (goto == 95): goto = None if (goto is None): if (not True): goto = 96 continue if (not ctypes_wrapped.c_int(((ctypes.cast(slots, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 98 continue pass goto = 97 continue if (goto == 98): goto = None if (goto == 99): goto = None if (goto is None): if (not True): goto = 100 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slots, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 102 continue pass goto = 101 continue if (goto == 102): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slots, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 101): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 104 continue continue goto = 103 continue if (goto == 104): goto = None if (goto is None): goto = 100 continue if (goto == 103): goto = None if (goto is None): goto = 99 continue if (goto == 100): goto = None if (goto == 97): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 106 continue continue goto = 105 continue if (goto == 106): goto = None if (goto is None): goto = 96 continue if (goto == 105): goto = None if (goto is None): goto = 95 continue if (goto == 96): goto = None if (goto == 107): goto = None if (goto is None): if (not True): goto = 108 continue if (not ctypes_wrapped.c_int(((ctypes.cast(state_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 110 continue pass goto = 109 continue if (goto == 110): goto = None if (goto == 111): goto = None if (goto is None): if (not True): goto = 112 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(state_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 114 continue pass goto = 113 continue if (goto == 114): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(state_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(state_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 113): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 116 continue continue goto = 115 continue if (goto == 116): goto = None if (goto is None): goto = 112 continue if (goto == 115): goto = None if (goto is None): goto = 111 continue if (goto == 112): goto = None if (goto == 109): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 118 continue continue goto = 117 continue if (goto == 118): goto = None if (goto is None): goto = 108 continue if (goto == 117): goto = None if (goto is None): goto = 107 continue if (goto == 108): goto = None if (goto == 119): goto = None if (goto is None): if (not True): goto = 120 continue if (not ctypes_wrapped.c_int(((ctypes.cast(names, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 122 continue pass goto = 121 continue if (goto == 122): goto = None if (goto == 123): goto = None if (goto is None): if (not True): goto = 124 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(names, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 126 continue pass goto = 125 continue if (goto == 126): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(names, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 125): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 128 continue continue goto = 127 continue if (goto == 128): goto = None if (goto is None): goto = 124 continue if (goto == 127): goto = None if (goto is None): goto = 123 continue if (goto == 124): goto = None if (goto == 121): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 130 continue continue goto = 129 continue if (goto == 130): goto = None if (goto is None): goto = 120 continue if (goto == 129): goto = None if (goto is None): goto = 119 continue if (goto == 120): goto = None if (goto == 131): goto = None if (goto is None): if (not True): goto = 132 continue if (not ctypes_wrapped.c_int(((ctypes.cast(listitems, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 134 continue pass goto = 133 continue if (goto == 134): goto = None if (goto == 135): goto = None if (goto is None): if (not True): goto = 136 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(listitems, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 138 continue pass goto = 137 continue if (goto == 138): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(listitems, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(listitems, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 137): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 140 continue continue goto = 139 continue if (goto == 140): goto = None if (goto is None): goto = 136 continue if (goto == 139): goto = None if (goto is None): goto = 135 continue if (goto == 136): goto = None if (goto == 133): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 142 continue continue goto = 141 continue if (goto == 142): goto = None if (goto is None): goto = 132 continue if (goto == 141): goto = None if (goto is None): goto = 131 continue if (goto == 132): goto = None if (goto == 143): goto = None if (goto is None): if (not True): goto = 144 continue if (not ctypes_wrapped.c_int(((ctypes.cast(dictitems, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 146 continue pass goto = 145 continue if (goto == 146): goto = None if (goto == 147): goto = None if (goto is None): if (not True): goto = 148 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dictitems, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 150 continue pass goto = 149 continue if (goto == 150): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dictitems, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dictitems, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 149): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 152 continue continue goto = 151 continue if (goto == 152): goto = None if (goto is None): goto = 148 continue if (goto == 151): goto = None if (goto is None): goto = 147 continue if (goto == 148): goto = None if (goto == 145): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 154 continue continue goto = 153 continue if (goto == 154): goto = None if (goto is None): goto = 144 continue if (goto == 153): goto = None if (goto is None): goto = 143 continue if (goto == 144): goto = None if (goto == 155): goto = None if (goto is None): if (not True): goto = 156 continue if (not ctypes_wrapped.c_int(((ctypes.cast(copyreg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 158 continue pass goto = 157 continue if (goto == 158): goto = None if (goto == 159): goto = None if (goto is None): if (not True): goto = 160 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 162 continue pass goto = 161 continue if (goto == 162): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 161): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 164 continue continue goto = 163 continue if (goto == 164): goto = None if (goto is None): goto = 160 continue if (goto == 163): goto = None if (goto is None): goto = 159 continue if (goto == 160): goto = None if (goto == 157): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 166 continue continue goto = 165 continue if (goto == 166): goto = None if (goto is None): goto = 156 continue if (goto == 165): goto = None if (goto is None): goto = 155 continue if (goto == 156): goto = None if (goto == 167): goto = None if (goto is None): if (not True): goto = 168 continue if (not ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 170 continue pass goto = 169 continue if (goto == 170): goto = None if (goto == 171): goto = None if (goto is None): if (not True): goto = 172 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 174 continue pass goto = 173 continue if (goto == 174): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 173): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 176 continue continue goto = 175 continue if (goto == 176): goto = None if (goto is None): goto = 172 continue if (goto == 175): goto = None if (goto is None): goto = 171 continue if (goto == 172): goto = None if (goto == 169): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 178 continue continue goto = 177 continue if (goto == 178): goto = None if (goto is None): goto = 168 continue if (goto == 177): goto = None if (goto is None): goto = 167 continue if (goto == 168): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del getstate del obj del state_a del res del args del listitems del newobj del i del getnewargs del names del dictitems del copyreg del args2 del n del slots del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _common_reduce(self, proto): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) proto = ctypes_wrapped.c_int(int(proto.value)) copyreg = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((proto.value >= ctypes_wrapped.c_int(int(2L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.reduce_2(self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(copyreg, (ctypes.cast(intp._storePtr(intp._getPtr(g.import_copyreg(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(copyreg, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallMethod(copyreg, ctypes.cast(intp._make_string('_reduce_ex'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('(Oi)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self, proto), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(copyreg, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del copyreg del res del self del proto return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def object_reduce(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) proto = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|i:__reduce__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(proto)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g._common_reduce(self, proto), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del proto return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def object_reduce_ex(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) reduce_a = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() proto = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|i:__reduce_ex__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(proto)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(reduce_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(self, ctypes.cast(intp._make_string('__reduce__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(reduce_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: cls = ctypes.POINTER(g.PyObject)() clsreduce = ctypes.POINTER(g.PyObject)() objreduce = ctypes.POINTER(g.PyObject)() override = ctypes_wrapped.c_int() helpers.assignPtr(cls, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(self, ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(cls, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(clsreduce, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(cls, ctypes.cast(intp._make_string('__reduce__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(cls, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(cls, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(clsreduce, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(objreduce, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItemString(g.PyBaseObject_Type.tp_dict, ctypes.cast(intp._make_string('__reduce__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(override, ctypes_wrapped.c_int(((ctypes.cast(clsreduce, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(objreduce, ctypes_wrapped.c_void_p).value or 0))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(clsreduce, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(clsreduce, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(clsreduce, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if override.value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallObject(reduce_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(reduce_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del override del clsreduce del objreduce del cls return (ctypes.cast(intp._storePtr(intp._getPtr(g._common_reduce(self, proto), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self del args del reduce_a del proto return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def object_subclasshook(cls, args): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del args del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) object_subclasshook_doc = (ctypes_wrapped.c_byte * 1)() # TODO init object_subclasshook_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def object_format(self, args): goto = None while True: if (goto is None): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) format_spec = ctypes.POINTER(g.PyObject)() self_as_str = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() format_len = g.Py_ssize_t() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('O:__format__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(format_spec)))).value))).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(format_spec, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue helpers.assign(format_len, ctypes.cast(format_spec, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(self_as_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 2 continue if (goto == 3): goto = None if (goto is None): g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('argument to __format__ must be unicode or str'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(self_as_str, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue if (not ctypes_wrapped.c_int((format_len.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 5 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_PendingDeprecationWarning, ctypes.cast(intp._make_string('object.__format__ with a non-empty format string is deprecated'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = u'done' continue if (goto == 6): goto = None if (goto == 5): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Format(self_as_str, format_spec), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto == u'done'): goto = None if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int(((ctypes.cast(self_as_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(self_as_str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(self_as_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(self_as_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 8 continue if (goto == 17): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del self_as_str del format_len del self del args del result del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def object_sizeof(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) res = g.Py_ssize_t() isize = g.Py_ssize_t() helpers.assign(res, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(isize, self.contents.ob_type.contents.tp_itemsize.value) if ctypes_wrapped.c_int((isize.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(res, ctypes_wrapped.c_long(int((self.contents.ob_type.contents.ob_size.value * isize.value))).value) helpers.augAssign(res, u'+=', self.contents.ob_type.contents.tp_basicsize.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(res), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del isize del res del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) object_methods = (PyMethodDef * 6)() # TODO init object_methods with (PyMethodDef * 6)(structs.PyMethodDef(ctypes.cast(intp._make_string('__reduce_ex__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_reduce_ex), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__reduce__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_reduce), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__subclasshook__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_subclasshook), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(16L)).value | ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes.cast(object_subclasshook_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__format__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_format), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__sizeof__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_sizeof), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) PyBaseObject_Type = PyTypeObject() # TODO init PyBaseObject_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('object'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(16).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), object_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), object_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), helpers.makeFuncPtr(hashfunc, _Py_HashPointer), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), object_str), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericSetAttr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(object_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(object_getsets, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_init), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t), PyType_GenericAlloc), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), object_new), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_Free)) @staticmethod def add_methods(type_a, meth): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) meth = ctypes.cast(meth, ctypes.POINTER(g.PyMethodDef)) dict_a = ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(meth) if ctypes_wrapped.c_int(((ctypes.cast(meth.contents.ml_name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break descr = ctypes.POINTER(g.PyObject)() err = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(dict_a, meth.contents.ml_name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_uint(int((not ctypes_wrapped.c_uint(int((meth.contents.ml_flags.value & ctypes_wrapped.c_int(int(64L)).value))).value))).value)).value: continue if ctypes_wrapped.c_uint(int((meth.contents.ml_flags.value & ctypes_wrapped.c_int(int(16L)).value))).value: if ctypes_wrapped.c_uint(int((meth.contents.ml_flags.value & ctypes_wrapped.c_int(int(32L)).value))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('method cannot be both class and static'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDescr_NewClassMethod(type_a, meth), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_uint(int((meth.contents.ml_flags.value & ctypes_wrapped.c_int(int(32L)).value))).value: cfunc = ctypes.cast(intp._getPtr(g.PyCFunction_NewEx(meth, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(cfunc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyStaticMethod_New(cfunc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(cfunc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(cfunc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(cfunc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del cfunc else: helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDescr_NewMethod(type_a, meth), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, meth.contents.ml_name, descr))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((err.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del err del descr return ctypes_wrapped.c_int(int(0L)).value del type_a del dict_a del meth return ctypes_wrapped.c_int().value @staticmethod def add_members(type_a, memb): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) memb = ctypes.cast(memb, ctypes.POINTER(g.PyMemberDef)) dict_a = ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(memb) if ctypes_wrapped.c_int(((ctypes.cast(memb.contents.name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break descr = ctypes.POINTER(g.PyObject)() if (ctypes.cast(intp._getPtr(g.PyDict_GetItemString(dict_a, memb.contents.name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): continue helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDescr_NewMember(type_a, memb), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, memb.contents.name, descr))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del descr return ctypes_wrapped.c_int(int(0L)).value del type_a del dict_a del memb return ctypes_wrapped.c_int().value @staticmethod def add_getset(type_a, gsp): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) gsp = ctypes.cast(gsp, ctypes.POINTER(g.PyGetSetDef)) dict_a = ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(gsp) if ctypes_wrapped.c_int(((ctypes.cast(gsp.contents.name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break descr = ctypes.POINTER(g.PyObject)() if (ctypes.cast(intp._getPtr(g.PyDict_GetItemString(dict_a, gsp.contents.name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): continue helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDescr_NewGetSet(type_a, gsp), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, gsp.contents.name, descr))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del descr return ctypes_wrapped.c_int(int(0L)).value del gsp del type_a del dict_a return ctypes_wrapped.c_int().value @staticmethod def inherit_special(type_a, base): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) base = ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)) oldsize = g.Py_ssize_t() newsize = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(base.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0))).value: helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value))).value) helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(base.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0))).value: helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value) helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(base.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(base.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(base.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value: helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value) helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value) helpers.assign(oldsize, base.contents.tp_basicsize.value) helpers.assign(newsize, (ctypes_wrapped.c_long(int(type_a.contents.tp_basicsize.value)) if type_a.contents.tp_basicsize.value else ctypes_wrapped.c_long(int(oldsize.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value))).value and ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)).value and ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_clear, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value) if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(type_a.contents.tp_traverse, (ctypes.cast(base.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_clear, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(type_a.contents.tp_clear, (ctypes.cast(base.contents.tp_clear, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((type_a.contents.tp_flags.value & base.contents.tp_flags.value))).value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyBaseObject_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(type_a.contents.tp_new, (ctypes.cast(base.contents.tp_new, ctypes_wrapped.c_void_p).value or 0)) helpers.assign(type_a.contents.tp_basicsize, newsize.value) if ctypes_wrapped.c_int((type_a.contents.tp_itemsize.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(type_a.contents.tp_itemsize, base.contents.tp_itemsize.value) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((type_a.contents.tp_flags.value & base.contents.tp_flags.value))).value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value: if ctypes_wrapped.c_int((type_a.contents.tp_weaklistoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(type_a.contents.tp_weaklistoffset, base.contents.tp_weaklistoffset.value) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((type_a.contents.tp_flags.value & base.contents.tp_flags.value))).value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value: if ctypes_wrapped.c_int((type_a.contents.tp_dictoffset.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(type_a.contents.tp_dictoffset, base.contents.tp_dictoffset.value) if ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.cast(g.PyExc_BaseException, ctypes.POINTER(g.PyTypeObject))))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(30L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyType_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyInt_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyLong_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyString_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyTuple_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyList_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value) elif ctypes_wrapped.c_int(int(g.PyType_IsSubtype(base, ctypes.pointer(g.PyDict_Type)))).value: helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value) del type_a del base del newsize del oldsize return @staticmethod def overrides_name(type_a, name): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) dict_a = ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(dict_a, name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del type_a del dict_a del name return ctypes_wrapped.c_int().value @staticmethod def inherit_slots(type_a, base): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) base = ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)) basebase = ctypes.POINTER(g.PyTypeObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(basebase, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(basebase.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(basebase, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_add, (ctypes.cast(base.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_subtract, (ctypes.cast(base.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_multiply, (ctypes.cast(base.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_divide, (ctypes.cast(base.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_remainder, (ctypes.cast(base.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_divmod, (ctypes.cast(base.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_power, (ctypes.cast(base.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_negative, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_negative, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_negative, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_negative, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_negative, (ctypes.cast(base.contents.tp_as_number.contents.nb_negative, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_positive, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_positive, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_positive, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_positive, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_positive, (ctypes.cast(base.contents.tp_as_number.contents.nb_positive, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_absolute, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_absolute, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_absolute, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_absolute, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_absolute, (ctypes.cast(base.contents.tp_as_number.contents.nb_absolute, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_nonzero, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_nonzero, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_nonzero, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_nonzero, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_nonzero, (ctypes.cast(base.contents.tp_as_number.contents.nb_nonzero, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_invert, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_invert, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_invert, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_invert, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_invert, (ctypes.cast(base.contents.tp_as_number.contents.nb_invert, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_lshift, (ctypes.cast(base.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_rshift, (ctypes.cast(base.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_and, (ctypes.cast(base.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_xor, (ctypes.cast(base.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_or, (ctypes.cast(base.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_coerce, (ctypes.cast(base.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_int, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_int, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_int, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_int, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_int, (ctypes.cast(base.contents.tp_as_number.contents.nb_int, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_long, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_long, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_long, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_long, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_long, (ctypes.cast(base.contents.tp_as_number.contents.nb_long, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_float, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_float, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_float, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_float, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_float, (ctypes.cast(base.contents.tp_as_number.contents.nb_float, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_oct, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_oct, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_oct, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_oct, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_oct, (ctypes.cast(base.contents.tp_as_number.contents.nb_oct, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_hex, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_hex, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_hex, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_hex, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_hex, (ctypes.cast(base.contents.tp_as_number.contents.nb_hex, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_add, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_add, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_add, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_add, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_add, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_add, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_subtract, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_subtract, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_subtract, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_subtract, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_subtract, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_subtract, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_multiply, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_multiply, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_multiply, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_multiply, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_multiply, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_multiply, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_divide, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_divide, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_divide, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_divide, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_divide, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_divide, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_remainder, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_remainder, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_remainder, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_remainder, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_remainder, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_remainder, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_power, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_power, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_power, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_power, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_power, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_power, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_lshift, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_lshift, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_lshift, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_lshift, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_lshift, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_lshift, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_rshift, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_rshift, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_rshift, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_rshift, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_rshift, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_rshift, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_and, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_and, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_and, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_and, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_and, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_and, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_xor, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_xor, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_xor, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_xor, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_xor, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_xor, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_or, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_or, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_or, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_or, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_or, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_or, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_true_divide, (ctypes.cast(base.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_floor_divide, (ctypes.cast(base.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_true_divide, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_true_divide, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_true_divide, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_true_divide, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_true_divide, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_true_divide, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_inplace_floor_divide, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_floor_divide, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_floor_divide, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_inplace_floor_divide, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_inplace_floor_divide, (ctypes.cast(base.contents.tp_as_number.contents.nb_inplace_floor_divide, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_number.contents.nb_index, (ctypes.cast(base.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(basebase, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(basebase.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(basebase, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_length, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_length, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_length, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_length, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_length, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_length, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_concat, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_repeat, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_item, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_slice, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_ass_item, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_ass_slice, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_contains, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_contains, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_contains, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_contains, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_contains, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_contains, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_inplace_concat, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_sequence.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_sequence.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_sequence.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_sequence.contents.sq_inplace_repeat, (ctypes.cast(base.contents.tp_as_sequence.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(basebase, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(basebase.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(basebase, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_mapping.contents.mp_length, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping.contents.mp_length, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping.contents.mp_length, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_mapping.contents.mp_length, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_mapping.contents.mp_length, (ctypes.cast(base.contents.tp_as_mapping.contents.mp_length, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_mapping.contents.mp_subscript, (ctypes.cast(base.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_mapping.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_mapping.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_mapping.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_mapping.contents.mp_ass_subscript, (ctypes.cast(base.contents.tp_as_mapping.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(basebase, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(basebase.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(basebase, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_buffer.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_buffer.contents.bf_getreadbuffer, (ctypes.cast(base.contents.tp_as_buffer.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer.contents.bf_getwritebuffer, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getwritebuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getwritebuffer, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_buffer.contents.bf_getwritebuffer, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_buffer.contents.bf_getwritebuffer, (ctypes.cast(base.contents.tp_as_buffer.contents.bf_getwritebuffer, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_buffer.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_buffer.contents.bf_getsegcount, (ctypes.cast(base.contents.tp_as_buffer.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer.contents.bf_getcharbuffer, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getcharbuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getcharbuffer, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_buffer.contents.bf_getcharbuffer, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_buffer.contents.bf_getcharbuffer, (ctypes.cast(base.contents.tp_as_buffer.contents.bf_getcharbuffer, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_buffer.contents.bf_getbuffer, (ctypes.cast(base.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_as_buffer.contents.bf_releasebuffer, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_releasebuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_as_buffer.contents.bf_releasebuffer, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_as_buffer.contents.bf_releasebuffer, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_as_buffer.contents.bf_releasebuffer, (ctypes.cast(base.contents.tp_as_buffer.contents.bf_releasebuffer, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(basebase, (ctypes.cast(intp._storePtr(base.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_dealloc, (ctypes.cast(base.contents.tp_dealloc, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_print, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_print, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_print, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_print, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_print, (ctypes.cast(base.contents.tp_print, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_getattr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_getattro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_getattr, (ctypes.cast(base.contents.tp_getattr, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_getattro, (ctypes.cast(base.contents.tp_getattro, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_setattr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_setattro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_setattr, (ctypes.cast(base.contents.tp_setattr, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_setattro, (ctypes.cast(base.contents.tp_setattro, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_repr, (ctypes.cast(base.contents.tp_repr, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_call, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_call, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_call, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_call, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_call, (ctypes.cast(base.contents.tp_call, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_str, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_str, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_str, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_str, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_str, (ctypes.cast(base.contents.tp_str, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((type_a.contents.tp_flags.value & base.contents.tp_flags.value))).value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_richcompare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_hash, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_compare, (ctypes.cast(base.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_richcompare, (ctypes.cast(base.contents.tp_richcompare, ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(type_a.contents.tp_hash, (ctypes.cast(base.contents.tp_hash, ctypes_wrapped.c_void_p).value or 0)) if g.Py_Py3kWarningFlag.value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_hash, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_hash, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(g.PyObject)), g.PyObject_HashNotImplemented), ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.overrides_name(type_a, ctypes.cast(intp._make_string('__hash__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value)).value: if ctypes_wrapped.c_int(int(g.overrides_name(type_a, ctypes.cast(intp._make_string('__eq__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value: if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('Overriding __eq__ blocks inheritance of __hash__ in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_compare, (ctypes.cast(base.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((type_a.contents.tp_flags.value & base.contents.tp_flags.value))).value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_iter, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_iter, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_iter, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_iter, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_iter, (ctypes.cast(base.contents.tp_iter, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_iternext, (ctypes.cast(base.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((type_a.contents.tp_flags.value & base.contents.tp_flags.value))).value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_descr_get, (ctypes.cast(base.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_descr_set, (ctypes.cast(base.contents.tp_descr_set, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((g.Py_ssize_t(int((not type_a.contents.tp_dictoffset.value))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((base.contents.tp_dictoffset.value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((base.contents.tp_dictoffset.value != basebase.contents.tp_dictoffset.value)).value)).value)).value)).value: helpers.assign(type_a.contents.tp_dictoffset, base.contents.tp_dictoffset.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_init, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_init, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_init, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_init, (ctypes.cast(base.contents.tp_init, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_alloc, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_alloc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_alloc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_alloc, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_alloc, (ctypes.cast(base.contents.tp_alloc, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_is_gc, (ctypes.cast(base.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value == ctypes_wrapped.c_ulong(int((base.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(type_a.contents.tp_free, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(basebase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(basebase.contents.tp_free, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.assignPtr(type_a.contents.tp_free, (ctypes.cast(base.contents.tp_free, ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(g.PyObject)), g._PyObject_Del), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(type_a.contents.tp_free, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), g.PyObject_GC_Del), ctypes_wrapped.c_void_p).value or 0)) del basebase del type_a del base return @staticmethod def PyType_Ready(type_a): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) dict_a = ctypes.POINTER(g.PyObject)() bases = ctypes.POINTER(g.PyObject)() base = ctypes.POINTER(g.PyTypeObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() if (not ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(12L)).value))).value))).value): goto = 1 continue values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(13L)).value))).value))).value == ctypes_wrapped.c_int(int(0L)).value))) helpers.augAssign(type_a.contents.tp_flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(13L)).value))).value) helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyBaseObject_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 2 continue helpers.assignPtr(base, (ctypes.cast(intp._storePtr(helpers.assignPtr(type_a.contents.tp_base, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyBaseObject_Type)), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(base, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(base.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 3 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyType_Ready(base))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue goto = u'error' continue if (goto == 4): goto = None if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 5 continue helpers.assignPtr(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(ctypes.cast(base, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0)) if (goto == 5): goto = None if (goto is None): helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(type_a.contents.tp_bases), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue if (not ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), base), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue goto = u'error' continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_bases, (ctypes.cast(intp._storePtr(bases), ctypes_wrapped.c_void_p).value or 0)) if (goto == 6): goto = None if (goto is None): helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(type_a.contents.tp_dict), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue goto = u'error' continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(type_a.contents.tp_dict, (ctypes.cast(intp._storePtr(dict_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_operators(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'error' continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_methods, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_methods(type_a, type_a.contents.tp_methods))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue goto = u'error' continue if (goto == 14): goto = None if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_members, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_members(type_a, type_a.contents.tp_members))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue goto = u'error' continue if (goto == 16): goto = None if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_getset, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_getset(type_a, type_a.contents.tp_getset))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue goto = u'error' continue if (goto == 18): goto = None if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.mro_internal(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue goto = u'error' continue if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_base, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue g.inherit_special(type_a, type_a.contents.tp_base) if (goto == 20): goto = None if (goto is None): helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(type_a.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not True): goto = 21 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(1L)).value) if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not first_iteration): goto = 25 continue first_iteration = False goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 27 continue pass goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): b = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue g.inherit_slots(type_a, ctypes.cast(b, ctypes.POINTER(g.PyTypeObject))) if (goto == 28): goto = None if (goto is None): del b goto = 22 continue if (goto == 23): goto = None if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_free, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), g.PyObject_Free), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value): goto = 29 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("type '%.100s' participates in gc and is a base type but has inappropriate tp_free slot"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'error' continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_doc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue doc = ctypes.cast(intp._getPtr(g.PyString_FromString(type_a.contents.tp_doc), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 33 continue goto = u'error' continue if (goto == 33): goto = None if (goto is None): ctypes_wrapped.c_int(int(g.PyDict_SetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), doc))) if (goto == 34): goto = None if (goto is None): if (not True): goto = 35 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(doc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 37 continue pass goto = 36 continue if (goto == 37): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 36): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 39 continue continue goto = 38 continue if (goto == 39): goto = None if (goto is None): goto = 35 continue if (goto == 38): goto = None if (goto is None): goto = 34 continue if (goto == 35): goto = None if (goto is None): del doc goto = 31 continue if (goto == 32): goto = None if (goto is None): ctypes_wrapped.c_int(int(g.PyDict_SetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g._Py_NoneStruct)))) if (goto == 31): goto = None if (goto == 30): goto = None if (goto is None): helpers.assignPtr(base, (ctypes.cast(intp._storePtr(type_a.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(base, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 40 continue if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 41 continue helpers.assignPtr(type_a.contents.tp_as_number, (ctypes.cast(intp._storePtr(base.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue helpers.assignPtr(type_a.contents.tp_as_sequence, (ctypes.cast(intp._storePtr(base.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if (goto == 42): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 43 continue helpers.assignPtr(type_a.contents.tp_as_mapping, (ctypes.cast(intp._storePtr(base.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)) if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue helpers.assignPtr(type_a.contents.tp_as_buffer, (ctypes.cast(intp._storePtr(base.contents.tp_as_buffer), ctypes_wrapped.c_void_p).value or 0)) if (goto == 44): goto = None if (goto == 40): goto = None if (goto is None): helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(type_a.contents.tp_bases), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not True): goto = 45 continue first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 46): goto = None if (goto is None): if (not True): goto = 47 continue if (not first_iteration_a): goto = 49 continue first_iteration_a = False goto = 48 continue if (goto == 49): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 48): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 51 continue pass goto = 50 continue if (goto == 51): goto = None if (goto is None): goto = 47 continue if (goto == 50): goto = None if (goto is None): b = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_subclass(ctypes.cast(b, ctypes.POINTER(g.PyTypeObject)), type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 52 continue goto = u'error' continue if (goto == 52): goto = None if (goto is None): del b goto = 46 continue if (goto == 47): goto = None if (goto == 45): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_dict, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(type_a.contents.tp_flags, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(13L)).value))).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(12L)).value))).value))).value) return ctypes_wrapped.c_int(int(0L)).value if (goto == u'error'): goto = None if (goto is None): helpers.augAssign(type_a.contents.tp_flags, u'&=', ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(13L)).value))).value))).value) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del type_a del i del dict_a del n del bases del base return ctypes_wrapped.c_int().value break @staticmethod def add_subclass(base, type_a): base = ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) i = g.Py_ssize_t() result = ctypes_wrapped.c_int() list_a = ctypes.POINTER(g.PyObject)() ref = ctypes.POINTER(g.PyObject)() newobj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(base.contents.tp_subclasses), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(base.contents.tp_subclasses, (ctypes.cast(intp._storePtr(helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyWeakref_NewRef(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(i, ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(ref, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_RefType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g._PyWeakref_RefType)))).value))) if ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(g.PyList_SetItem(list_a, i, newobj))).value helpers.assign(result, ctypes_wrapped.c_int(int(g.PyList_Append(list_a, newobj))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return result.value del type_a del i del newobj del list_a del base del result del ref return ctypes_wrapped.c_int().value @staticmethod def remove_subclass(base, type_a): base = ctypes.cast(base, ctypes.POINTER(g.PyTypeObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) i = g.Py_ssize_t() list_a = ctypes.POINTER(g.PyObject)() ref = ctypes.POINTER(g.PyObject)() helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(base.contents.tp_subclasses), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(i, ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(ref, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_RefType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g._PyWeakref_RefType)))).value))) if ctypes_wrapped.c_int(((ctypes.cast((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: ctypes_wrapped.c_int(int(g.PySequence_DelItem(list_a, i))) return del i del type_a del base del ref del list_a return @staticmethod def check_num_args(ob, n): ob = ctypes.cast(ob, ctypes.POINTER(g.PyObject)) n = ctypes_wrapped.c_int(int(n.value)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ob, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('PyArg_UnpackTuple() argument list is not a tuple'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((n.value == ctypes.cast(ob, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: return ctypes_wrapped.c_int(int(1L)).value intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected %d arguments, got %zd'), ctypes.POINTER(ctypes_wrapped.c_byte)), n, ctypes.cast(ob, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del ob del n return ctypes_wrapped.c_int().value @staticmethod def wrap_lenfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.lenfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.lenfunc) res = g.Py_ssize_t() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(0L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(res.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del res del self del args del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_inquirypred(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.inquiry((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.inquiry) res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(0L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(res.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del res del self del args del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_binaryfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.binaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.binaryfunc) other = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(other, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args del other del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_binaryfunc_l(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.binaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.binaryfunc) other = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(other, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((self.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value))).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(other.contents.ob_type, self.contents.ob_type))).value))).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args del other del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_binaryfunc_r(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.binaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.binaryfunc) other = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(other, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((self.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value))).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(other.contents.ob_type, self.contents.ob_type))).value))).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, other, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args del other del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_coercefunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.coercion((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.coercion) other = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(other, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ok, helpers.checkedFuncPtrCall(func, ctypes.pointer(self), ctypes.pointer(other)).value) if ctypes_wrapped.c_int((ok.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ok.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(res, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(res, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(other), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del ok del res del self del args del other del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_ternaryfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ternaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ternaryfunc) other = ctypes.POINTER(g.PyObject)() third = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(other), ctypes.pointer(third)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, other, third), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del third del self del args del other del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_ternaryfunc_r(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ternaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ternaryfunc) other = ctypes.POINTER(g.PyObject)() third = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(other), ctypes.pointer(third)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, other, self, third), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del third del self del args del other del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_unaryfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.unaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.unaryfunc) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(0L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_indexargfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizeargfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizeargfunc) o = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(o)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(i, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(o, g.PyExc_OverflowError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del self del args del o del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def getindex(self, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() helpers.assign(i, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(arg, g.PyExc_OverflowError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: sq = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) if ctypes_wrapped.c_int(((ctypes.cast(sq, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(sq.contents.sq_length, ctypes_wrapped.c_void_p).value or 0))).value: n = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(sq.contents.sq_length, self).value)) if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.augAssign(i, u'+=', n.value) del n del sq return i.value del i del self del arg return g.Py_ssize_t().value @staticmethod def wrap_sq_item(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizeargfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizeargfunc) arg = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(i, g.Py_ssize_t(int(g.getindex(self, arg))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))) values.assert_a.value(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int(0L)).value del i del self del args del func del arg del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_ssizessizeargfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizessizeargfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizessizeargfunc) i = g.Py_ssize_t() j = g.Py_ssize_t() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('nn'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(i), ctypes.pointer(j)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, i, j), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del j del i del self del args del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_sq_setitem(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizeobjargproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizeobjargproc) i = g.Py_ssize_t() res = ctypes_wrapped.c_int() arg = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(arg), ctypes.pointer(value)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(i, g.Py_ssize_t(int(g.getindex(self, arg))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, i, value).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del i del res del self del args del value del func del arg del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_sq_delitem(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizeobjargproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizeobjargproc) i = g.Py_ssize_t() res = ctypes_wrapped.c_int() arg = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(i, g.Py_ssize_t(int(g.getindex(self, arg))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, i, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del i del res del self del args del func del arg del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_ssizessizeobjargproc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizessizeobjargproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizessizeobjargproc) i = g.Py_ssize_t() j = g.Py_ssize_t() res = ctypes_wrapped.c_int() value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('nnO'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(i), ctypes.pointer(j), ctypes.pointer(value)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, i, j, value).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del j del i del res del self del args del value del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_delslice(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.ssizessizeobjargproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ssizessizeobjargproc) i = g.Py_ssize_t() j = g.Py_ssize_t() res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('nn'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(i), ctypes.pointer(j)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, i, j, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del j del i del res del self del args del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_objobjproc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.objobjproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.objobjproc) res = ctypes_wrapped.c_int() value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(res, helpers.checkedFuncPtrCall(func, self, value).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(res.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self del args del value del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_objobjargproc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.objobjargproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.objobjargproc) res = ctypes_wrapped.c_int() key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(key), ctypes.pointer(value)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, key, value).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del func del res del self del args del value del key del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_delitem(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.objobjargproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.objobjargproc) res = ctypes_wrapped.c_int() key = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(key, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(res, helpers.checkedFuncPtrCall(func, self, key, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del func del res del self del args del key del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_cmpfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.cmpfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.cmpfunc) res = ctypes_wrapped.c_int() other = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(other, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%s.__cmp__(x,y) requires y to be a '%s', not a '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, other).value) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(res.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self del args del other del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def hackcheck(self, func, what): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) func = ctypes.cast(func, g.setattrofunc) what = ctypes.cast(what, ctypes.POINTER(ctypes_wrapped.c_byte)) type_a = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) while ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_ulong(int((type_a.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value)).value: helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(type_a.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_setattro, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("can't apply this %s to %s object"), ctypes.POINTER(ctypes_wrapped.c_byte)), what, type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(1L)).value del type_a del self del what del func return ctypes_wrapped.c_int().value @staticmethod def wrap_setattr(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.setattrofunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.setattrofunc) res = ctypes_wrapped.c_int() name = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(name), ctypes.pointer(value)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.hackcheck(self, func, ctypes.cast(intp._make_string('__setattr__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, name, value).value) if ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del name del res del self del args del value del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_delattr(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.setattrofunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.setattrofunc) res = ctypes_wrapped.c_int() name = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(name, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.hackcheck(self, func, ctypes.cast(intp._make_string('__delattr__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self, name, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value) if ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del name del res del self del args del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_hashfunc(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.hashfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.hashfunc) res = ctypes_wrapped.c_long() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(0L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(res, helpers.checkedFuncPtrCall(func, self).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(res), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del res del self del args del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_call(self, args, wrapped, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) func = ctypes.cast(g.ternaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.ternaryfunc) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args del kwds del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_richcmpfunc(self, args, wrapped, op): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) op = ctypes_wrapped.c_int(int(op.value)) func = ctypes.cast(g.richcmpfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.richcmpfunc) other = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(other, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, other, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del other del func del wrapped del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def richcmp_lt(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.wrap_richcmpfunc(self, args, wrapped, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def richcmp_le(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.wrap_richcmpfunc(self, args, wrapped, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def richcmp_eq(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.wrap_richcmpfunc(self, args, wrapped, ctypes_wrapped.c_int(int(2L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def richcmp_ne(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.wrap_richcmpfunc(self, args, wrapped, ctypes_wrapped.c_int(int(3L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def richcmp_gt(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.wrap_richcmpfunc(self, args, wrapped, ctypes_wrapped.c_int(int(4L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def richcmp_ge(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.wrap_richcmpfunc(self, args, wrapped, ctypes_wrapped.c_int(int(5L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_next(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.unaryfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.unaryfunc) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(0L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetNone(g.PyExc_StopIteration) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del wrapped del res del self del args del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_descr_get(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.descrgetfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.descrgetfunc) obj = ctypes.POINTER(g.PyObject)() type_a = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(obj), ctypes.pointer(type_a)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(obj, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(type_a, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('__get__(None, None) is invalid'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, self, obj, type_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del obj del self del args del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_descr_set(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.descrsetfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.descrsetfunc) obj = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() ret = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(obj), ctypes.pointer(value)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(ret, helpers.checkedFuncPtrCall(func, self, obj, value).value) if ctypes_wrapped.c_int((ret.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del obj del self del args del value del ret del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_descr_delete(self, args, wrapped): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) func = ctypes.cast(g.descrsetfunc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.descrsetfunc) obj = ctypes.POINTER(g.PyObject)() ret = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_num_args(args, ctypes_wrapped.c_int(int(1L))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ret, helpers.checkedFuncPtrCall(func, self, obj, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value) if ctypes_wrapped.c_int((ret.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del obj del self del args del ret del func del wrapped return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrap_init(self, args, wrapped, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) func = ctypes.cast(g.initproc((ctypes.cast(wrapped, ctypes_wrapped.c_void_p).value or 0)), g.initproc) if ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(func, self, args, kwds).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del wrapped del self del args del kwds del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tp_new_wrapper(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) type_a = ctypes.POINTER(g.PyTypeObject)() subtype = ctypes.POINTER(g.PyTypeObject)() staticbase = ctypes.POINTER(g.PyTypeObject)() arg0 = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("__new__() called with non-type 'self'"), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value < ctypes_wrapped.c_int(int(1L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s.__new__(): not enough arguments'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(arg0, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(arg0, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s.__new__(X): X is not a type object (%s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, ctypes.cast(arg0, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(subtype, (ctypes.cast(intp._storePtr(ctypes.cast(arg0, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(subtype, type_a))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s.__new__(%s): %s is not a subtype of %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, subtype.contents.tp_name, subtype.contents.tp_name, type_a.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(staticbase, (ctypes.cast(intp._storePtr(subtype), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(staticbase, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_ulong(int((staticbase.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value)).value: helpers.assignPtr(staticbase, (ctypes.cast(intp._storePtr(staticbase.contents.tp_base), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(staticbase, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(staticbase.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s.__new__(%s) is not safe, use %s.__new__()'), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, subtype.contents.tp_name, (ctypes.cast(intp._make_string('?'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(staticbase, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(staticbase.contents.tp_name, ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetSlice(args, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_new, subtype, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del type_a del staticbase del kwds del arg0 del res del self del args del subtype return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) tp_new_methoddef = (structs.PyMethodDef * 2)() # TODO init tp_new_methoddef with (structs.PyMethodDef * 2)(structs.PyMethodDef(ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, tp_new_wrapper), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def add_tp_new_wrapper(type_a): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) func = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(ctypes.cast(g.tp_new_methoddef, ctypes.POINTER(g.PyMethodDef)), ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int(g.PyDict_SetItemString(type_a.contents.tp_dict, ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte)), func))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del type_a del func return ctypes_wrapped.c_int().value @staticmethod def method_is_overloaded(left, right, name): left = ctypes.cast(left, ctypes.POINTER(g.PyObject)) right = ctypes.cast(right, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) a = ctypes.POINTER(g.PyObject)() b = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int() helpers.assignPtr(b, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(ctypes.cast(ctypes.cast(right, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)), name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(ctypes.cast(ctypes.cast(left, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)), name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value helpers.assign(ok, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(a, b, ctypes_wrapped.c_int(int(3L))))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ok.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value return ok.value del a del right del ok del name del b del left return ctypes_wrapped.c_int().value @staticmethod def slot_sq_length(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) len_str = ctypes.POINTER(g.PyObject)() res = ctypes.cast(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__len__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(len_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) len_a = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(len_a, g.Py_ssize_t(int(g.PyInt_AsSsize_t(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('__len__() should return >= 0'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return len_a.value del res del self del len_a del len_str return g.Py_ssize_t().value @staticmethod def slot_sq_item(self, i): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) getitem_str_a = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() ival = ctypes.POINTER(g.PyObject)() retval = ctypes.POINTER(g.PyObject)() f = g.descrgetfunc() if ctypes_wrapped.c_int(((ctypes.cast(getitem_str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(getitem_str_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(getitem_str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, getitem_str_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(f, (ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) else: helpers.assignPtr(func, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, func, self, ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ival, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ival, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ival), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) else: g.PyErr_SetObject(g.PyExc_AttributeError, getitem_str_a) while True: if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(ival, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ival, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ival, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ival, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del f del i del self del args del func del getitem_str_a del ival del retval return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_sq_slice(self, i, j): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) j = g.Py_ssize_t(int(j.value)) getslice_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('in 3.x, __getslice__ has been removed; use __getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__getslice__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(getslice_str), ctypes.cast(intp._make_string('nn'), ctypes.POINTER(ctypes_wrapped.c_byte)), i, j), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del self del j del getslice_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_sq_ass_item(self, index, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) index = g.Py_ssize_t(int(index.value)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() delitem_str = ctypes.POINTER(g.PyObject)() setitem_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__delitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(delitem_str), ctypes.cast(intp._make_string('(n)'), ctypes.POINTER(ctypes_wrapped.c_byte)), index), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__setitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(setitem_str), ctypes.cast(intp._make_string('(nO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), index, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del index del res del self del value del delitem_str del setitem_str return ctypes_wrapped.c_int().value @staticmethod def slot_sq_ass_slice(self, i, j, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) j = g.Py_ssize_t(int(j.value)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() delslice_str = ctypes.POINTER(g.PyObject)() setslice_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('in 3.x, __delslice__ has been removed; use __delitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__delslice__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(delslice_str), ctypes.cast(intp._make_string('(nn)'), ctypes.POINTER(ctypes_wrapped.c_byte)), i, j), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('in 3.x, __setslice__ has been removed; use __setitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__setslice__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(setslice_str), ctypes.cast(intp._make_string('(nnO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), i, j, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del delslice_str del setslice_str del i del res del self del j del value return ctypes_wrapped.c_int().value @staticmethod def slot_sq_contains(self, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() result = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) contains_str = ctypes.POINTER(g.PyObject)() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(self, ctypes.cast(intp._make_string('__contains__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(contains_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(result, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break elif ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(result, ctypes_wrapped.c_int(int(g.Py_ssize_t(int(g._PySequence_IterSearch(self, value, ctypes_wrapped.c_int(int(3L))))).value)).value) return result.value del contains_str del res del self del args del value del result del func return ctypes_wrapped.c_int().value @staticmethod def slot_mp_subscript(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_mp_ass_subscript(self, key, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() delitem_str = ctypes.POINTER(g.PyObject)() setitem_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__delitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(delitem_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__setitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(setitem_str), ctypes.cast(intp._make_string('(OO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), key, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del res del self del value del key del delitem_str del setitem_str return ctypes_wrapped.c_int().value @staticmethod def slot_nb_add(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_add), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_add, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_add), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__radd__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__radd__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__add__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__radd__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_subtract(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_subtract), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_subtract, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_subtract), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rsub__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rsub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__sub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rsub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_multiply(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_multiply), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_multiply, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_multiply), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rmul__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rmul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__mul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rmul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_divide(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_divide), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_divide, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_divide), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rdiv__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rdiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__div__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rdiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_remainder(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_remainder), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_remainder, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_remainder), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rmod__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__mod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_divmod(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_divmod), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_divmod, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_divmod), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rdivmod__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rdivmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__divmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rdivmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_power_binary(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_power), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_power), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rpow__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rpow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__pow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rpow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_power(self, other, modulus): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) modulus = ctypes.cast(modulus, ctypes.POINTER(g.PyObject)) pow_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(modulus, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.slot_nb_power_binary(self, other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_power, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_power), ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__pow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(pow_str), ctypes.cast(intp._make_string('(OO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other, modulus), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del pow_str del self del other del modulus return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_negative(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__neg__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_positive(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__pos__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_absolute(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__abs__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_nonzero(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() nonzero_str = ctypes.POINTER(g.PyObject)() len_str = ctypes.POINTER(g.PyObject)() result = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) using_len = ctypes_wrapped.c_int() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(self, ctypes.cast(intp._make_string('__nonzero__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(nonzero_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(self, ctypes.cast(intp._make_string('__len__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(len_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(using_len, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: temp = ctypes.cast(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(temp.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyBool_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(result, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(temp))).value) else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s should return bool or int, returned %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(intp._make_string('__len__'), ctypes.POINTER(ctypes_wrapped.c_byte)) if using_len.value else ctypes.cast(intp._make_string('__nonzero__'), ctypes.POINTER(ctypes_wrapped.c_byte))), temp.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) helpers.assign(result, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del temp while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return result.value del nonzero_str del using_len del self del args del result del func del len_str return ctypes_wrapped.c_int().value @staticmethod def slot_nb_index(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) index_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__index__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(index_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del index_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_invert(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__invert__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_lshift(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_lshift), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_lshift, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_lshift), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rlshift__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rlshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__lshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rlshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_rshift(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_rshift), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_rshift, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_rshift), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rrshift__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rrshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__rshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rrshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_and(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_and), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_and, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_and), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rand__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rand__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__and__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rand__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_xor(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_xor), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_xor, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_xor), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rxor__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rxor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__xor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rxor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_or(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_or), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_or, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_or), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__ror__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__ror__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__or__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__ror__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_coerce(a, b): a = ctypes.cast(a, ctypes.POINTER(ctypes.POINTER(g.PyObject))) b = ctypes.cast(b, ctypes.POINTER(ctypes.POINTER(g.PyObject))) coerce_str = ctypes.POINTER(g.PyObject)() self = ctypes.cast(a.contents, ctypes.POINTER(g.PyObject)) other = ctypes.cast(b.contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(self.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(self.contents.ob_type.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes.POINTER(g.PyObject)), ctypes.POINTER(ctypes.POINTER(g.PyObject))), g.slot_nb_coerce), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__coerce__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(coerce_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(r, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(2L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string("__coerce__ didn't return a 2-tuple"), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(a.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(r, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(a.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(b.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(r, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(b.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del r if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(other.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(other.contents.ob_type.contents.tp_as_number.contents.nb_coerce, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes.POINTER(g.PyObject)), ctypes.POINTER(ctypes.POINTER(g.PyObject))), g.slot_nb_coerce), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__coerce__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(coerce_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(r, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(2L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string("__coerce__ didn't return a 2-tuple"), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(a.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(r, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(a.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(b.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(r, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(b.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del r return ctypes_wrapped.c_int(int(1L)).value del a del coerce_str del self del b del other return ctypes_wrapped.c_int().value @staticmethod def slot_nb_int(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__int__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_long(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__long__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_float(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__float__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_oct(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__oct__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_hex(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__hex__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_add(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__iadd__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_subtract(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__isub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_multiply(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__imul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_divide(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__idiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_remainder(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__imod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_power(self, arg1, arg2): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) arg2 = ctypes.cast(arg2, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__ipow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str del arg2 return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_lshift(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__ilshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_rshift(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__irshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_and(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__iand__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_xor(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__ixor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_or(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__ior__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_floor_divide(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_floor_divide), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_floor_divide, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_floor_divide), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rfloordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rfloordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__floordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rfloordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_true_divide(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() rcache_str = ctypes.POINTER(g.PyObject)() do_other = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_true_divide), ctypes_wrapped.c_void_p).value or 0))).value)).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_true_divide, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_nb_true_divide), ctypes_wrapped.c_void_p).value or 0))).value)).value: r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((do_other.value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type))).value)).value and ctypes_wrapped.c_int(int(g.method_is_overloaded(self, other, ctypes.cast(intp._make_string('__rtruediv__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rtruediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(do_other, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(self, ctypes.cast(intp._make_string('__truediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(r, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(r, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(r, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del r if do_other.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_maybe(other, ctypes.cast(intp._make_string('__rtruediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(rcache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del do_other del self del other del rcache_str del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_floor_divide(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__ifloordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_nb_inplace_true_divide(self, arg1): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) arg1 = ctypes.cast(arg1, ctypes.POINTER(g.PyObject)) cache_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__itruediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cache_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), arg1), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del arg1 del self del cache_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def half_compare(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() cmp_str = ctypes.POINTER(g.PyObject)() c = g.Py_ssize_t() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__cmp__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cmp_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value helpers.assign(c, ctypes_wrapped.c_long(int(g.PyInt_AsLong(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((c.value > ctypes_wrapped.c_int(int(0L)).value)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(2L)).value del c del res del self del args del cmp_str del other del func return ctypes_wrapped.c_int().value @staticmethod def _PyObject_SlotCompare(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) c = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g._PyObject_SlotCompare), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(c, ctypes_wrapped.c_int(int(g.half_compare(self, other))).value) if ctypes_wrapped.c_int((c.value <= ctypes_wrapped.c_int(int(1L)).value)).value: return c.value if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_compare, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g._PyObject_SlotCompare), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(c, ctypes_wrapped.c_int(int(g.half_compare(other, self))).value) if ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value if ctypes_wrapped.c_int((c.value <= ctypes_wrapped.c_int(int(1L)).value)).value: return ctypes_wrapped.c_int(int((- c.value))).value return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes_wrapped.c_void_p), ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(ctypes.cast(other, ctypes_wrapped.c_void_p), ctypes_wrapped.c_void_p).value or 0))).value else ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes_wrapped.c_void_p), ctypes_wrapped.c_void_p).value or 0) > (ctypes.cast(ctypes.cast(other, ctypes_wrapped.c_void_p), ctypes_wrapped.c_void_p).value or 0))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value))).value del self del other del c return ctypes_wrapped.c_int().value @staticmethod def slot_tp_repr(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() repr_str = ctypes.POINTER(g.PyObject)() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__repr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(repr_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(func, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) g.PyErr_Clear() return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('<%s object at %p>'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self del func del repr_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_str(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() str_str = ctypes.POINTER(g.PyObject)() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__str__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(str_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(func, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) else: g.PyErr_Clear() return (ctypes.cast(intp._storePtr(intp._getPtr(g.slot_tp_repr(self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self del str_str del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_hash(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() hash_str = ctypes.POINTER(g.PyObject)() eq_str = ctypes.POINTER(g.PyObject)() cmp_str = ctypes.POINTER(g.PyObject)() h = ctypes_wrapped.c_long() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__hash__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(hash_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: res = ctypes.cast(intp._getPtr(g.PyEval_CallObjectWithKeywords(func, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(h, helpers.checkedFuncPtrCall(g.PyLong_Type.tp_hash, res).value) else: helpers.assign(h, ctypes_wrapped.c_long(int(g.PyInt_AsLong(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del res else: while True: if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_Clear() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__eq__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(eq_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__cmp__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(cmp_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_long(int(g.PyObject_HashNotImplemented(self))).value g.PyErr_Clear() helpers.assign(h, ctypes_wrapped.c_long(int(g._Py_HashPointer(ctypes.cast(self, ctypes_wrapped.c_void_p)))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((h.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(h, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return h.value del hash_str del h del self del cmp_str del eq_str del func return ctypes_wrapped.c_long().value @staticmethod def slot_tp_call(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) call_str = ctypes.POINTER(g.PyObject)() meth = ctypes.cast(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__call__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(call_str)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(meth, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(meth, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(meth, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del kwds del res del self del args del call_str del meth return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_getattro(self, name): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) getattribute_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__getattribute__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(getattribute_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del getattribute_str del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def call_attribute(self, attr, name): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) attr = ctypes.cast(attr, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() descr = ctypes.POINTER(g.PyObject)() f = ctypes.cast(ctypes.cast(attr, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, g.descrgetfunc) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, attr, self, ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value else: helpers.assignPtr(attr, (ctypes.cast(intp._storePtr(descr), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(attr, name, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del attr del descr del f del res del self del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_getattr_hook(self, name): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) getattr_a = ctypes.POINTER(g.PyObject)() getattribute = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() getattribute_str = ctypes.POINTER(g.PyObject)() getattr_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(getattr_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(getattr_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__getattr__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(getattr_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(getattribute_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(getattribute_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__getattribute__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(getattribute_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(getattr_a, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(tp, getattr_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(getattr_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(tp.contents.tp_getattro, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_tp_getattro), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.slot_tp_getattro(self, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(getattr_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(getattribute, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(tp, getattribute_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(getattribute, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(getattribute, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyWrapperDescr_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(getattribute, ctypes.POINTER(g.PyWrapperDescrObject)).contents.d_wrapped, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.PyObject_GenericGetAttr), ctypes_wrapped.c_void_p), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GenericGetAttr(self, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.postfixInc(ctypes.cast(getattribute, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_attribute(self, getattribute, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(getattribute, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(getattribute, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(getattribute, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value)).value: g.PyErr_Clear() helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_attribute(self, getattr_a, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(getattr_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(getattr_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(getattr_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del name del getattr_a del res del self del tp del getattribute del getattribute_str del getattr_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_setattro(self, name, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() delattr_str = ctypes.POINTER(g.PyObject)() setattr_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__delattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(delattr_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__setattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(setattr_str), ctypes.cast(intp._make_string('(OO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), name, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del delattr_str del name del res del self del value del setattr_str return ctypes_wrapped.c_int().value name_op = (ctypes.POINTER(ctypes_wrapped.c_byte) * 6)() # TODO init name_op with (ctypes.POINTER(ctypes_wrapped.c_byte) * 6)(ctypes.cast(intp._make_string('__lt__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__le__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__eq__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__ne__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__gt__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__ge__'), ctypes.POINTER(ctypes_wrapped.c_byte))) @staticmethod def half_richcompare(self, other, op): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) func = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() op_str = (ctypes.POINTER(g.PyObject) * 6L)() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, helpers.ptrArithmetic(g.name_op, '+', op.value).contents, ctypes.pointer(helpers.ptrArithmetic(op_str, '+', op.value).contents)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del op_str del res del self del args del other del func del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_richcompare(self, other, op): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_richcompare, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int), g.slot_tp_richcompare), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.half_richcompare(self, other, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_richcompare, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_int), g.slot_tp_richcompare), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.half_richcompare(other, self, helpers.ptrArithmetic(g._Py_SwappedOp, '+', op.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del res del self del other del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_iter(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) func = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() iter_str = ctypes.POINTER(g.PyObject)() getitem_str_a = ctypes.POINTER(g.PyObject)() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__iter__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(iter_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: args = ctypes.POINTER(g.PyObject)() helpers.assignPtr(args, (ctypes.cast(intp._storePtr(helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del args g.PyErr_Clear() helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(getitem_str_a)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%.200s' object is not iterable"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.PySeqIter_New(self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del getitem_str_a del res del self del iter_str del func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_iternext(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) next_str = ctypes.POINTER(g.PyObject)() return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('next'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(next_str), ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del next_str return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_descr_get(self, obj, type_a): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) tp = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyTypeObject)) get = ctypes.POINTER(g.PyObject)() get_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(get_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(get_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__get__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(get_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(get, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(tp, get_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(tp.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject), ctypes.POINTER(g.PyObject)), g.slot_tp_descr_get), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(tp.contents.tp_descr_get, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(get, self, obj, type_a, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del obj del get del self del get_str del tp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_descr_set(self, target, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) target = ctypes.cast(target, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() del_str = ctypes.POINTER(g.PyObject)() set_str = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__delete__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(del_str), ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), target), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_method(self, ctypes.cast(intp._make_string('__set__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(set_str), ctypes.cast(intp._make_string('(OO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), target, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del target del res del self del value del set_str del del_str return ctypes_wrapped.c_int().value @staticmethod def slot_tp_init(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) init_str = ctypes.POINTER(g.PyObject)() meth = ctypes.cast(intp._getPtr(g.lookup_method(self, ctypes.cast(intp._make_string('__init__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(init_str)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(meth, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(meth, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(meth, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("__init__() should return None, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del kwds del res del self del args del init_str del meth return ctypes_wrapped.c_int().value @staticmethod def slot_tp_new(type_a, args, kwds): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) new_str = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() newargs = ctypes.POINTER(g.PyObject)() x = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(new_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(new_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(new_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), new_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(newargs, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(newargs, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(type_a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(x, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(newargs, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(func, newargs, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newargs, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newargs, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) del type_a del kwds del i del new_str del args del n del func del x del newargs return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def slot_tp_del(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) del_str = ctypes.POINTER(g.PyObject)() del_a = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() error_type = ctypes.POINTER(g.PyObject)() error_value = ctypes.POINTER(g.PyObject)() error_traceback = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((self.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(self.contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) g.PyErr_Fetch(ctypes.pointer(error_type), ctypes.pointer(error_value), ctypes.pointer(error_traceback)) helpers.assignPtr(del_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.lookup_maybe(self, ctypes.cast(intp._make_string('__del__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(del_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(del_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(del_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_WriteUnraisable(del_a) else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_Restore(error_type, error_value, error_traceback) values.assert_a.value(ctypes_wrapped.c_int((self.contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((helpers.prefixDec(self.contents.ob_refcnt).value == ctypes_wrapped.c_int(int(0L)).value)).value: return refcnt = g.Py_ssize_t(int(self.contents.ob_refcnt.value)) helpers.assign(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(self.contents.ob_refcnt, refcnt.value) del refcnt values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value))) del error_value del error_traceback del res del self del error_type del del_str del del_a return slotdef = structs.wrapperbase slotdefs = (slotdef * 100)() # TODO init slotdefs with (slotdef * 100)(structs.wrapperbase(ctypes.cast(intp._make_string('__str__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(56)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__repr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(56)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getattribute__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(64)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(64)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__setattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(72)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__delattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(72)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__cmp__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(80)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), _PyObject_SlotCompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_cmpfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__repr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(88)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_tp_repr), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__hash__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(120)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject)), slot_tp_hash), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_hashfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__call__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(128)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_call), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(wrapperfunc, wrap_call), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1L))), structs.wrapperbase(ctypes.cast(intp._make_string('__str__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(136)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_tp_str), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getattribute__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(144)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_getattr_hook), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(144)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_getattr_hook), ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__setattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(152)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_setattro), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_setattr), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__delattr__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(152)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_setattro), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_delattr), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__lt__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), slot_tp_richcompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), richcmp_lt), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__le__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), slot_tp_richcompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), richcmp_le), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__eq__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), slot_tp_richcompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), richcmp_eq), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ne__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), slot_tp_richcompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), richcmp_ne), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__gt__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), slot_tp_richcompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), richcmp_gt), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ge__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), slot_tp_richcompare), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), richcmp_ge), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__iter__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(216)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_tp_iter), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('next'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(224)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_tp_iternext), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_next), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__get__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(272)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_descr_get), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_descr_get), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__set__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(280)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_descr_set), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_descr_set), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__delete__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(280)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_descr_set), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_descr_delete), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__init__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(296)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_init), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(wrapperfunc, wrap_init), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1L))), structs.wrapperbase(ctypes.cast(intp._make_string('__new__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(312)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyTypeObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_tp_new), ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__del__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(376)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), slot_tp_del), ctypes_wrapped.c_void_p), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__add__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(392)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_add), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__radd__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(392)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_add), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__sub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(400)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_subtract), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rsub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(400)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_subtract), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__mul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(408)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_multiply), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rmul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(408)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_multiply), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__div__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(416)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rdiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(416)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__mod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(424)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_remainder), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(424)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_remainder), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__divmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(432)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_divmod), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rdivmod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(432)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_divmod), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__pow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(440)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_power), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_ternaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rpow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(440)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_power), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_ternaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__neg__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(448)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_negative), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__pos__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(456)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_positive), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__abs__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(464)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_absolute), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__nonzero__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(472)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject)), slot_nb_nonzero), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_inquirypred), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__invert__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(480)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_invert), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__lshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(488)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_lshift), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rlshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(488)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_lshift), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(496)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_rshift), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rrshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(496)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_rshift), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__and__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(504)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_and), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rand__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(504)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_and), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__xor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(512)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_xor), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rxor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(512)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_xor), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__or__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(520)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_or), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ror__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(520)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_or), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__coerce__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(528)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(ctypes.POINTER(PyObject)), ctypes.POINTER(ctypes.POINTER(PyObject))), slot_nb_coerce), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_coercefunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__int__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(536)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_int), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__long__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(544)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_long), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__float__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(552)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_float), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__oct__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(560)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_oct), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__hex__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(568)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_hex), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__iadd__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(576)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_add), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__isub__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(584)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_subtract), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__imul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(592)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_multiply), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__idiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(600)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__imod__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(608)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_remainder), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ipow__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(616)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_power), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ilshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(624)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_lshift), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__irshift__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(632)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_rshift), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__iand__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(640)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_and), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ixor__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(648)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_xor), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ior__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(656)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_or), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__floordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(664)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_floor_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rfloordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(664)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_floor_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__truediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(672)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_true_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_l), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rtruediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(672)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_true_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc_r), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__ifloordiv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(680)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_floor_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__itruediv__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(688)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_nb_inplace_true_divide), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__index__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(696)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), slot_nb_index), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_unaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__len__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(704)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(Py_ssize_t), ctypes.POINTER(PyObject)), slot_sq_length), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_lenfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(712)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_mp_subscript), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__setitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(720)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_mp_ass_subscript), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_objobjargproc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__delitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(720)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_mp_ass_subscript), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_delitem), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__len__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(728)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(Py_ssize_t), ctypes.POINTER(PyObject)), slot_sq_length), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_lenfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__add__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(736)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__mul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(744)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_indexargfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__rmul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(744)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_indexargfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(752)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t), slot_sq_item), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_sq_item), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__getslice__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(760)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t), slot_sq_slice), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_ssizessizeargfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__setitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(768)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject)), slot_sq_ass_item), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_sq_setitem), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__delitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(768)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject)), slot_sq_ass_item), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_sq_delitem), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__setslice__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(776)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject)), slot_sq_ass_slice), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_ssizessizeobjargproc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__delslice__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(776)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject)), slot_sq_ass_slice), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_delslice), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__contains__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(784)).value)), ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), slot_sq_contains), ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_objobjproc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__iadd__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(792)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_binaryfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(ctypes.cast(intp._make_string('__imul__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(800)).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p), wrap_indexargfunc), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.wrapperbase(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def slotptr(type_a, ioffset): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) ioffset = ctypes_wrapped.c_int(int(ioffset.value)) ptr = ctypes.POINTER(ctypes_wrapped.c_byte)() offset = ctypes_wrapped.c_long(int(ioffset.value)) values.assert_a.value(ctypes_wrapped.c_int((offset.value >= ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(offset.value)).value < ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(808)).value)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(offset.value)).value >= ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(728)).value)).value)).value: helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(ctypes.cast(type_a.contents.tp_as_sequence, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(offset, u'-=', ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(728)).value)).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(offset.value)).value >= ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(704)).value)).value)).value: helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(ctypes.cast(type_a.contents.tp_as_mapping, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(offset, u'-=', ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(704)).value)).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(offset.value)).value >= ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(392)).value)).value)).value: helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(ctypes.cast(type_a.contents.tp_as_number, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(offset, u'-=', ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(392)).value)).value) else: helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(ctypes.cast(type_a, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssignPtr(ptr, u'+=', offset.value) return (ctypes.cast(intp._storePtr(ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0) del type_a del offset del ptr del ioffset return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_void_p)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def resolve_slotdups(type_a, name): first_iteration_a = None first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) pname = ctypes.POINTER(g.PyObject)() ptrs = (ctypes.POINTER(g.slotdef) * 10L)() p = ctypes.POINTER(g.slotdef)() pp = ctypes.POINTER(ctypes.POINTER(g.slotdef))() res = ctypes.POINTER(ctypes_wrapped.c_void_p)() ptr = ctypes.POINTER(ctypes_wrapped.c_void_p)() if ctypes_wrapped.c_int(((ctypes.cast(pname, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(pname, (ctypes.cast(intp._storePtr(name), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(pp, (ctypes.cast(intp._storePtr(ptrs), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(g.slotdefs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if (ctypes.cast(p.contents.name_strobj, ctypes_wrapped.c_void_p).value or 0): pass else: break if ctypes_wrapped.c_int(((ctypes.cast(p.contents.name_strobj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(helpers.postfixIncPtr(pp), (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0)).contents helpers.assignPtr(pp.contents, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration_a = True helpers.assignPtr(pp, (ctypes.cast(intp._storePtr(ptrs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixIncPtr(pp) if (ctypes.cast(pp.contents, ctypes_wrapped.c_void_p).value or 0): pass else: break helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(intp._getPtr(g.slotptr(type_a, pp.contents.contents.offset), ctypes.POINTER(ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(ptr.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: continue if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ptr), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del type_a del name del res del pp del ptrs del p del pname del ptr return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_void_p)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def update_one_slot(type_a, p): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) p = ctypes.cast(p, ctypes.POINTER(g.slotdef)) descr = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyWrapperDescrObject)() generic = ctypes_wrapped.c_void_p() specific = ctypes_wrapped.c_void_p() use_generic = ctypes_wrapped.c_int() offset = ctypes_wrapped.c_int(int(p.contents.offset.value)) ptr = ctypes.cast(intp._getPtr(g.slotptr(type_a, offset), ctypes.POINTER(ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes_wrapped.c_void_p)) if ctypes_wrapped.c_int(((ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: helpers.prefixIncPtr(p) if ctypes_wrapped.c_int((p.contents.offset.value == offset.value)).value: continue else: break return (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0) while True: helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyType_Lookup(type_a, p.contents.name_strobj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(type_a.contents.tp_iternext), ctypes.POINTER(ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(specific, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)), g._PyObject_NextNotImplemented), ctypes_wrapped.c_void_p).value or 0)) continue if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyWrapperDescr_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyWrapperDescrObject)).contents.d_base.contents.name_strobj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(p.contents.name_strobj, ctypes_wrapped.c_void_p).value or 0))).value)).value: tptr = ctypes.cast(intp._getPtr(g.resolve_slotdups(type_a, p.contents.name_strobj), ctypes.POINTER(ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes_wrapped.c_void_p)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(tptr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(generic, (ctypes.cast(intp._storePtr(p.contents.function), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(d, (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyWrapperDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(d.contents.d_base.contents.wrapper, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(p.contents.wrapper, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(type_a, d.contents.d_type))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(specific, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(specific, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(d.contents.d_wrapped, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(specific, (ctypes.cast(intp._storePtr(d.contents.d_wrapped), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assign(use_generic, ctypes_wrapped.c_int(int(1L)).value) del tptr elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_meth, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(g.PyCFunction, g.tp_new_wrapper), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(type_a.contents.tp_new), ctypes.POINTER(ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.assignPtr(specific, (ctypes.cast(intp._storePtr(ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(ctypes.pointer(type_a.contents.tp_hash), ctypes.POINTER(ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(specific, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(g.PyObject)), g.PyObject_HashNotImplemented), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assign(use_generic, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(generic, (ctypes.cast(intp._storePtr(p.contents.function), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((helpers.prefixIncPtr(p).contents.offset.value == offset.value)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(specific, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int((not use_generic.value))).value)).value: helpers.assignPtr(ptr.contents, (ctypes.cast(intp._storePtr(specific), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(ptr.contents, (ctypes.cast(intp._storePtr(generic), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0) del type_a del d del descr del generic del specific del p del offset del use_generic del ptr return (ctypes.cast(ctypes.POINTER(g.slotdef)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def update_slots_callback(type_a, data): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) data = ctypes.cast(data, ctypes_wrapped.c_void_p) pp = ctypes.cast(ctypes.cast(data, ctypes.POINTER(ctypes.POINTER(g.slotdef))), ctypes.POINTER(ctypes.POINTER(g.slotdef))) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(pp) if (ctypes.cast(pp.contents, ctypes_wrapped.c_void_p).value or 0): pass else: break intp._getPtr(g.update_one_slot(type_a, pp.contents), ctypes.POINTER(g.slotdef)) return ctypes_wrapped.c_int(int(0L)).value del type_a del data del pp return ctypes_wrapped.c_int().value @staticmethod def init_slotdefs(): first_iteration = None p = ctypes.POINTER(g.slotdef)() initialized_a = ctypes_wrapped.c_int() if initialized_a.value: return if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(g.slotdefs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if (ctypes.cast(p.contents.name, ctypes_wrapped.c_void_p).value or 0): pass else: break values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(1L)).value).contents.name, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((p.contents.offset.value <= helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(1L)).value).contents.offset.value)).value))) helpers.assignPtr(p.contents.name_strobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(p.contents.name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(p.contents.name_strobj, ctypes_wrapped.c_void_p).value or 0))).value: g.Py_FatalError(ctypes.cast(intp._make_string('Out of memory interning slotdef names'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(initialized_a, ctypes_wrapped.c_int(int(1L)).value) del p del initialized_a return @staticmethod def update_slot(type_a, name): first_iteration_a = None first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) ptrs = (ctypes.POINTER(g.slotdef) * 10L)() p = ctypes.POINTER(g.slotdef)() pp = ctypes.POINTER(ctypes.POINTER(g.slotdef))() offset = ctypes_wrapped.c_int() g.PyType_Modified(type_a) g.init_slotdefs() helpers.assignPtr(pp, (ctypes.cast(intp._storePtr(ptrs), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(g.slotdefs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if (ctypes.cast(p.contents.name, ctypes_wrapped.c_void_p).value or 0): pass else: break if ctypes_wrapped.c_int(((ctypes.cast(p.contents.name_strobj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(helpers.postfixIncPtr(pp), (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0)).contents helpers.assignPtr(pp.contents, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration_a = True helpers.assignPtr(pp, (ctypes.cast(intp._storePtr(ptrs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixIncPtr(pp) if (ctypes.cast(pp.contents, ctypes_wrapped.c_void_p).value or 0): pass else: break helpers.assignPtr(p, (ctypes.cast(intp._storePtr(pp.contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(offset, p.contents.offset.value) while ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) > (ctypes.cast(g.slotdefs, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(p, u'-', ctypes_wrapped.c_int(int(1L)).value).contents.offset.value == offset.value)).value)).value: helpers.prefixDecPtr(p) helpers.assignPtr(pp.contents, (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ptrs, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(g.update_subclasses(type_a, name, helpers.makeFuncPtr(g.update_callback, g.update_slots_callback), ctypes.cast(ptrs, ctypes_wrapped.c_void_p)))).value del type_a del name del pp del ptrs del p del offset return ctypes_wrapped.c_int().value @staticmethod def fixup_slot_dispatchers(type_a): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) p = ctypes.POINTER(g.slotdef)() g.init_slotdefs() if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(g.slotdefs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False if (ctypes.cast(p.contents.name, ctypes_wrapped.c_void_p).value or 0): pass else: break helpers.assignPtr(p, (ctypes.cast(intp._storePtr(intp._getPtr(g.update_one_slot(type_a, p), ctypes.POINTER(g.slotdef))), ctypes_wrapped.c_void_p).value or 0)) del p del type_a return @staticmethod def update_all_slots(type_a): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) p = ctypes.POINTER(g.slotdef)() g.init_slotdefs() if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(g.slotdefs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if (ctypes.cast(p.contents.name, ctypes_wrapped.c_void_p).value or 0): pass else: break ctypes_wrapped.c_int(int(g.update_slot(type_a, p.contents.name_strobj))) del p del type_a return @staticmethod def update_subclasses(type_a, name, callback, data): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) callback = ctypes.cast(callback, g.update_callback) data = ctypes.cast(data, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(callback, type_a, data).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.recurse_down_subclasses(type_a, name, callback, data))).value del callback del type_a del data del name return ctypes_wrapped.c_int().value @staticmethod def recurse_down_subclasses(type_a, name, callback, data): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) callback = ctypes.cast(callback, g.update_callback) data = ctypes.cast(data, ctypes_wrapped.c_void_p) subclass = ctypes.POINTER(g.PyTypeObject)() ref = ctypes.POINTER(g.PyObject)() subclasses = ctypes.POINTER(g.PyObject)() dict_a = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assignPtr(subclasses, (ctypes.cast(intp._storePtr(type_a.contents.tp_subclasses), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(subclasses, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subclasses, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(subclasses, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(ref, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(subclasses, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_RefType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(ref, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g._PyWeakref_RefType)))).value))) helpers.assignPtr(subclass, (ctypes.cast(intp._storePtr(ctypes.cast((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(ref, ctypes.POINTER(g.PyWeakReference)).contents.wr_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value > ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(subclass, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(subclass, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: continue values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subclass, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(subclass.contents.tp_dict), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItem(dict_a, name), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: continue if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.update_subclasses(subclass, name, callback, data))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value del subclasses del type_a del name del i del data del dict_a del subclass del n del callback del ref return ctypes_wrapped.c_int().value @staticmethod def add_operators(type_a): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) dict_a = ctypes.cast(type_a.contents.tp_dict, ctypes.POINTER(g.PyObject)) p = ctypes.POINTER(g.slotdef)() descr = ctypes.POINTER(g.PyObject)() ptr = ctypes.POINTER(ctypes_wrapped.c_void_p)() g.init_slotdefs() if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(g.slotdefs), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if (ctypes.cast(p.contents.name, ctypes_wrapped.c_void_p).value or 0): pass else: break if ctypes_wrapped.c_int(((ctypes.cast(p.contents.wrapper, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: continue helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(intp._getPtr(g.slotptr(type_a, p.contents.offset), ctypes.POINTER(ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((not (ctypes.cast(ptr.contents, ctypes_wrapped.c_void_p).value or 0))).value)).value: continue if (ctypes.cast(intp._getPtr(g.PyDict_GetItem(dict_a, p.contents.name_strobj), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): continue if ctypes_wrapped.c_int(((ctypes.cast(ptr.contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(g.PyObject)), g.PyObject_HashNotImplemented), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItem(dict_a, p.contents.name_strobj, ctypes.pointer(g._Py_NoneStruct)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDescr_NewWrapper(type_a, p, ptr.contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItem(dict_a, p.contents.name_strobj, descr))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_new, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.add_tp_new_wrapper(type_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value del p del type_a del dict_a del descr del ptr return ctypes_wrapped.c_int().value superobject = structs._anonymous_superobject super_members = (PyMemberDef * 4)() # TODO init super_members with (PyMemberDef * 4)(structs.PyMemberDef(ctypes.cast(intp._make_string('__thisclass__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value)).value)), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string('the class invoking super()'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMemberDef(ctypes.cast(intp._make_string('__self__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(24)).value)).value)), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string('the instance invoking super(); may be None'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMemberDef(ctypes.cast(intp._make_string('__self_class__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(32)).value)).value)), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string('the type of the instance invoking super(); may be None'), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMemberDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def super_dealloc(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) su = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.superobject)), ctypes.POINTER(g.superobject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(su.contents.obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(su.contents.obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(su.contents.obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(su.contents.obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(su.contents.type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(su.contents.type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(su.contents.type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(su.contents.type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(su.contents.obj_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(su.contents.obj_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(su.contents.obj_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(su.contents.obj_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.checkedFuncPtrCall(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(self, ctypes_wrapped.c_void_p)) del self del su return @staticmethod def super_repr(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) su = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.superobject)), ctypes.POINTER(g.superobject)) if (ctypes.cast(su.contents.obj_type, ctypes_wrapped.c_void_p).value or 0): return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string(", <%s object>>"), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(su.contents.type.contents.tp_name, ctypes.POINTER(ctypes_wrapped.c_byte)) if (ctypes.cast(su.contents.type, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(intp._make_string('NULL'), ctypes.POINTER(ctypes_wrapped.c_byte))), su.contents.obj_type.contents.tp_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string(", NULL>"), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes.cast(su.contents.type.contents.tp_name, ctypes.POINTER(ctypes_wrapped.c_byte)) if (ctypes.cast(su.contents.type, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(intp._make_string('NULL'), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del su return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def super_getattro(self, name): first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) su = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.superobject)), ctypes.POINTER(g.superobject)) skip = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(((ctypes.cast(su.contents.obj_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)) if ctypes_wrapped.c_int(int((not skip.value))).value: helpers.assign(skip, ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes.cast(name, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(9L)).value)).value)).value and ctypes_wrapped.c_int((values.strcmp.value(ctypes.cast(ctypes.cast(name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value) if ctypes_wrapped.c_int(int((not skip.value))).value: mro = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() tmp = ctypes.POINTER(g.PyObject)() dict_a = ctypes.POINTER(g.PyObject)() starttype = ctypes.POINTER(g.PyTypeObject)() f = g.descrgetfunc() i = g.Py_ssize_t() n = g.Py_ssize_t() helpers.assignPtr(starttype, (ctypes.cast(intp._storePtr(su.contents.obj_type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(mro, (ctypes.cast(intp._storePtr(starttype.contents.tp_mro), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) else: values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mro, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(n, ctypes.cast(mro, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(su.contents.type, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(helpers.ptrArithmetic(ctypes.cast(mro, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0))).value: break helpers.postfixInc(i) helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration_a = True while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(mro, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(ctypes.cast(tmp, ctypes.POINTER(g.PyTypeObject)).contents.tp_dict), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int(((ctypes.cast(tmp.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(ctypes.cast(tmp, ctypes.POINTER(g.PyClassObject)).contents.cl_dict), ctypes_wrapped.c_void_p).value or 0)) else: continue helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(dict_a, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(f, (ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_descr_get, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, res, (ctypes.cast(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(su.contents.obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(su.contents.obj_type, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value else ctypes.cast(su.contents.obj, ctypes.POINTER(g.PyObject))), ctypes.cast(starttype, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(res, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del tmp del f del i del res del dict_a del n del mro del starttype return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GenericGetAttr(self, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del skip del self del name del su return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def supercheck(type_a, obj): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(obj, ctypes.POINTER(g.PyTypeObject)), type_a))).value)).value: helpers.postfixInc(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(obj, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, type_a))).value: helpers.postfixInc(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type), ctypes_wrapped.c_void_p).value or 0) else: class_str = ctypes.POINTER(g.PyObject)() class_attr = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(class_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(class_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(class_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(class_attr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(obj, class_str), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(class_attr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(class_attr, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(class_attr, ctypes.POINTER(g.PyTypeObject)), ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value)).value: ok = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(class_attr, ctypes.POINTER(g.PyTypeObject)), type_a))).value)) if ok.value: return (ctypes.cast(intp._storePtr(ctypes.cast(class_attr, ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0) del ok if ctypes_wrapped.c_int(((ctypes.cast(class_attr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(class_attr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(class_attr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(class_attr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del class_str del class_attr g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('super(type, obj): obj must be an instance or subtype of type'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del type_a del obj return (ctypes.cast(ctypes.POINTER(g.PyTypeObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def super_descr_get(self, obj, type_a): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) su = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.superobject)), ctypes.POINTER(g.superobject)) newobj = ctypes.POINTER(g.superobject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(su.contents.obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(su, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PySuper_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(ctypes.cast(ctypes.cast(su, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)), su.contents.type, obj, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: obj_type = ctypes.cast(intp._getPtr(g.supercheck(su.contents.type, obj), ctypes.POINTER(g.PyTypeObject)), ctypes.POINTER(g.PyTypeObject)) if ctypes_wrapped.c_int(((ctypes.cast(obj_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(g.PySuper_Type.tp_new, ctypes.pointer(g.PySuper_Type), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.superobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(su.contents.type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(newobj.contents.type, (ctypes.cast(intp._storePtr(su.contents.type), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(newobj.contents.obj, (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(newobj.contents.obj_type, (ctypes.cast(intp._storePtr(obj_type), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(newobj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del obj_type del self del obj del type_a del su del newobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def super_init(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) su = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.superobject)), ctypes.POINTER(g.superobject)) type_a = ctypes.POINTER(g.PyTypeObject)() obj = ctypes.POINTER(g.PyObject)() obj_type = ctypes.POINTER(g.PyTypeObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyArg_NoKeywords(ctypes.cast(intp._make_string('super'), ctypes.POINTER(ctypes_wrapped.c_byte)), kwds))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('O!|O:super'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g.PyType_Type), ctypes.pointer(type_a), ctypes.pointer(obj)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(obj, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(obj_type, (ctypes.cast(intp._storePtr(intp._getPtr(g.supercheck(type_a, obj), ctypes.POINTER(g.PyTypeObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(obj_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.postfixInc(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(su.contents.type, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(su.contents.obj, (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(su.contents.obj_type, (ctypes.cast(intp._storePtr(obj_type), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del type_a del obj del kwds del self del args del obj_type del su return ctypes_wrapped.c_int().value super_doc = (ctypes_wrapped.c_byte * 1)() # TODO init super_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def super_traverse(self, visit, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) su = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.superobject)), ctypes.POINTER(g.superobject)) while True: if (ctypes.cast(su.contents.obj, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(su.contents.obj, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(su.contents.type, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(su.contents.type, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(su.contents.obj_type, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(su.contents.obj_type, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del self del visit del su del arg return ctypes_wrapped.c_int().value PySuper_Type = PyTypeObject() # TODO init PySuper_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('super'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), super_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), super_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), super_getattro), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value)), ctypes.cast(super_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), super_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(super_members, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), super_descr_get), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), super_init), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t), PyType_GenericAlloc), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyType_GenericNew), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_GC_Del)) free_list = (ctypes.POINTER(PyTupleObject) * 20L)() numfree = (ctypes_wrapped.c_int * 20L)() @staticmethod def PyTuple_New(size): first_iteration = None size = g.Py_ssize_t(int(size.value)) op = ctypes.POINTER(g.PyTupleObject)() i = g.Py_ssize_t() if ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(0L)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(54))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(20L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list, '+', size.value).contents), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(helpers.ptrArithmetic(g.free_list, '+', size.value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixDec(helpers.ptrArithmetic(g.numfree, '+', size.value).contents) helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) else: nbytes = g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((size.value * ctypes_wrapped.c_size_t(8).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((nbytes.value / ctypes_wrapped.c_size_t(8).value))).value != ctypes_wrapped.c_ulong(int(size.value)).value)).value or ctypes_wrapped.c_int((nbytes.value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_size_t(32).value))).value - ctypes_wrapped.c_size_t(8).value))).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_NewVar(ctypes.pointer(g.PyTuple_Type), size), ctypes.POINTER(g.PyVarObject)), ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del nbytes if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < size.value)).value: pass else: break helpers.assignPtr(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixInc(helpers.ptrArithmetic(g.numfree, '+', ctypes_wrapped.c_int(int(0L)).value).contents) helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del op del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyTuple_Size(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(114))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: return ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del op return g.Py_ssize_t().value @staticmethod def PyTuple_GetItem(op, i): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(125))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('tuple index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0) del i del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyTuple_SetItem(op, i, newitem): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) newitem = ctypes.cast(newitem, ctypes.POINTER(g.PyObject)) olditem = ctypes.POINTER(g.PyObject)() p = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((op.contents.ob_refcnt.value != ctypes_wrapped.c_int(int(1L)).value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(newitem, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(142))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(newitem, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('tuple assignment index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, u'+', i.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(olditem, (ctypes.cast(intp._storePtr(p.contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(newitem), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(olditem, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(olditem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(olditem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(olditem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del i del newitem del olditem del p del op return ctypes_wrapped.c_int().value @staticmethod def _PyTuple_MaybeUntrack(op): first_iteration = None op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) t = ctypes.POINTER(g.PyTupleObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value: return helpers.assignPtr(t, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(t, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break elt = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(t, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(elt, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(elt, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(elt, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(elt, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, elt).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(elt, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(elt, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value)).value: return del elt while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break del i del n del t del op return @staticmethod def PyTuple_Pack(n, *varargs): first_iteration = None n = g.Py_ssize_t(int(n.value)) i = g.Py_ssize_t() o = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() items = ctypes.POINTER(ctypes.POINTER(g.PyObject))() vargs = helpers.VarArgs(varargs, intp) values.va_start.value(vargs, n) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: values.va_end.value(vargs) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(items, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(o, (ctypes.cast(intp._storePtr(values.__va_arg.value(vargs, ctypes.POINTER(g.PyObject)())), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(items, '+', i.value).contents, (ctypes.cast(intp._storePtr(o), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(vargs) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del i del items del o del n del vargs del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tupledealloc(op): goto = None while True: if (goto is None): op = ctypes.cast(op, ctypes.POINTER(g.PyTupleObject)) i = g.Py_ssize_t() len_a = g.Py_ssize_t(int(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) g.PyObject_GC_UnTrack(ctypes.cast(op, ctypes_wrapped.c_void_p)) if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue _tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value < ctypes_wrapped.c_int(int(50L)).value)).value)).value): goto = 4 continue if (not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0)): goto = 5 continue helpers.prefixInc(_tstate.contents.trash_delete_nesting) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((len_a.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue helpers.assign(i, len_a.value) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue pass goto = 11 continue if (goto == 12): goto = None if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 20 continue continue goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = 10 continue if (goto == 19): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(20L)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(g.numfree, '+', len_a.value).contents.value < ctypes_wrapped.c_int(int(2000L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 21 continue helpers.assignPtr(helpers.ptrArithmetic(op.contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(g.free_list, '+', len_a.value).contents, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(helpers.ptrArithmetic(g.numfree, '+', len_a.value).contents) helpers.assignPtr(helpers.ptrArithmetic(g.free_list, '+', len_a.value).contents, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) goto = u'done' continue if (goto == 21): goto = None if (goto == 6): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p)) if (goto == u'done'): goto = None if (goto is None): if (not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0)): goto = 22 continue helpers.prefixDec(_tstate.contents.trash_delete_nesting) if (not ctypes_wrapped.c_int(((ctypes.cast(_tstate.contents.trash_delete_later, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value <= ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 23 continue g._PyTrash_thread_destroy_chain() if (goto == 23): goto = None if (goto == 22): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto is None): g._PyTrash_thread_deposit_object(ctypes.cast(op, ctypes.POINTER(g.PyObject))) if (goto == 3): goto = None if (goto is None): del _tstate if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 2 continue if (goto == 24): goto = None if (goto is None): goto = 1 continue if (goto == 2): goto = None if (goto is None): del i del len_a del op return break @staticmethod def tupleprint(op, fp, flags): first_iteration = None op = ctypes.cast(op, ctypes.POINTER(g.PyTupleObject)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) flags = ctypes_wrapped.c_int(int(flags.value)) i = g.Py_ssize_t() values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('('), ctypes.POINTER(ctypes_wrapped.c_byte))) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_Print(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, fp, ctypes_wrapped.c_int(int(0L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(i, ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int(1L)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(','), ctypes.POINTER(ctypes_wrapped.c_byte))) values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(')'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del fp del i del flags del op return ctypes_wrapped.c_int().value @staticmethod def tuplerepr(v): goto = None while True: if (goto is None): first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)) i = g.Py_ssize_t() n = g.Py_ssize_t() s = ctypes.POINTER(g.PyObject)() temp = ctypes.POINTER(g.PyObject)() pieces = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assign(n, ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 1): goto = None if (goto is None): helpers.assign(i, ctypes_wrapped.c_int(int(g.Py_ReprEnter(ctypes.cast(v, ctypes.POINTER(g.PyObject))))).value) if (not ctypes_wrapped.c_int((i.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue return (ctypes.cast(intp._storePtr((ctypes.cast(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('(...)'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value else intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0) if (goto == 2): goto = None if (goto is None): helpers.assignPtr(pieces, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(pieces, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 8 continue first_iteration = False goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.prefixInc(i) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' while getting the repr of a tuple'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value): goto = 11 continue goto = u'Done' continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'Done' continue if (goto == 12): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0)) goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('('), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'Done' continue if (goto == 13): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyString_ConcatAndDel(ctypes.pointer(s), temp) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue goto = u'Done' continue if (goto == 14): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString((ctypes.cast(intp._make_string(',)'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(1L)).value)).value else ctypes.cast(intp._make_string(')'), ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue goto = u'Done' continue if (goto == 15): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((n.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyString_ConcatAndDel(ctypes.pointer(temp), s) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((n.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(temp), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue goto = u'Done' continue if (goto == 16): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue goto = u'Done' continue if (goto == 17): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyString_Join(s, pieces), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue pass goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 23 continue continue goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 19): goto = None if (goto == u'Done'): goto = None if (goto == 24): goto = None if (goto is None): if (not True): goto = 25 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue pass goto = 26 continue if (goto == 27): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 29 continue continue goto = 28 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 25): goto = None if (goto is None): g.Py_ReprLeave(ctypes.cast(v, ctypes.POINTER(g.PyObject))) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del temp del i del n del s del result del v del pieces return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def tuplehash(v): v = ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)) x = ctypes_wrapped.c_long() y = ctypes_wrapped.c_long() len_a = g.Py_ssize_t(int(ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) p = ctypes.POINTER(ctypes.POINTER(g.PyObject))() mult = ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1000003L)).value)) helpers.assign(x, ctypes_wrapped.c_int(int(3430008L)).value) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(v.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.prefixDec(len_a).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(y, ctypes_wrapped.c_long(int(g.PyObject_Hash(helpers.postfixIncPtr(p).contents))).value) if ctypes_wrapped.c_int((y.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(x, ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((x.value ^ y.value))).value * mult.value))).value) helpers.augAssign(mult, u'+=', ctypes_wrapped.c_long(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(82520L)).value + len_a.value))).value + len_a.value))).value)).value) helpers.augAssign(x, u'+=', ctypes_wrapped.c_int(int(97531L)).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return x.value del len_a del p del v del y del x del mult return ctypes_wrapped.c_long().value @staticmethod def tuplelength(a): a = ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)) return ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del a return g.Py_ssize_t().value @staticmethod def tuplecontains(a, el): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)) el = ctypes.cast(el, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() cmp_a = ctypes_wrapped.c_int() if True: first_iteration = True (helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value), helpers.assign(cmp_a, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((cmp_a.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((i.value < ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: pass else: break helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(el, helpers.ptrArithmetic(ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_int(int(2L))))).value) return cmp_a.value del a del el del i del cmp_a return ctypes_wrapped.c_int().value @staticmethod def tupleitem(a, i): a = ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)) i = g.Py_ssize_t(int(i.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('tuple index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(helpers.ptrArithmetic(a.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0) del a del i return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tupleslice(a, ilow, ihigh): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)) ilow = g.Py_ssize_t(int(ilow.value)) ihigh = g.Py_ssize_t(int(ihigh.value)) np = ctypes.POINTER(g.PyTupleObject)() src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() i = g.Py_ssize_t() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int((ilow.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(ilow, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ihigh.value > ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assign(ihigh, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((ihigh.value < ilow.value)).value: helpers.assign(ihigh, ilow.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ilow.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ihigh.value == ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.postfixInc(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(len_a, ctypes_wrapped.c_long(int((ihigh.value - ilow.value))).value) helpers.assignPtr(np, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyTuple_New(len_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(np, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(src, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ob_item, u'+', ilow.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < len_a.value)).value: pass else: break v = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del src del i del ihigh del len_a del ilow del dest del np return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyTuple_GetSlice(op, i, j): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) j = g.Py_ssize_t(int(j.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(429))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.tupleslice(ctypes.cast(op, ctypes.POINTER(g.PyTupleObject)), i, j), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del j del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tupleconcat(a, bb): first_iteration_a = None first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)) bb = ctypes.cast(bb, ctypes.POINTER(g.PyObject)) size = g.Py_ssize_t() i = g.Py_ssize_t() src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() np = ctypes.POINTER(g.PyTupleObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('can only concatenate tuple (not "%.200s") to tuple'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(size, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) if ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(np, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyTuple_New(size), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(np, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(src, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break v = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v helpers.assignPtr(src, (ctypes.cast(intp._storePtr(ctypes.cast(bb, ctypes.POINTER(g.PyTupleObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(np.contents.ob_item, u'+', ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyTupleObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break v = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del src del bb del i del dest del np del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tuplerepeat(a, n): first_iteration_a = None first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)) n = g.Py_ssize_t(int(n.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() size = g.Py_ssize_t() np = ctypes.POINTER(g.PyTupleObject)() p = ctypes.POINTER(ctypes.POINTER(g.PyObject))() items = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(size, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value * n.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((size.value / ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value != n.value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(np, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyTuple_New(size), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(np, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(items, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if True: first_iteration_a = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(j) if ctypes_wrapped.c_int((j.value < ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(items, '+', j.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(p.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixIncPtr(p) return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del i del items del j del n del p del np del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tupleindex(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyTupleObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() start = g.Py_ssize_t() stop = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('O|O&O&:index'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(v), g._PyEval_SliceIndex, ctypes.pointer(start), g._PyEval_SliceIndex, ctypes.pointer(stop)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(start, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(start, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((stop.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(stop, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((stop.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(stop, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assign(i, start.value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < stop.value)).value and ctypes_wrapped.c_int((i.value < ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: pass else: break cmp_a = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(self.contents.ob_item, '+', i.value).contents, v, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del cmp_a g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('tuple.index(x): x not in tuple'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del i del self del args del stop del start del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tuplecount(self, v): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyTupleObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) count = g.Py_ssize_t() i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break cmp_a = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(self.contents.ob_item, '+', i.value).contents, v, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(count) elif ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del cmp_a return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del count del i del self del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tupletraverse(o, visit, arg): first_iteration = None o = ctypes.cast(o, ctypes.POINTER(g.PyTupleObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes.cast(o, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while True: if first_iteration: first_iteration = False if ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break while True: if (ctypes.cast(helpers.ptrArithmetic(o.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(helpers.ptrArithmetic(o.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del i del visit del o del arg return ctypes_wrapped.c_int().value @staticmethod def tuplerichcompare(v, w, op): first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) vt = ctypes.POINTER(g.PyTupleObject)() wt = ctypes.POINTER(g.PyTupleObject)() i = g.Py_ssize_t() vlen = g.Py_ssize_t() wlen = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(vt, (ctypes.cast(intp._storePtr(ctypes.cast(v, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(wt, (ctypes.cast(intp._storePtr(ctypes.cast(w, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(vlen, ctypes.cast(vt, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(wlen, ctypes.cast(wt, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < vlen.value)).value and ctypes_wrapped.c_int((i.value < wlen.value)).value)).value: pass else: break k = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(vt.contents.ob_item, '+', i.value).contents, helpers.ptrArithmetic(wt.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not k.value))).value: break del k if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= vlen.value)).value or ctypes_wrapped.c_int((i.value >= wlen.value)).value)).value: cmp_a = ctypes_wrapped.c_int() res = ctypes.POINTER(g.PyObject)() if True: _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vlen.value < wlen.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vlen.value <= wlen.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vlen.value == wlen.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vlen.value != wlen.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vlen.value > wlen.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vlen.value >= wlen.value)).value) break if (not _switchfallthrough): return ctypes_wrapped.c_int(int(0L)).value break del _switchfallthrough del _switchvalue if cmp_a.value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del cmp_a if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(3L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_RichCompare(helpers.ptrArithmetic(vt.contents.ob_item, '+', i.value).contents, helpers.ptrArithmetic(wt.contents.ob_item, '+', i.value).contents, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del vlen del i del wlen del wt del vt del w del v del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tuple_new(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) arg = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 2)(ctypes.cast(intp._make_string('sequence'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.tuple_subtype_new(type_a, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwds, ctypes.cast(intp._make_string('|O:tuple'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(arg)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Tuple(arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del args del kwlist del kwds del arg return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tuple_subtype_new(type_a, args, kwds): first_iteration = None type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) tmp = ctypes.POINTER(g.PyObject)() newobj = ctypes.POINTER(g.PyObject)() item = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int(int(g.PyType_IsSubtype(type_a, ctypes.pointer(g.PyTuple_Type))))) helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.tuple_new(ctypes.pointer(g.PyTuple_Type), args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_alloc, type_a, helpers.assign(n, ctypes.cast(tmp, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(item, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(tmp, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(newobj, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del tmp del type_a del kwds del i del args del newobj del item del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) tuple_doc = (ctypes_wrapped.c_byte * 1)() # TODO init tuple_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) tuple_as_sequence = PySequenceMethods() # TODO init tuple_as_sequence with PySequenceMethods(helpers.makeFuncPtr(lenfunc, tuplelength), helpers.makeFuncPtr(binaryfunc, tupleconcat), helpers.makeFuncPtr(ssizeargfunc, tuplerepeat), helpers.makeFuncPtr(ssizeargfunc, tupleitem), helpers.makeFuncPtr(ssizessizeargfunc, tupleslice), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(objobjproc, tuplecontains)) @staticmethod def tuplesubscript(self, item): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyTupleObject)) item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((item.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: i = g.Py_ssize_t(int(g.Py_ssize_t(int(g.PyNumber_AsSsize_t(item, g.PyExc_IndexError))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.tupleitem(self, i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PySlice_Type), ctypes_wrapped.c_void_p).value or 0))).value: start = g.Py_ssize_t() stop = g.Py_ssize_t() step = g.Py_ssize_t() slicelength = g.Py_ssize_t() cur = g.Py_ssize_t() i = g.Py_ssize_t() result = ctypes.POINTER(g.PyObject)() it = ctypes.POINTER(g.PyObject)() src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySlice_GetIndicesEx(ctypes.cast(item, ctypes.POINTER(g.PySliceObject)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes.pointer(start), ctypes.pointer(stop), ctypes.pointer(step), ctypes.pointer(slicelength)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((slicelength.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((start.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((step.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((slicelength.value == ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(slicelength), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(src, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True (helpers.assign(cur, start.value), helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: (helpers.augAssign(cur, u'+=', step.value), helpers.postfixInc(i))[1] if ctypes_wrapped.c_int((i.value < slicelength.value)).value: pass else: break helpers.assignPtr(it, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(src, '+', cur.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(it), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del src del cur del i del slicelength del stop del it del dest del start del step del result else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('tuple indices must be integers, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del item del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tuple_getnewargs(v): v = ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(N)'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.tupleslice(v, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tuple_sizeof(self): self = ctypes.cast(self, ctypes.POINTER(g.PyTupleObject)) res = g.Py_ssize_t() helpers.assign(res, ctypes_wrapped.c_ulong(int((g.PyTuple_Type.tp_basicsize.value + ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value * ctypes_wrapped.c_size_t(8).value))).value))).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(res), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) index_doc = (ctypes_wrapped.c_byte * 1)() # TODO init index_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) count_doc = (ctypes_wrapped.c_byte * 1)() # TODO init count_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) sizeof_doc = (ctypes_wrapped.c_byte * 1)() # TODO init sizeof_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) tuple_methods = (PyMethodDef * 5)() # TODO init tuple_methods with (PyMethodDef * 5)(structs.PyMethodDef(ctypes.cast(intp._make_string('__getnewargs__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, tuple_getnewargs), ctypes_wrapped.c_int(int(4L))), structs.PyMethodDef(ctypes.cast(intp._make_string('__sizeof__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, tuple_sizeof), ctypes_wrapped.c_int(int(4L)), ctypes.cast(sizeof_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('index'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, tupleindex), ctypes_wrapped.c_int(int(1L)), ctypes.cast(index_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('count'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, tuplecount), ctypes_wrapped.c_int(int(8L)), ctypes.cast(count_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) tuple_as_mapping = PyMappingMethods() # TODO init tuple_as_mapping with PyMappingMethods(helpers.makeFuncPtr(lenfunc, tuplelength), helpers.makeFuncPtr(binaryfunc, tuplesubscript), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) PyTuple_Type = PyTypeObject() # TODO init PyTuple_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('tuple'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value - ctypes_wrapped.c_size_t(8).value))).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(8).value)), helpers.makeFuncPtr(destructor, tupledealloc), helpers.makeFuncPtr(printfunc, tupleprint), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, tuplerepr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), ctypes.pointer(tuple_as_sequence), ctypes.pointer(tuple_as_mapping), helpers.makeFuncPtr(hashfunc, tuplehash), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value)), ctypes.cast(tuple_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, tupletraverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), tuplerichcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), tuple_iter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(tuple_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), tuple_new), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_GC_Del)) @staticmethod def _PyTuple_Resize(pv, newsize): first_iteration = None pv = ctypes.cast(pv, ctypes.POINTER(ctypes.POINTER(g.PyObject))) newsize = g.Py_ssize_t(int(newsize.value)) v = ctypes.POINTER(g.PyTupleObject)() sv = ctypes.POINTER(g.PyTupleObject)() i = g.Py_ssize_t() oldsize = g.Py_ssize_t() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(ctypes.cast(pv.contents, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value != ctypes_wrapped.c_int(int(1L)).value)).value)).value)).value: helpers.assignPtr(pv.contents, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(861))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(oldsize, ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((oldsize.value == newsize.value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((oldsize.value == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(pv.contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(newsize), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(((ctypes.cast(pv.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value if ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break if True: first_iteration = True helpers.assign(i, newsize.value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < oldsize.value)).value: pass else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(sv, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_Resize(ctypes.cast(v, ctypes.POINTER(g.PyVarObject)), newsize), ctypes.POINTER(g.PyVarObject)), ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(sv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(pv.contents, ctypes_wrapped.c_int(int(0L)).value) g.PyObject_GC_Del(ctypes.cast(v, ctypes_wrapped.c_void_p)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(ctypes.cast(ctypes.cast(sv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((newsize.value > oldsize.value)).value: values.memset.value(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(sv.contents.ob_item, '+', oldsize.value).contents), ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(ctypes.sizeof(sv.contents.ob_item[0])).value * ctypes_wrapped.c_long(int((newsize.value - oldsize.value))).value)))) helpers.assignPtr(pv.contents, (ctypes.cast(intp._storePtr(ctypes.cast(sv, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(sv, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del newsize del oldsize del pv del i del sv del v return ctypes_wrapped.c_int().value @staticmethod def PyTuple_ClearFreeList(): first_iteration = None freelist_size = ctypes_wrapped.c_int() i = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(1L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(20L)).value)).value: pass else: break p = ctypes.POINTER(g.PyTupleObject)() q = ctypes.POINTER(g.PyTupleObject)() helpers.assignPtr(p, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(freelist_size, u'+=', helpers.ptrArithmetic(g.numfree, '+', i.value).contents.value) helpers.assignPtr(helpers.ptrArithmetic(g.free_list, '+', i.value).contents, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(helpers.ptrArithmetic(g.numfree, '+', i.value).contents, ctypes_wrapped.c_int(int(0L)).value) while (ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(q, (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(p.contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyObject_GC_Del(ctypes.cast(q, ctypes_wrapped.c_void_p)) del q del p return freelist_size.value del i del freelist_size return ctypes_wrapped.c_int().value @staticmethod def PyTuple_Fini(): while True: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(helpers.ptrArithmetic(g.free_list, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes_wrapped.c_int(int(0L)).value) (ctypes_wrapped.c_int(int(g.PyTuple_ClearFreeList())), None)[1] return tupleiterobject = structs._anonymous_tupleiterobject @staticmethod def tupleiter_dealloc(it): it = ctypes.cast(it, ctypes.POINTER(g.tupleiterobject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(it, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(it, ctypes_wrapped.c_void_p)) del it return @staticmethod def tupleiter_traverse(it, visit, arg): it = ctypes.cast(it, ctypes.POINTER(g.tupleiterobject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) while True: if (ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del visit del it del arg return ctypes_wrapped.c_int().value @staticmethod def tupleiter_next(it): it = ctypes.cast(it, ctypes.POINTER(g.tupleiterobject)) seq = ctypes.POINTER(g.PyTupleObject)() item = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(it.contents.it_seq), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((it.contents.it_index.value < ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assignPtr(item, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', it.contents.it_index.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixInc(it.contents.it_index) helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(it.contents.it_seq, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del item del it del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def tupleiter_len(it): it = ctypes.cast(it, ctypes.POINTER(g.tupleiterobject)) len_a = g.Py_ssize_t() if (ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0): helpers.assign(len_a, ctypes_wrapped.c_long(int((ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - it.contents.it_index.value))).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(len_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del len_a del it return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) length_hint_doc = (ctypes_wrapped.c_byte * 1)() # TODO init length_hint_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) tupleiter_methods = (PyMethodDef * 2)() # TODO init tupleiter_methods with (PyMethodDef * 2)(structs.PyMethodDef(ctypes.cast(intp._make_string('__length_hint__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, tupleiter_len), ctypes_wrapped.c_int(int(4L)), ctypes.cast(length_hint_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyTupleIter_Type = PyTypeObject() # TODO init PyTupleIter_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('tupleiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(32).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, tupleiter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, tupleiter_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, tupleiter_next), ctypes.cast(tupleiter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def tuple_iter(seq): seq = ctypes.cast(seq, ctypes.POINTER(g.PyObject)) it = ctypes.POINTER(g.tupleiterobject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/tupleobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1043))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(it, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyTupleIter_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.tupleiterobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(it.contents.it_index, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixInc(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(it.contents.it_seq, (ctypes.cast(intp._storePtr(ctypes.cast(seq, ctypes.POINTER(g.PyTupleObject))), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(it, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(it, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del it del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def set_key_error(arg): arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) tup = ctypes.POINTER(g.PyObject)() helpers.assignPtr(tup, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(tup, ctypes_wrapped.c_void_p).value or 0))).value: return g.PyErr_SetObject(g.PyExc_KeyError, tup) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tup, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tup, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tup, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del tup del arg return dummy = ctypes.POINTER(PyObject)() free_list__dict = (ctypes.POINTER(PyDictObject) * 80L)() numfree__dict = ctypes_wrapped.c_int() @staticmethod def PyDict_Fini(): op = ctypes.POINTER(g.PyDictObject)() while g.numfree__dict.value: helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list__dict, '+', helpers.prefixDec(g.numfree__dict).value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0)))) g.PyObject_GC_Del(ctypes.cast(op, ctypes_wrapped.c_void_p)) del op return @staticmethod def PyDict_New(): mp = ctypes.POINTER(g.PyDictObject)() if ctypes_wrapped.c_int(((ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.dummy, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if g.numfree__dict.value: helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list__dict, '+', helpers.prefixDec(g.numfree__dict).value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(ctypes.cast(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) if mp.contents.ma_fill.value: while True: values.memset.value(ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_size_t(ctypes.sizeof(mp.contents.ma_smalltable))) helpers.assign(mp.contents.ma_used, helpers.assign(mp.contents.ma_fill, ctypes_wrapped.c_int(int(0L)).value).value) while True: helpers.assignPtr(mp.contents.ma_table, (ctypes.cast(intp._storePtr(mp.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.ma_mask, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break else: while True: helpers.assignPtr(mp.contents.ma_table, (ctypes.cast(intp._storePtr(mp.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.ma_mask, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.assert_a.value(ctypes_wrapped.c_int((mp.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(mp.contents.ma_table, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p).value or 0)))) values.assert_a.value(ctypes_wrapped.c_int((mp.contents.ma_mask.value == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))) else: helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyDict_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value while True: values.memset.value(ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_size_t(ctypes.sizeof(mp.contents.ma_smalltable))) helpers.assign(mp.contents.ma_used, helpers.assign(mp.contents.ma_fill, ctypes_wrapped.c_int(int(0L)).value).value) while True: helpers.assignPtr(mp.contents.ma_table, (ctypes.cast(intp._storePtr(mp.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.ma_mask, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(mp.contents.ma_lookup, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyDictEntry)), ctypes.POINTER(g.PyDictObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_long), g.lookdict_string), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(mp, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def lookdict(mp, key, hash_a): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) i = ctypes_wrapped.c_ulong() perturb = ctypes_wrapped.c_ulong() freeslot = ctypes.POINTER(g.PyDictEntry)() mask = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(mp.contents.ma_mask.value)).value)) ep0 = ctypes.cast(mp.contents.ma_table, ctypes.POINTER(g.PyDictEntry)) ep = ctypes.POINTER(g.PyDictEntry)() cmp_a = ctypes_wrapped.c_int() startkey = ctypes.POINTER(g.PyObject)() helpers.assign(i, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(hash_a.value)).value & mask.value))).value) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ep0, '+', i.value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(freeslot, (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0)) else: if ctypes_wrapped.c_int((ep.contents.me_hash.value == hash_a.value)).value: helpers.assignPtr(startkey, (ctypes.cast(intp._storePtr(ep.contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(startkey, key, ctypes_wrapped.c_int(int(2L))))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep0, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(mp.contents.ma_table, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(startkey, ctypes_wrapped.c_void_p).value or 0))).value)).value: if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.lookdict(mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(freeslot, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assign(perturb, hash_a.value) while True: if first_iteration: first_iteration = False else: helpers.augAssign(perturb, u'>>=', ctypes_wrapped.c_int(int(5L)).value) helpers.assign(i, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((i.value << ctypes_wrapped.c_int(int(2L)).value))).value + i.value))).value + perturb.value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ep0, '+', ctypes_wrapped.c_ulong(int((i.value & mask.value))).value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((ctypes.cast(ep, ctypes.POINTER(g.PyDictEntry)) if ctypes_wrapped.c_int(((ctypes.cast(freeslot, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(freeslot, ctypes.POINTER(g.PyDictEntry)))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ep.contents.me_hash.value == hash_a.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(startkey, (ctypes.cast(intp._storePtr(ep.contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(startkey, key, ctypes_wrapped.c_int(int(2L))))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(startkey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep0, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(mp.contents.ma_table, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(startkey, ctypes_wrapped.c_void_p).value or 0))).value)).value: if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.lookdict(mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(freeslot, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(freeslot, (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(int(0L))) return ctypes_wrapped.c_int(int(0L)).value del key del perturb del i del mask del ep0 del startkey del mp del freeslot del hash_a del ep del cmp_a return (ctypes.cast(ctypes.POINTER(g.PyDictEntry)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def lookdict_string(mp, key, hash_a): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) i = ctypes_wrapped.c_ulong() perturb = ctypes_wrapped.c_ulong() freeslot = ctypes.POINTER(g.PyDictEntry)() mask = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(mp.contents.ma_mask.value)).value)) ep0 = ctypes.cast(mp.contents.ma_table, ctypes.POINTER(g.PyDictEntry)) ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(mp.contents.ma_lookup, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyDictEntry)), ctypes.POINTER(g.PyDictObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_long), g.lookdict), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.lookdict(mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(i, ctypes_wrapped.c_ulong(int((hash_a.value & mask.value))).value) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ep0, '+', i.value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0))).value)).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(freeslot, (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0)) else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ep.contents.me_hash.value == hash_a.value)).value and ctypes_wrapped.c_int(int(g._PyString_Eq(ep.contents.me_key, key))).value)).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(freeslot, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assign(perturb, hash_a.value) while True: if first_iteration: first_iteration = False else: helpers.augAssign(perturb, u'>>=', ctypes_wrapped.c_int(int(5L)).value) helpers.assign(i, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((i.value << ctypes_wrapped.c_int(int(2L)).value))).value + i.value))).value + perturb.value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ep0, '+', ctypes_wrapped.c_ulong(int((i.value & mask.value))).value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((ctypes.cast(ep, ctypes.POINTER(g.PyDictEntry)) if ctypes_wrapped.c_int(((ctypes.cast(freeslot, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(freeslot, ctypes.POINTER(g.PyDictEntry)))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ep.contents.me_hash.value == hash_a.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int(int(g._PyString_Eq(ep.contents.me_key, key))).value)).value)).value: return (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(freeslot, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(freeslot, (ctypes.cast(intp._storePtr(ep), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(int(0L))) return ctypes_wrapped.c_int(int(0L)).value del key del perturb del i del mask del ep0 del mp del freeslot del hash_a del ep return (ctypes.cast(ctypes.POINTER(g.PyDictEntry)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyDict_MaybeUntrack(op): first_iteration = None op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) mp = ctypes.POINTER(g.PyDictObject)() value = ctypes.POINTER(g.PyObject)() mask = g.Py_ssize_t() i = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value: return helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, mp.contents.ma_mask.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value <= mask.value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: continue if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, value).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(value, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, helpers.ptrArithmetic(ep, '+', i.value).contents.me_key).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value)).value: return while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break del i del mask del value del mp del ep del op return @staticmethod def insertdict_by_entry(mp, key, hash_a, ep, value): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) ep = ctypes.cast(ep, ctypes.POINTER(g.PyDictEntry)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) old_value = ctypes.POINTER(g.PyObject)() while True: if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(mp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, key).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(key, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, value).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(value, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value)).value: while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(mp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(old_value, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ep.contents.me_value, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break else: if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(mp.contents.ma_fill) else: values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0)))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(g.dummy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(g.dummy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(g.dummy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(ep.contents.me_key, (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ep.contents.me_hash, g.Py_ssize_t(int(hash_a.value)).value) helpers.assignPtr(ep.contents.me_value, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(mp.contents.ma_used) return ctypes_wrapped.c_int(int(0L)).value del old_value del value del mp del key del hash_a del ep return ctypes_wrapped.c_int().value @staticmethod def insertdict(mp, key, hash_a, value): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) ep = ctypes.POINTER(g.PyDictEntry)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(mp.contents.ma_lookup, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.insertdict_by_entry(mp, key, hash_a, ep, value))).value del value del hash_a del mp del key del ep return ctypes_wrapped.c_int().value @staticmethod def insertdict_clean(mp, key, hash_a, value): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) i = ctypes_wrapped.c_ulong() perturb = ctypes_wrapped.c_ulong() mask = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(mp.contents.ma_mask.value)).value)) ep0 = ctypes.cast(mp.contents.ma_table, ctypes.POINTER(g.PyDictEntry)) ep = ctypes.POINTER(g.PyDictEntry)() while True: if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(mp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, key).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(key, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, value).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(value, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value)).value: while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(mp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assign(i, ctypes_wrapped.c_ulong(int((hash_a.value & mask.value))).value) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ep0, '+', i.value).contents)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(perturb, hash_a.value) while True: if first_iteration: first_iteration = False else: helpers.augAssign(perturb, u'>>=', ctypes_wrapped.c_int(int(5L)).value) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.assign(i, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((i.value << ctypes_wrapped.c_int(int(2L)).value))).value + i.value))).value + perturb.value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(ep0, '+', ctypes_wrapped.c_ulong(int((i.value & mask.value))).value).contents)), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value))) helpers.postfixInc(mp.contents.ma_fill) helpers.assignPtr(ep.contents.me_key, (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ep.contents.me_hash, g.Py_ssize_t(int(hash_a.value)).value) helpers.assignPtr(ep.contents.me_value, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(mp.contents.ma_used) del perturb del i del mask del value del mp del key del ep0 del hash_a del ep return @staticmethod def dictresize(mp, minused): first_iteration_a = None first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) minused = g.Py_ssize_t(int(minused.value)) newsize = g.Py_ssize_t() oldtable = ctypes.POINTER(g.PyDictEntry)() newtable = ctypes.POINTER(g.PyDictEntry)() ep = ctypes.POINTER(g.PyDictEntry)() i = g.Py_ssize_t() is_oldtable_malloced = ctypes_wrapped.c_int() small_copy = (g.PyDictEntry * 8L)() values.assert_a.value(ctypes_wrapped.c_int((minused.value >= ctypes_wrapped.c_int(int(0L)).value))) if True: first_iteration = True helpers.assign(newsize, ctypes_wrapped.c_int(int(8L)).value) while True: if first_iteration: first_iteration = False else: helpers.augAssign(newsize, u'<<=', ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((newsize.value <= minused.value)).value and ctypes_wrapped.c_int((newsize.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value: pass else: break if ctypes_wrapped.c_int((newsize.value <= ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(oldtable, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(oldtable, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(is_oldtable_malloced, ctypes_wrapped.c_int(((ctypes.cast(oldtable, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p).value or 0))).value) if ctypes_wrapped.c_int((newsize.value == ctypes_wrapped.c_int(int(8L)).value)).value: helpers.assignPtr(newtable, (ctypes.cast(intp._storePtr(mp.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newtable, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(oldtable, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((mp.contents.ma_fill.value == mp.contents.ma_used.value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((mp.contents.ma_fill.value > mp.contents.ma_used.value))) values.memcpy.value(ctypes.cast(small_copy, ctypes_wrapped.c_void_p), ctypes.cast(oldtable, ctypes_wrapped.c_void_p), ctypes_wrapped.c_size_t(ctypes.sizeof(small_copy))) helpers.assignPtr(oldtable, (ctypes.cast(intp._storePtr(small_copy), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(newtable, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyDictEntry)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(newsize.value)).value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value / ctypes_wrapped.c_size_t(24).value))).value)).value else ctypes.cast(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((newsize.value * ctypes_wrapped.c_size_t(24).value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((newsize.value * ctypes_wrapped.c_size_t(24).value))).value)) if ctypes_wrapped.c_ulong(int((newsize.value * ctypes_wrapped.c_size_t(24).value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyDictEntry)), ctypes.POINTER(g.PyDictEntry)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newtable, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(newtable, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(oldtable, ctypes_wrapped.c_void_p).value or 0)))) helpers.assignPtr(mp.contents.ma_table, (ctypes.cast(intp._storePtr(newtable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.ma_mask, ctypes_wrapped.c_ulong(int((newsize.value - ctypes_wrapped.c_int(int(1L)).value))).value) values.memset.value(ctypes.cast(newtable, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(24).value * newsize.value)))) helpers.assign(mp.contents.ma_used, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(i, mp.contents.ma_fill.value) helpers.assign(mp.contents.ma_fill, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration_a = True helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(oldtable), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixIncPtr(ep) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.prefixDec(i) g.insertdict_clean(mp, ep.contents.me_key, ctypes_wrapped.c_long(int(ep.contents.me_hash.value)), ep.contents.me_value) elif ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.prefixDec(i) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(g.dummy, ctypes_wrapped.c_void_p).value or 0)))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if is_oldtable_malloced.value: values.free.value(oldtable) return ctypes_wrapped.c_int(int(0L)).value del newsize del minused del is_oldtable_malloced del i del oldtable del newtable del small_copy del mp del ep return ctypes_wrapped.c_int().value @staticmethod def _PyDict_NewPresized(minused): minused = g.Py_ssize_t(int(minused.value)) op = ctypes.cast(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((minused.value > ctypes_wrapped.c_int(int(5L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.dictresize(ctypes.cast(op, ctypes.POINTER(g.PyDictObject)), minused))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del minused del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_GetItem(op, key): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long() mp = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyDictObject)), ctypes.POINTER(g.PyDictObject)) ep = ctypes.POINTER(g.PyDictEntry)() tstate = ctypes.POINTER(g.PyThreadState)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tstate, (ctypes.cast(intp._storePtr(g._PyThreadState_Current), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(tstate, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(tstate.contents.curexc_type, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: err_type = ctypes.POINTER(g.PyObject)() err_value = ctypes.POINTER(g.PyObject)() err_tb = ctypes.POINTER(g.PyObject)() g.PyErr_Fetch(ctypes.pointer(err_type), ctypes.pointer(err_value), ctypes.pointer(err_tb)) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) g.PyErr_Restore(err_type, err_value, err_tb) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del err_type del err_tb del err_value else: helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0) del tstate del mp del key del hash_a del ep del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_set_item_by_hash_or_entry(op, key, hash_a, ep, value): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) ep = ctypes.cast(ep, ctypes.POINTER(g.PyDictEntry)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) mp = ctypes.POINTER(g.PyDictObject)() n_used = g.Py_ssize_t() helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((mp.contents.ma_fill.value <= mp.contents.ma_mask.value))) helpers.assign(n_used, mp.contents.ma_used.value) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.insertdict(mp, key, hash_a, value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.insertdict_by_entry(mp, key, hash_a, ep, value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((mp.contents.ma_used.value > n_used.value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((mp.contents.ma_fill.value * ctypes_wrapped.c_int(int(3L)).value))).value >= ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((mp.contents.ma_mask.value + ctypes_wrapped.c_int(int(1L)).value))).value * ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(g.dictresize(mp, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(2L)).value)) if ctypes_wrapped.c_int((mp.contents.ma_used.value > ctypes_wrapped.c_int(int(50000L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(4L)).value))).value * mp.contents.ma_used.value))).value))))).value del n_used del value del mp del key del hash_a del ep del op return ctypes_wrapped.c_int().value @staticmethod def PyDict_SetItem(op, key, value): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(803))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.assert_a.value(key) values.assert_a.value(value) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) else: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.dict_set_item_by_hash_or_entry(op, key, hash_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyDictEntry)), value))).value del hash_a del value del key del op return ctypes_wrapped.c_int().value @staticmethod def PyDict_DelItem(op, key): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) mp = ctypes.POINTER(g.PyDictObject)() hash_a = ctypes_wrapped.c_long() ep = ctypes.POINTER(g.PyDictEntry)() old_value = ctypes.POINTER(g.PyObject)() old_key = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(830))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.assert_a.value(key) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.set_key_error(key) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(old_key, (ctypes.cast(intp._storePtr(ep.contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(g.dummy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(ep.contents.me_key, (ctypes.cast(intp._storePtr(g.dummy), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(old_value, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ep.contents.me_value, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixDec(mp.contents.ma_used) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del old_value del old_key del mp del key del hash_a del ep del op return ctypes_wrapped.c_int().value @staticmethod def PyDict_Clear(op): first_iteration = None op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) mp = ctypes.POINTER(g.PyDictObject)() ep = ctypes.POINTER(g.PyDictEntry)() table = ctypes.POINTER(g.PyDictEntry)() table_is_malloced = ctypes_wrapped.c_int() fill_a = g.Py_ssize_t() small_copy = (g.PyDictEntry * 8L)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(table, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(table, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(table_is_malloced, ctypes_wrapped.c_int(((ctypes.cast(table, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p).value or 0))).value) helpers.assign(fill_a, mp.contents.ma_fill.value) if table_is_malloced.value: while True: values.memset.value(ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_size_t(ctypes.sizeof(mp.contents.ma_smalltable))) helpers.assign(mp.contents.ma_used, helpers.assign(mp.contents.ma_fill, ctypes_wrapped.c_int(int(0L)).value).value) while True: helpers.assignPtr(mp.contents.ma_table, (ctypes.cast(intp._storePtr(mp.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.ma_mask, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break elif ctypes_wrapped.c_int((fill_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: values.memcpy.value(ctypes.cast(small_copy, ctypes_wrapped.c_void_p), ctypes.cast(table, ctypes_wrapped.c_void_p), ctypes_wrapped.c_size_t(ctypes.sizeof(small_copy))) helpers.assignPtr(table, (ctypes.cast(intp._storePtr(small_copy), ctypes_wrapped.c_void_p).value or 0)) while True: values.memset.value(ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_size_t(ctypes.sizeof(mp.contents.ma_smalltable))) helpers.assign(mp.contents.ma_used, helpers.assign(mp.contents.ma_fill, ctypes_wrapped.c_int(int(0L)).value).value) while True: helpers.assignPtr(mp.contents.ma_table, (ctypes.cast(intp._storePtr(mp.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mp.contents.ma_mask, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if True: first_iteration = True helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(table), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.prefixIncPtr(ep) if ctypes_wrapped.c_int((fill_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if (ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0): helpers.prefixDec(fill_a) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if table_is_malloced.value: values.free.value(table) del fill_a del small_copy del mp del table del table_is_malloced del ep del op return @staticmethod def PyDict_Next(op, ppos, pkey, pvalue): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) ppos = ctypes.cast(ppos, ctypes.POINTER(g.Py_ssize_t)) pkey = ctypes.cast(pkey, ctypes.POINTER(ctypes.POINTER(g.PyObject))) pvalue = ctypes.cast(pvalue, ctypes.POINTER(ctypes.POINTER(g.PyObject))) i = g.Py_ssize_t() mask = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(i, ppos.contents.value) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyDictObject)).contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, ctypes.cast(op, ctypes.POINTER(g.PyDictObject)).contents.ma_mask.value) while ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value <= mask.value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(i) helpers.assign(ppos.contents, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int((i.value > mask.value)).value: return ctypes_wrapped.c_int(int(0L)).value if (ctypes.cast(pkey, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(pkey.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(pvalue, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(pvalue.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del pkey del i del mask del ep del ppos del pvalue del op return ctypes_wrapped.c_int().value @staticmethod def _PyDict_Next(op, ppos, pkey, pvalue, phash): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) ppos = ctypes.cast(ppos, ctypes.POINTER(g.Py_ssize_t)) pkey = ctypes.cast(pkey, ctypes.POINTER(ctypes.POINTER(g.PyObject))) pvalue = ctypes.cast(pvalue, ctypes.POINTER(ctypes.POINTER(g.PyObject))) phash = ctypes.cast(phash, ctypes.POINTER(ctypes_wrapped.c_long)) i = g.Py_ssize_t() mask = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(i, ppos.contents.value) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyDictObject)).contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, ctypes.cast(op, ctypes.POINTER(g.PyDictObject)).contents.ma_mask.value) while ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value <= mask.value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(i) helpers.assign(ppos.contents, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int((i.value > mask.value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(phash.contents, ctypes_wrapped.c_long(int(helpers.ptrArithmetic(ep, '+', i.value).contents.me_hash.value)).value) if (ctypes.cast(pkey, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(pkey.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(pvalue, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(pvalue.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del pkey del i del mask del ep del phash del ppos del pvalue del op return ctypes_wrapped.c_int().value @staticmethod def dict_dealloc(mp): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) ep = ctypes.POINTER(g.PyDictEntry)() fill_a = g.Py_ssize_t(int(mp.contents.ma_fill.value)) g.PyObject_GC_UnTrack(ctypes.cast(mp, ctypes_wrapped.c_void_p)) while True: _tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value < ctypes_wrapped.c_int(int(50L)).value)).value)).value: if (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0): helpers.prefixInc(_tstate.contents.trash_delete_nesting) if True: first_iteration = True helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(ep) if ctypes_wrapped.c_int((fill_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if (ctypes.cast(ep.contents.me_key, ctypes_wrapped.c_void_p).value or 0): helpers.prefixDec(fill_a) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(mp.contents.ma_table, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p).value or 0))).value: values.free.value(mp.contents.ma_table) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((g.numfree__dict.value < ctypes_wrapped.c_int(int(80L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(helpers.ptrArithmetic(g.free_list__dict, '+', helpers.postfixInc(g.numfree__dict).value).contents, (ctypes.cast(intp._storePtr(mp), ctypes_wrapped.c_void_p).value or 0)) else: helpers.checkedFuncPtrCall(ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p)) if (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0): helpers.prefixDec(_tstate.contents.trash_delete_nesting) if ctypes_wrapped.c_int(((ctypes.cast(_tstate.contents.trash_delete_later, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value <= ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyTrash_thread_destroy_chain() else: g._PyTrash_thread_deposit_object(ctypes.cast(mp, ctypes.POINTER(g.PyObject))) del _tstate if ctypes_wrapped.c_int(int(0L)).value: continue else: break del fill_a del mp del ep return @staticmethod def dict_print(mp, fp, flags): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) flags = ctypes_wrapped.c_int(int(flags.value)) i = g.Py_ssize_t() any_a = g.Py_ssize_t() status = ctypes_wrapped.c_int() helpers.assign(status, ctypes_wrapped.c_int(int(g.Py_ReprEnter(ctypes.cast(mp, ctypes.POINTER(g.PyObject))))).value) if ctypes_wrapped.c_int((status.value != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value: return status.value values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('{...}'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('{'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(any_a, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value <= mp.contents.ma_mask.value)).value: pass else: break ep = ctypes.cast(helpers.ptrArithmetic(mp.contents.ma_table, u'+', i.value), ctypes.POINTER(g.PyDictEntry)) pvalue = ctypes.cast(ep.contents.me_value, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(pvalue, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((helpers.postfixInc(any_a).value > ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_Print(ctypes.cast(ep.contents.me_key, ctypes.POINTER(g.PyObject)), fp, ctypes_wrapped.c_int(int(0L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.Py_ReprLeave(ctypes.cast(mp, ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(': '), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_Print(pvalue, fp, ctypes_wrapped.c_int(int(0L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.Py_ReprLeave(ctypes.cast(mp, ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pvalue, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del ep del pvalue values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('}'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.Py_ReprLeave(ctypes.cast(mp, ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int(0L)).value del fp del status del i del any_a del flags del mp return ctypes_wrapped.c_int().value @staticmethod def dict_repr(mp): goto = None while True: if (goto is None): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) i = g.Py_ssize_t() s = ctypes.POINTER(g.PyObject)() temp = ctypes.POINTER(g.PyObject)() colon = ctypes.POINTER(g.PyObject)() pieces = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() helpers.assign(i, ctypes_wrapped.c_int(int(g.Py_ReprEnter(ctypes.cast(mp, ctypes.POINTER(g.PyObject))))).value) if (not ctypes_wrapped.c_int((i.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return (ctypes.cast(intp._storePtr((ctypes.cast(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('{...}'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value else intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((mp.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('{}'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'Done' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(pieces, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(pieces, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'Done' continue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(colon, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(': '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(colon, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue goto = u'Done' continue if (goto == 4): goto = None if (goto is None): helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyDict_Next(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), ctypes.pointer(i), ctypes.pointer(key), ctypes.pointer(value)))).value): goto = 6 continue status = ctypes_wrapped.c_int() helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyString_Concat(ctypes.pointer(s), colon) g.PyString_ConcatAndDel(ctypes.pointer(s), intp._getPtr(g.PyObject_Repr(value), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 12 continue continue goto = 11 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'Done' continue if (goto == 13): goto = None if (goto is None): helpers.assign(status, ctypes_wrapped.c_int(int(g.PyList_Append(pieces, s))).value) if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue goto = u'Done' continue if (goto == 20): goto = None if (goto is None): del status goto = 5 continue if (goto == 6): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes.cast(pieces, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('{'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue goto = u'Done' continue if (goto == 21): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyString_ConcatAndDel(ctypes.pointer(s), temp) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue goto = u'Done' continue if (goto == 22): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('}'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue goto = u'Done' continue if (goto == 23): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((ctypes.cast(pieces, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyString_ConcatAndDel(ctypes.pointer(temp), s) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((ctypes.cast(pieces, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(temp), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue goto = u'Done' continue if (goto == 24): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue goto = u'Done' continue if (goto == 25): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyString_Join(s, pieces), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 26): goto = None if (goto is None): if (not True): goto = 27 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 29 continue pass goto = 28 continue if (goto == 29): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 31 continue continue goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 30): goto = None if (goto is None): goto = 26 continue if (goto == 27): goto = None if (goto == u'Done'): goto = None if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int(((ctypes.cast(pieces, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 43 continue continue goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 33 continue if (goto == 42): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto == 44): goto = None if (goto is None): if (not True): goto = 45 continue if (not ctypes_wrapped.c_int(((ctypes.cast(colon, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue pass goto = 46 continue if (goto == 47): goto = None if (goto == 48): goto = None if (goto is None): if (not True): goto = 49 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(colon, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue pass goto = 50 continue if (goto == 51): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(colon, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(colon, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 53 continue continue goto = 52 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 52): goto = None if (goto is None): goto = 48 continue if (goto == 49): goto = None if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 55 continue continue goto = 54 continue if (goto == 55): goto = None if (goto is None): goto = 45 continue if (goto == 54): goto = None if (goto is None): goto = 44 continue if (goto == 45): goto = None if (goto is None): g.Py_ReprLeave(ctypes.cast(mp, ctypes.POINTER(g.PyObject))) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del temp del i del value del pieces del s del colon del mp del key del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def dict_length(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) return mp.contents.ma_used.value del mp return g.Py_ssize_t().value @staticmethod def dict_subscript(mp, key): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) v = ctypes.POINTER(g.PyObject)() hash_a = ctypes_wrapped.c_long() ep = ctypes.POINTER(g.PyDictEntry)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(mp.contents.ma_table, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: missing = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() missing_str = ctypes.POINTER(g.PyObject)() helpers.assignPtr(missing, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_LookupSpecial(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), ctypes.cast(intp._make_string('__missing__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(missing_str)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(missing, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(missing, key, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(missing, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(missing, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(missing, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) elif (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int(0L)).value del res del missing_str del missing g.set_key_error(key) return ctypes_wrapped.c_int(int(0L)).value else: helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del ep del hash_a del mp del key del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_ass_sub(mp, v, w): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(g.PyDict_DelItem(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), v))).value else: return ctypes_wrapped.c_int(int(g.PyDict_SetItem(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), v, w))).value del mp del w del v return ctypes_wrapped.c_int().value dict_as_mapping = PyMappingMethods() # TODO init dict_as_mapping with PyMappingMethods(helpers.makeFuncPtr(lenfunc, dict_length), helpers.makeFuncPtr(binaryfunc, dict_subscript), helpers.makeFuncPtr(objobjargproc, dict_ass_sub)) @staticmethod def dict_keys(mp): goto = None while True: if (goto is None): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) v = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() j = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() mask = g.Py_ssize_t() n = g.Py_ssize_t() if (goto == u'again'): goto = None if (goto is None): helpers.assign(n, mp.contents.ma_used.value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((n.value != mp.contents.ma_used.value)).value): goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue pass goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 8 continue continue goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto is None): goto = u'again' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, mp.contents.ma_mask.value) if (not True): goto = 9 continue first_iteration = True (helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value), helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value))[1] if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not first_iteration): goto = 13 continue first_iteration = False goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value <= mask.value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue key = ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(j) del key if (goto == 16): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((j.value == n.value))) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del i del j del mask del n del mp del v del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def dict_values(mp): goto = None while True: if (goto is None): first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) v = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() j = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() mask = g.Py_ssize_t() n = g.Py_ssize_t() if (goto == u'again'): goto = None if (goto is None): helpers.assign(n, mp.contents.ma_used.value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((n.value != mp.contents.ma_used.value)).value): goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue pass goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 8 continue continue goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto is None): goto = u'again' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, mp.contents.ma_mask.value) if (not True): goto = 9 continue first_iteration = True (helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value), helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value))[1] if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not first_iteration): goto = 13 continue first_iteration = False goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value <= mask.value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue value = ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(j) del value if (goto == 16): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((j.value == n.value))) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del i del j del mask del n del mp del v del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def dict_items(mp): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) v = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() j = g.Py_ssize_t() n = g.Py_ssize_t() mask = g.Py_ssize_t() item = ctypes.POINTER(g.PyObject)() key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() ep = ctypes.POINTER(g.PyDictEntry)() if (goto == u'again'): goto = None if (goto is None): helpers.assign(n, mp.contents.ma_used.value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 6 continue first_iteration = False goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(item, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue pass goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 15 continue continue goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 9): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((n.value != mp.contents.ma_used.value)).value): goto = 16 continue if (goto == 17): goto = None if (goto is None): if (not True): goto = 18 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue pass goto = 19 continue if (goto == 20): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 22 continue continue goto = 21 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 21): goto = None if (goto is None): goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = u'again' continue if (goto == 16): goto = None if (goto is None): helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(mp.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, mp.contents.ma_mask.value) if (not True): goto = 23 continue first_iteration_a = True (helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value), helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value))[1] if (goto == 24): goto = None if (goto is None): if (not True): goto = 25 continue if (not first_iteration_a): goto = 27 continue first_iteration_a = False goto = 26 continue if (goto == 27): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value <= mask.value)).value): goto = 29 continue pass goto = 28 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue helpers.assignPtr(key, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(item, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', j.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(item, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(item, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(j) if (goto == 30): goto = None if (goto is None): goto = 24 continue if (goto == 25): goto = None if (goto == 23): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((j.value == n.value))) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del i del j del mask del value del n del item del mp del key del v del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def dict_fromkeys(cls, args): goto = None while True: if (goto is None): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) seq = ctypes.POINTER(g.PyObject)() value = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) it = ctypes.POINTER(g.PyObject)() key = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyObject)() status = ctypes_wrapped.c_int() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('fromkeys'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(seq), ctypes.pointer(value)))).value))).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallObject(cls, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.cast(d, ctypes.POINTER(g.PyDictObject)).contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 3 continue if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 4 continue mp = ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyDictObject)), ctypes.POINTER(g.PyDictObject)) oldvalue = ctypes.POINTER(g.PyObject)() pos = g.Py_ssize_t() key_a = ctypes.POINTER(g.PyObject)() hash_a = ctypes_wrapped.c_long() if (not ctypes_wrapped.c_int(int(g.dictresize(mp, ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size))).value): goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 11 continue continue goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 5): goto = None if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g._PyDict_Next(seq, ctypes.pointer(pos), ctypes.pointer(key_a), ctypes.pointer(oldvalue), ctypes.pointer(hash_a)))).value): goto = 13 continue helpers.postfixInc(ctypes.cast(key_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (not ctypes_wrapped.c_int(int(g.insertdict(mp, key_a, hash_a, value))).value): goto = 14 continue if (goto == 15): goto = None if (goto is None): if (not True): goto = 16 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue pass goto = 17 continue if (goto == 18): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 20 continue continue goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = 16 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 14): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(d), ctypes_wrapped.c_void_p).value or 0) del hash_a del key_a del mp del oldvalue del pos if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PySet_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFrozenSet_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 21 continue mp = ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyDictObject)), ctypes.POINTER(g.PyDictObject)) pos = g.Py_ssize_t() key_a = ctypes.POINTER(g.PyObject)() hash_a = ctypes_wrapped.c_long() if (not ctypes_wrapped.c_int(int(g.dictresize(mp, ctypes.cast(seq, ctypes.POINTER(g.PySetObject)).contents.used))).value): goto = 22 continue if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 22): goto = None if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g._PySet_NextEntry(seq, ctypes.pointer(pos), ctypes.pointer(key_a), ctypes.pointer(hash_a)))).value): goto = 30 continue helpers.postfixInc(ctypes.cast(key_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (not ctypes_wrapped.c_int(int(g.insertdict(mp, key_a, hash_a, value))).value): goto = 31 continue if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 31): goto = None if (goto is None): goto = 29 continue if (goto == 30): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(d), ctypes_wrapped.c_void_p).value or 0) del hash_a del key_a del mp del pos if (goto == 21): goto = None if (goto == 3): goto = None if (goto is None): helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(seq), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 44 continue continue goto = 43 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 46 continue if (goto == 47): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(key, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue helpers.assign(status, ctypes_wrapped.c_int(int(g.PyDict_SetItem(d, key, value))).value) if (goto == 49): goto = None if (goto is None): if (not True): goto = 50 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 52 continue pass goto = 51 continue if (goto == 52): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 51): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 54 continue continue goto = 53 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 55 continue goto = u'Fail' continue if (goto == 55): goto = None if (goto is None): goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 45 continue if (goto == 46): goto = None if (goto == 56): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(key, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 57 continue helpers.assign(status, ctypes_wrapped.c_int(int(g.PyObject_SetItem(d, key, value))).value) if (goto == 58): goto = None if (goto is None): if (not True): goto = 59 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 61 continue pass goto = 60 continue if (goto == 61): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 60): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 63 continue continue goto = 62 continue if (goto == 63): goto = None if (goto is None): goto = 59 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 64 continue goto = u'Fail' continue if (goto == 64): goto = None if (goto is None): goto = 56 continue if (goto == 57): goto = None if (goto == 45): goto = None if (goto is None): if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 65 continue goto = u'Fail' continue if (goto == 65): goto = None if (goto == 66): goto = None if (goto is None): if (not True): goto = 67 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 69 continue pass goto = 68 continue if (goto == 69): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 68): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 71 continue continue goto = 70 continue if (goto == 71): goto = None if (goto is None): goto = 67 continue if (goto == 70): goto = None if (goto is None): goto = 66 continue if (goto == 67): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(d), ctypes_wrapped.c_void_p).value or 0) if (goto == u'Fail'): goto = None if (goto == 72): goto = None if (goto is None): if (not True): goto = 73 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 75 continue pass goto = 74 continue if (goto == 75): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 74): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 77 continue continue goto = 76 continue if (goto == 77): goto = None if (goto is None): goto = 73 continue if (goto == 76): goto = None if (goto is None): goto = 72 continue if (goto == 73): goto = None if (goto == 78): goto = None if (goto is None): if (not True): goto = 79 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 81 continue pass goto = 80 continue if (goto == 81): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 80): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 83 continue continue goto = 82 continue if (goto == 83): goto = None if (goto is None): goto = 79 continue if (goto == 82): goto = None if (goto is None): goto = 78 continue if (goto == 79): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del status del d del seq del args del it del value del key del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def dict_update_common(self, args, kwds, methname): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) methname = ctypes.cast(methname, ctypes.POINTER(ctypes_wrapped.c_byte)) arg = ctypes.POINTER(g.PyObject)() result = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, methname, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(arg)))).value))).value: helpers.assign(result, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) elif ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int(g.PyObject_HasAttrString(arg, ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value: helpers.assign(result, ctypes_wrapped.c_int(int(g.PyDict_Merge(self, arg, ctypes_wrapped.c_int(int(1L))))).value) else: helpers.assign(result, ctypes_wrapped.c_int(int(g.PyDict_MergeFromSeq2(self, arg, ctypes_wrapped.c_int(int(1L))))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(result, ctypes_wrapped.c_int(int(g.PyDict_Merge(self, kwds, ctypes_wrapped.c_int(int(1L))))).value) return result.value del methname del kwds del self del args del result del arg return ctypes_wrapped.c_int().value @staticmethod def dict_update(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.dict_update_common(self, args, kwds, ctypes.cast(intp._make_string('update'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return ctypes_wrapped.c_int(int(0L)).value del self del args del kwds return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_MergeFromSeq2(d, seq2, override): goto = None while True: if (goto is None): first_iteration = None d = ctypes.cast(d, ctypes.POINTER(g.PyObject)) seq2 = ctypes.cast(seq2, ctypes.POINTER(g.PyObject)) override = ctypes_wrapped.c_int(int(override.value)) it = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() item = ctypes.POINTER(g.PyObject)() fast = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(seq2, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(seq2), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 6 continue first_iteration = False goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.prefixInc(i) if (goto == 5): goto = None if (goto is None): key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() n = g.Py_ssize_t() helpers.assignPtr(fast, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(item, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 8 continue goto = u'Fail' continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(fast, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Fast(item, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(fast, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue if (not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value): goto = 10 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('cannot convert dictionary update sequence element #%zd to a sequence'), ctypes.POINTER(ctypes_wrapped.c_byte)), i), ctypes.POINTER(g.PyObject)) if (goto == 10): goto = None if (goto is None): goto = u'Fail' continue if (goto == 9): goto = None if (goto is None): helpers.assign(n, (ctypes_wrapped.c_long(int(ctypes.cast(fast, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(fast, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_long(int(ctypes.cast(fast, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) if (not ctypes_wrapped.c_int((n.value != ctypes_wrapped.c_int(int(2L)).value)).value): goto = 11 continue intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('dictionary update sequence element #%zd has length %zd; 2 is required'), ctypes.POINTER(ctypes_wrapped.c_byte)), i, n), ctypes.POINTER(g.PyObject)) goto = u'Fail' continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(key, (ctypes.cast(intp._storePtr((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(fast, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(fast, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(helpers.ptrArithmetic(ctypes.cast(fast, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(fast, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(fast, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(helpers.ptrArithmetic(ctypes.cast(fast, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((override.value or ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItem(d, key), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 12 continue status = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyDict_SetItem(d, key, value))).value)) if (not ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'Fail' continue if (goto == 13): goto = None if (goto is None): del status if (goto == 12): goto = None if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(fast, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(fast, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(fast, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 21): goto = None if (goto is None): del value del key del n goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto is None): helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) goto = u'Return' continue if (goto == u'Fail'): goto = None if (goto == 26): goto = None if (goto is None): if (not True): goto = 27 continue if (not ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 29 continue pass goto = 28 continue if (goto == 29): goto = None if (goto == 30): goto = None if (goto is None): if (not True): goto = 31 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 33 continue pass goto = 32 continue if (goto == 33): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 32): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 35 continue continue goto = 34 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 34): goto = None if (goto is None): goto = 30 continue if (goto == 31): goto = None if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 27 continue if (goto == 36): goto = None if (goto is None): goto = 26 continue if (goto == 27): goto = None if (goto == 38): goto = None if (goto is None): if (not True): goto = 39 continue if (not ctypes_wrapped.c_int(((ctypes.cast(fast, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 41 continue pass goto = 40 continue if (goto == 41): goto = None if (goto == 42): goto = None if (goto is None): if (not True): goto = 43 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(fast, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue pass goto = 44 continue if (goto == 45): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(fast, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(fast, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 44): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 47 continue continue goto = 46 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 46): goto = None if (goto is None): goto = 42 continue if (goto == 43): goto = None if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 49 continue continue goto = 48 continue if (goto == 49): goto = None if (goto is None): goto = 39 continue if (goto == 48): goto = None if (goto is None): goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.assign(i, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == u'Return'): goto = None if (goto == 50): goto = None if (goto is None): if (not True): goto = 51 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 53 continue pass goto = 52 continue if (goto == 53): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 52): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 55 continue continue goto = 54 continue if (goto == 55): goto = None if (goto is None): goto = 51 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 51): goto = None if (goto is None): return ctypes_wrapped.c_int(int(i.value)).value del d del i del it del fast del item del override del seq2 return ctypes_wrapped.c_int().value break @staticmethod def PyDict_Update(a, b): a = ctypes.cast(a, ctypes.POINTER(g.PyObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.PyDict_Merge(a, b, ctypes_wrapped.c_int(int(1L))))).value del a del b return ctypes_wrapped.c_int().value @staticmethod def PyDict_Merge(a, b, override): first_iteration_a = None first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyObject)) override = ctypes_wrapped.c_int(int(override.value)) mp = ctypes.POINTER(g.PyDictObject)() other = ctypes.POINTER(g.PyDictObject)() i = g.Py_ssize_t() entry = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1562))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(other, (ctypes.cast(intp._storePtr(ctypes.cast(b, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(other, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((other.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((mp.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(override, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((mp.contents.ma_fill.value + other.contents.ma_used.value))).value * ctypes_wrapped.c_int(int(3L)).value))).value >= ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((mp.contents.ma_mask.value + ctypes_wrapped.c_int(int(1L)).value))).value * ctypes_wrapped.c_int(int(2L)).value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.dictresize(mp, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((mp.contents.ma_used.value + other.contents.ma_used.value))).value * ctypes_wrapped.c_int(int(2L)).value))).value))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value <= other.contents.ma_mask.value)).value: pass else: break helpers.assignPtr(entry, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(other.contents.ma_table, '+', i.value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(entry.contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((override.value or ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItem(a, entry.contents.me_key), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.postfixInc(ctypes.cast(entry.contents.me_key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(entry.contents.me_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.insertdict(mp, entry.contents.me_key, ctypes_wrapped.c_long(int(entry.contents.me_hash.value)), entry.contents.me_value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: keys = ctypes.cast(intp._getPtr(g.PyObject_CallMethod(b, ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) iter_a = ctypes.POINTER(g.PyObject)() key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() status = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(keys, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(iter_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(keys), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(keys, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(keys, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(keys, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(iter_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration_a = True helpers.assignPtr(key, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(iter_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_a: first_iteration_a = False else: helpers.assignPtr(key, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyIter_Next(iter_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0): pass else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not override.value))).value and ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g.PyDict_GetItem(a, key), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break continue helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(b, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(status, ctypes_wrapped.c_int(int(g.PyDict_SetItem(a, key, value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del keys del status del iter_a del value del key return ctypes_wrapped.c_int(int(0L)).value del a del b del i del other del mp del override del entry return ctypes_wrapped.c_int().value @staticmethod def dict_copy(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Copy(ctypes.cast(mp, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_Copy(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) copy = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1658))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(copy, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(copy, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_Merge(copy, o, ctypes_wrapped.c_int(int(1L))))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(copy), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(copy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(copy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(copy, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del copy del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_Size(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1674))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)).contents.ma_used.value del mp return g.Py_ssize_t().value @staticmethod def PyDict_Keys(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1684))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.dict_keys(ctypes.cast(mp, ctypes.POINTER(g.PyDictObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_Values(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1694))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.dict_values(ctypes.cast(mp, ctypes.POINTER(g.PyDictObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_Items(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(mp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(1704))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.dict_items(ctypes.cast(mp, ctypes.POINTER(g.PyDictObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def characterize(a, b, pval): goto = None while True: if (goto is None): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyDictObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyDictObject)) pval = ctypes.cast(pval, ctypes.POINTER(ctypes.POINTER(g.PyObject))) akey = ctypes.POINTER(g.PyObject)() aval = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() cmp_a = ctypes_wrapped.c_int() if (not True): goto = 1 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 2): goto = None if (goto is None): if (not True): goto = 3 continue if (not first_iteration): goto = 5 continue first_iteration = False goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value <= a.contents.ma_mask.value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 6): goto = None if (goto is None): thiskey = ctypes.POINTER(g.PyObject)() thisaval = ctypes.POINTER(g.PyObject)() thisbval = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(a.contents.ma_table, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(thiskey, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ma_table, '+', i.value).contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (not ctypes_wrapped.c_int(((ctypes.cast(akey, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(akey, thiskey, ctypes_wrapped.c_int(int(0L))))).value) if (not ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): goto = u'Fail' continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value > a.contents.ma_mask.value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(a.contents.ma_table, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 17 continue if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue pass goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 23 continue continue goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 19): goto = None if (goto is None): continue if (goto == 17): goto = None if (goto == 9): goto = None if (goto is None): helpers.assignPtr(thisaval, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ma_table, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(thisaval) helpers.postfixInc(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(thisbval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(ctypes.cast(b, ctypes.POINTER(g.PyObject)), thiskey), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(thisbval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue helpers.assign(cmp_a, ctypes_wrapped.c_int(int(0L)).value) goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(thisaval, thisbval, ctypes_wrapped.c_int(int(2L))))).value) if (not ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue if (goto == 27): goto = None if (goto is None): if (not True): goto = 28 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 32 continue continue goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 31): goto = None if (goto is None): goto = 27 continue if (goto == 28): goto = None if (goto == 33): goto = None if (goto is None): if (not True): goto = 34 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 36 continue pass goto = 35 continue if (goto == 36): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 35): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 38 continue continue goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = 34 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto is None): goto = u'Fail' continue if (goto == 26): goto = None if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int((cmp_a.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 40 continue if (goto == 41): goto = None if (goto is None): if (not True): goto = 42 continue if (not ctypes_wrapped.c_int(((ctypes.cast(akey, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue pass goto = 43 continue if (goto == 44): goto = None if (goto == 45): goto = None if (goto is None): if (not True): goto = 46 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(akey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue pass goto = 47 continue if (goto == 48): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(akey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(akey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 47): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 50 continue continue goto = 49 continue if (goto == 50): goto = None if (goto is None): goto = 46 continue if (goto == 49): goto = None if (goto is None): goto = 45 continue if (goto == 46): goto = None if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 52 continue continue goto = 51 continue if (goto == 52): goto = None if (goto is None): goto = 42 continue if (goto == 51): goto = None if (goto is None): goto = 41 continue if (goto == 42): goto = None if (goto == 53): goto = None if (goto is None): if (not True): goto = 54 continue if (not ctypes_wrapped.c_int(((ctypes.cast(aval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue pass goto = 55 continue if (goto == 56): goto = None if (goto == 57): goto = None if (goto is None): if (not True): goto = 58 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(aval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 60 continue pass goto = 59 continue if (goto == 60): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 62 continue continue goto = 61 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 61): goto = None if (goto is None): goto = 57 continue if (goto == 58): goto = None if (goto == 55): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 64 continue continue goto = 63 continue if (goto == 64): goto = None if (goto is None): goto = 54 continue if (goto == 63): goto = None if (goto is None): goto = 53 continue if (goto == 54): goto = None if (goto is None): helpers.assignPtr(akey, (ctypes.cast(intp._storePtr(thiskey), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(aval, (ctypes.cast(intp._storePtr(thisaval), ctypes_wrapped.c_void_p).value or 0)) goto = 39 continue if (goto == 40): goto = None if (goto == 65): goto = None if (goto is None): if (not True): goto = 66 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 68 continue pass goto = 67 continue if (goto == 68): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(thiskey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 67): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 70 continue continue goto = 69 continue if (goto == 70): goto = None if (goto is None): goto = 66 continue if (goto == 69): goto = None if (goto is None): goto = 65 continue if (goto == 66): goto = None if (goto == 71): goto = None if (goto is None): if (not True): goto = 72 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 74 continue pass goto = 73 continue if (goto == 74): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(thisaval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 73): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 76 continue continue goto = 75 continue if (goto == 76): goto = None if (goto is None): goto = 72 continue if (goto == 75): goto = None if (goto is None): goto = 71 continue if (goto == 72): goto = None if (goto == 39): goto = None if (goto is None): del thisaval del thisbval del thiskey goto = 2 continue if (goto == 3): goto = None if (goto == 1): goto = None if (goto is None): helpers.assignPtr(pval.contents, (ctypes.cast(intp._storePtr(aval), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(akey), ctypes_wrapped.c_void_p).value or 0) if (goto == u'Fail'): goto = None if (goto == 77): goto = None if (goto is None): if (not True): goto = 78 continue if (not ctypes_wrapped.c_int(((ctypes.cast(akey, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 80 continue pass goto = 79 continue if (goto == 80): goto = None if (goto == 81): goto = None if (goto is None): if (not True): goto = 82 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(akey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 84 continue pass goto = 83 continue if (goto == 84): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(akey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(akey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 83): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 86 continue continue goto = 85 continue if (goto == 86): goto = None if (goto is None): goto = 82 continue if (goto == 85): goto = None if (goto is None): goto = 81 continue if (goto == 82): goto = None if (goto == 79): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 88 continue continue goto = 87 continue if (goto == 88): goto = None if (goto is None): goto = 78 continue if (goto == 87): goto = None if (goto is None): goto = 77 continue if (goto == 78): goto = None if (goto == 89): goto = None if (goto is None): if (not True): goto = 90 continue if (not ctypes_wrapped.c_int(((ctypes.cast(aval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 92 continue pass goto = 91 continue if (goto == 92): goto = None if (goto == 93): goto = None if (goto is None): if (not True): goto = 94 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(aval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 96 continue pass goto = 95 continue if (goto == 96): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 95): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 98 continue continue goto = 97 continue if (goto == 98): goto = None if (goto is None): goto = 94 continue if (goto == 97): goto = None if (goto is None): goto = 93 continue if (goto == 94): goto = None if (goto == 91): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 100 continue continue goto = 99 continue if (goto == 100): goto = None if (goto is None): goto = 90 continue if (goto == 99): goto = None if (goto is None): goto = 89 continue if (goto == 90): goto = None if (goto is None): helpers.assignPtr(pval.contents, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del a del b del cmp_a del i del akey del pval del aval return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def dict_compare(a, b): goto = None while True: if (goto is None): a = ctypes.cast(a, ctypes.POINTER(g.PyDictObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyDictObject)) adiff = ctypes.POINTER(g.PyObject)() bdiff = ctypes.POINTER(g.PyObject)() aval = ctypes.POINTER(g.PyObject)() bval = ctypes.POINTER(g.PyObject)() res = ctypes_wrapped.c_int() if (not ctypes_wrapped.c_int((a.contents.ma_used.value < b.contents.ma_used.value)).value): goto = 2 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value goto = 1 continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((a.contents.ma_used.value > b.contents.ma_used.value)).value): goto = 3 continue return ctypes_wrapped.c_int(int(1L)).value if (goto == 3): goto = None if (goto == 1): goto = None if (goto is None): helpers.assignPtr(bdiff, (ctypes.cast(intp._storePtr(helpers.assignPtr(bval, ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(adiff, (ctypes.cast(intp._storePtr(intp._getPtr(g.characterize(a, b, ctypes.pointer(aval)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(adiff, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue values.assert_a.value(ctypes_wrapped.c_int((not (ctypes.cast(aval, ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(res, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value) goto = u'Finished' continue if (goto == 4): goto = None if (goto is None): helpers.assignPtr(bdiff, (ctypes.cast(intp._storePtr(intp._getPtr(g.characterize(b, a, ctypes.pointer(bval)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(bdiff, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue values.assert_a.value(ctypes_wrapped.c_int((not (ctypes.cast(bval, ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(res, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) goto = u'Finished' continue if (goto == 5): goto = None if (goto is None): helpers.assign(res, ctypes_wrapped.c_int(int(0L)).value) if (not (ctypes.cast(bdiff, ctypes_wrapped.c_void_p).value or 0)): goto = 6 continue helpers.assign(res, ctypes_wrapped.c_int(int(g.PyObject_Compare(adiff, bdiff))).value) if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((res.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(bval, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 7 continue helpers.assign(res, ctypes_wrapped.c_int(int(g.PyObject_Compare(aval, bval))).value) if (goto == 7): goto = None if (goto == u'Finished'): goto = None if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue if (not ctypes_wrapped.c_int(((ctypes.cast(adiff, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto == 12): goto = None if (goto is None): if (not True): goto = 13 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(adiff, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(adiff, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(adiff, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 9 continue if (goto == 18): goto = None if (goto is None): goto = 8 continue if (goto == 9): goto = None if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not ctypes_wrapped.c_int(((ctypes.cast(bdiff, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto == 24): goto = None if (goto is None): if (not True): goto = 25 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bdiff, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue pass goto = 26 continue if (goto == 27): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bdiff, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bdiff, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 29 continue continue goto = 28 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 25): goto = None if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 31 continue continue goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 21 continue if (goto == 30): goto = None if (goto is None): goto = 20 continue if (goto == 21): goto = None if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int(((ctypes.cast(aval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(aval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 43 continue continue goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 33 continue if (goto == 42): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto == 44): goto = None if (goto is None): if (not True): goto = 45 continue if (not ctypes_wrapped.c_int(((ctypes.cast(bval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue pass goto = 46 continue if (goto == 47): goto = None if (goto == 48): goto = None if (goto is None): if (not True): goto = 49 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue pass goto = 50 continue if (goto == 51): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 53 continue continue goto = 52 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 52): goto = None if (goto is None): goto = 48 continue if (goto == 49): goto = None if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 55 continue continue goto = 54 continue if (goto == 55): goto = None if (goto is None): goto = 45 continue if (goto == 54): goto = None if (goto is None): goto = 44 continue if (goto == 45): goto = None if (goto is None): return res.value del a del bdiff del b del res del aval del adiff del bval return ctypes_wrapped.c_int().value break @staticmethod def dict_equal(a, b): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyDictObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyDictObject)) i = g.Py_ssize_t() if ctypes_wrapped.c_int((a.contents.ma_used.value != b.contents.ma_used.value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value <= a.contents.ma_mask.value)).value: pass else: break aval = ctypes.cast(helpers.ptrArithmetic(a.contents.ma_table, '+', i.value).contents.me_value, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(aval, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: cmp_a = ctypes_wrapped.c_int() bval = ctypes.POINTER(g.PyObject)() key = ctypes.cast(helpers.ptrArithmetic(a.contents.ma_table, '+', i.value).contents.me_key, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(aval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(bval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(ctypes.cast(b, ctypes.POINTER(g.PyObject)), key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(bval, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(aval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(aval, bval, ctypes_wrapped.c_int(int(2L))))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(aval, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(aval, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((cmp_a.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return cmp_a.value del bval del cmp_a del key del aval return ctypes_wrapped.c_int(int(1L)).value del a del i del b return ctypes_wrapped.c_int().value @staticmethod def dict_richcompare(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) cmp_a = ctypes_wrapped.c_int() res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value or ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(3L)).value)).value)).value: helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.dict_equal(ctypes.cast(v, ctypes.POINTER(g.PyDictObject)), ctypes.cast(w, ctypes.POINTER(g.PyDictObject))))).value) if ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((cmp_a.value == ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value)).value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) else: if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('dict inequality comparisons not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del op del cmp_a del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_contains(mp, key): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long() ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del hash_a del mp del key del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_has_key(mp, key): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('dict.has_key() not supported in 3.x; use the in operator'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.dict_contains(mp, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mp del key return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_get(mp, args): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) key = ctypes.POINTER(g.PyObject)() failobj = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) val = ctypes.POINTER(g.PyObject)() hash_a = ctypes_wrapped.c_long() ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('get'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(key), ctypes.pointer(failobj)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(val, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(val, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(val, (ctypes.cast(intp._storePtr(failobj), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(val, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(val), ctypes_wrapped.c_void_p).value or 0) del val del args del failobj del mp del key del hash_a del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_setdefault(mp, args): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) key = ctypes.POINTER(g.PyObject)() failobj = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) val = ctypes.POINTER(g.PyObject)() hash_a = ctypes_wrapped.c_long() ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('setdefault'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(key), ctypes.pointer(failobj)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(val, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(val, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.dict_set_item_by_hash_or_entry(ctypes.cast(mp, ctypes.POINTER(g.PyObject)), key, hash_a, ep, failobj))).value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(val, (ctypes.cast(intp._storePtr(failobj), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(val, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(val, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(val), ctypes_wrapped.c_void_p).value or 0) del val del args del failobj del mp del key del hash_a del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_clear(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) g.PyDict_Clear(ctypes.cast(mp, ctypes.POINTER(g.PyObject))) return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_pop(mp, args): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long() ep = ctypes.POINTER(g.PyDictEntry)() old_value = ctypes.POINTER(g.PyObject)() old_key = ctypes.POINTER(g.PyObject)() key = ctypes.POINTER(g.PyObject)() deflt = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('pop'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(key), ctypes.pointer(deflt)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((mp.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(deflt, ctypes_wrapped.c_void_p).value or 0): helpers.postfixInc(ctypes.cast(deflt, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(deflt), ctypes_wrapped.c_void_p).value or 0) g.set_key_error(key) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(deflt, ctypes_wrapped.c_void_p).value or 0): helpers.postfixInc(ctypes.cast(deflt, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(deflt), ctypes_wrapped.c_void_p).value or 0) g.set_key_error(key) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(old_key, (ctypes.cast(intp._storePtr(ep.contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(g.dummy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(ep.contents.me_key, (ctypes.cast(intp._storePtr(g.dummy), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(old_value, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ep.contents.me_value, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixDec(mp.contents.ma_used) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(old_value), ctypes_wrapped.c_void_p).value or 0) del deflt del args del old_value del old_key del mp del key del hash_a del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_popitem(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) i = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() res = ctypes.POINTER(g.PyObject)() helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((mp.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_SetString(g.PyExc_KeyError, ctypes.cast(intp._make_string('popitem(): dictionary is empty'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(mp.contents.ma_table, '+', ctypes_wrapped.c_int(int(0L)).value).contents)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(i, ep.contents.me_hash.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value > mp.contents.ma_mask.value)).value or ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(1L)).value)).value)).value: helpers.assign(i, ctypes_wrapped.c_int(int(1L)).value) while ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(mp.contents.ma_table, '+', i.value).contents)), ctypes_wrapped.c_void_p).value or 0)).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value > mp.contents.ma_mask.value)).value: helpers.assign(i, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(res, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ep.contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(res, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(ep.contents.me_value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(g.dummy, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(ep.contents.me_key, (ctypes.cast(intp._storePtr(g.dummy), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ep.contents.me_value, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixDec(mp.contents.ma_used) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(mp.contents.ma_table, '+', ctypes_wrapped.c_int(int(0L)).value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(helpers.ptrArithmetic(mp.contents.ma_table, '+', ctypes_wrapped.c_int(int(0L)).value).contents.me_hash, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del i del res del mp del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_traverse(op, visit, arg): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) i = g.Py_ssize_t() pk = ctypes.POINTER(g.PyObject)() pv = ctypes.POINTER(g.PyObject)() while ctypes_wrapped.c_int(int(g.PyDict_Next(op, ctypes.pointer(i), ctypes.pointer(pk), ctypes.pointer(pv)))).value: while True: if (ctypes.cast(pk, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pk, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(pv, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pv, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del pv del i del visit del arg del pk del op return ctypes_wrapped.c_int().value @staticmethod def dict_tp_clear(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) g.PyDict_Clear(op) return ctypes_wrapped.c_int(int(0L)).value del op return ctypes_wrapped.c_int().value @staticmethod def dict_iterkeys(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyDictObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dict_a, ctypes.pointer(g.PyDictIterKey_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_itervalues(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyDictObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dict_a, ctypes.pointer(g.PyDictIterValue_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_iteritems(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyDictObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dict_a, ctypes.pointer(g.PyDictIterItem_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_sizeof(mp): mp = ctypes.cast(mp, ctypes.POINTER(g.PyDictObject)) res = g.Py_ssize_t() helpers.assign(res, ctypes_wrapped.c_size_t(248).value) if ctypes_wrapped.c_int(((ctypes.cast(mp.contents.ma_table, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(mp.contents.ma_smalltable, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(res, ctypes_wrapped.c_ulong(int((res.value + ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((mp.contents.ma_mask.value + ctypes_wrapped.c_int(int(1L)).value))).value * ctypes_wrapped.c_size_t(24).value))).value))).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(res), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) has_key__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init has_key__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) contains__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init contains__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) getitem__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init getitem__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) sizeof__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init sizeof__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) get__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init get__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) setdefault_doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init setdefault_doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) pop__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init pop__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) popitem__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init popitem__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) keys__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init keys__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) items__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init items__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) values__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init values__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) update__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init update__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) fromkeys__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init fromkeys__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) clear__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init clear__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) copy__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init copy__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) iterkeys__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init iterkeys__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) itervalues__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init itervalues__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) iteritems__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init iteritems__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) viewkeys__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init viewkeys__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) viewitems__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init viewitems__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) viewvalues__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init viewvalues__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) mapp_methods = (PyMethodDef * 22)() # TODO init mapp_methods with (PyMethodDef * 22)(structs.PyMethodDef(ctypes.cast(intp._make_string('__contains__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_contains), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value | ctypes_wrapped.c_int(int(64L)).value))).value)), ctypes.cast(contains__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_subscript), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value | ctypes_wrapped.c_int(int(64L)).value))).value)), ctypes.cast(getitem__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__sizeof__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_sizeof), ctypes_wrapped.c_int(int(4L)), ctypes.cast(sizeof__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('has_key'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_has_key), ctypes_wrapped.c_int(int(8L)), ctypes.cast(has_key__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_get), ctypes_wrapped.c_int(int(1L)), ctypes.cast(get__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('setdefault'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_setdefault), ctypes_wrapped.c_int(int(1L)), ctypes.cast(setdefault_doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('pop'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_pop), ctypes_wrapped.c_int(int(1L)), ctypes.cast(pop__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('popitem'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_popitem), ctypes_wrapped.c_int(int(4L)), ctypes.cast(popitem__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_keys), ctypes_wrapped.c_int(int(4L)), ctypes.cast(keys__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('items'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_items), ctypes_wrapped.c_int(int(4L)), ctypes.cast(items__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('values'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_values), ctypes_wrapped.c_int(int(4L)), ctypes.cast(values__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('viewkeys'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dictkeys_new), ctypes_wrapped.c_int(int(4L)), ctypes.cast(viewkeys__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('viewitems'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dictitems_new), ctypes_wrapped.c_int(int(4L)), ctypes.cast(viewitems__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('viewvalues'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dictvalues_new), ctypes_wrapped.c_int(int(4L)), ctypes.cast(viewvalues__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('update'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_update), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(update__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('fromkeys'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_fromkeys), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(16L)).value))).value)), ctypes.cast(fromkeys__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('clear'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_clear), ctypes_wrapped.c_int(int(4L)), ctypes.cast(clear__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('copy'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_copy), ctypes_wrapped.c_int(int(4L)), ctypes.cast(copy__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('iterkeys'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_iterkeys), ctypes_wrapped.c_int(int(4L)), ctypes.cast(iterkeys__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('itervalues'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_itervalues), ctypes_wrapped.c_int(int(4L)), ctypes.cast(itervalues__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('iteritems'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dict_iteritems), ctypes_wrapped.c_int(int(4L)), ctypes.cast(iteritems__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) @staticmethod def PyDict_Contains(op, key): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long() mp = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyDictObject)), ctypes.POINTER(g.PyDictObject)) ep = ctypes.POINTER(g.PyDictEntry)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((helpers.assign(hash_a, ctypes.cast(key, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: helpers.assign(hash_a, ctypes_wrapped.c_long(int(g.PyObject_Hash(key))).value) if ctypes_wrapped.c_int((hash_a.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value))).value del ep del hash_a del mp del key del op return ctypes_wrapped.c_int().value @staticmethod def _PyDict_Contains(op, key, hash_a): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) hash_a = ctypes_wrapped.c_long(int(hash_a.value)) mp = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyDictObject)), ctypes.POINTER(g.PyDictObject)) ep = ctypes.POINTER(g.PyDictEntry)() helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.ma_lookup, mp, key, hash_a), ctypes.POINTER(g.PyDictEntry))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(((ctypes.cast(ep, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(((ctypes.cast(ep.contents.me_value, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value))).value del ep del hash_a del mp del key del op return ctypes_wrapped.c_int().value dict_as_sequence = PySequenceMethods() # TODO init dict_as_sequence with PySequenceMethods(ctypes.CFUNCTYPE(helpers.fixReturnType(Py_ssize_t), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyDict_Contains), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value)) @staticmethod def dict_new(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) self = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(type_a.contents.tp_alloc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.assignPtr(self, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_alloc, type_a, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: d = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyDictObject)), ctypes.POINTER(g.PyDictObject)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(d.contents.ma_table, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((d.contents.ma_fill.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((d.contents.ma_used.value == ctypes_wrapped.c_int(int(0L)).value)).value))) while True: helpers.assignPtr(d.contents.ma_table, (ctypes.cast(intp._storePtr(d.contents.ma_smalltable), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(d.contents.ma_mask, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(d.contents.ma_lookup, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyDictEntry)), ctypes.POINTER(g.PyDictObject), ctypes.POINTER(g.PyObject), ctypes_wrapped.c_long), g.lookdict_string), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value: while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(d, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break del d return (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0) del type_a del args del kwds del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dict_init(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.dict_update_common(self, args, kwds, ctypes.cast(intp._make_string('dict'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value del self del args del kwds return ctypes_wrapped.c_int().value @staticmethod def dict_iter(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyDictObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dict_a, ctypes.pointer(g.PyDictIterKey_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) dictionary_doc = (ctypes_wrapped.c_byte * 1)() # TODO init dictionary_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) PyDict_Type = PyTypeObject() # TODO init PyDict_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dict'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(248).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dict_dealloc), helpers.makeFuncPtr(printfunc, dict_print), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(cmpfunc, dict_compare), helpers.makeFuncPtr(reprfunc, dict_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), ctypes.pointer(dict_as_sequence), ctypes.pointer(dict_as_mapping), helpers.makeFuncPtr(hashfunc, PyObject_HashNotImplemented), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value)), ctypes.cast(dictionary_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), dict_traverse), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject)), dict_tp_clear), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), dict_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(getiterfunc, dict_iter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(mapp_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), dict_init), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t), PyType_GenericAlloc), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), dict_new), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_GC_Del)) @staticmethod def PyDict_GetItemString(v, key): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) kv = ctypes.POINTER(g.PyObject)() rv = ctypes.POINTER(g.PyObject)() helpers.assignPtr(kv, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(kv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(rv, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(v, kv), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kv, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(rv), ctypes_wrapped.c_void_p).value or 0) del rv del kv del key del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDict_SetItemString(v, key, item): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) kv = ctypes.POINTER(g.PyObject)() err = ctypes_wrapped.c_int() helpers.assignPtr(kv, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(kv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value g.PyString_InternInPlace(ctypes.pointer(kv)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(v, kv, item))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kv, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return err.value del item del err del kv del key del v return ctypes_wrapped.c_int().value @staticmethod def PyDict_DelItemString(v, key): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) kv = ctypes.POINTER(g.PyObject)() err = ctypes_wrapped.c_int() helpers.assignPtr(kv, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(kv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_DelItem(v, kv))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kv, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return err.value del err del kv del key del v return ctypes_wrapped.c_int().value dictiterobject = structs._anonymous_dictiterobject @staticmethod def dictiter_new(dict_a, itertype): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyDictObject)) itertype = ctypes.cast(itertype, ctypes.POINTER(g.PyTypeObject)) di = ctypes.POINTER(g.dictiterobject)() helpers.assignPtr(di, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(itertype), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.dictiterobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(di, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(di.contents.di_dict, (ctypes.cast(intp._storePtr(dict_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(di.contents.di_used, dict_a.contents.ma_used.value) helpers.assign(di.contents.di_pos, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(di.contents.len, dict_a.contents.ma_used.value) if ctypes_wrapped.c_int(((ctypes.cast(itertype, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDictIterItem_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(di.contents.di_result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(g._Py_NoneStruct), ctypes.pointer(g._Py_NoneStruct)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(di.contents.di_result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(di, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(di, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(di, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value else: helpers.assignPtr(di.contents.di_result, ctypes_wrapped.c_int(int(0L)).value) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(di, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(di, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a del itertype del di return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictiter_dealloc(di): di = ctypes.cast(di, ctypes.POINTER(g.dictiterobject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(di.contents.di_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(di.contents.di_result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(di.contents.di_result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(di.contents.di_result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(di.contents.di_result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(di, ctypes_wrapped.c_void_p)) del di return @staticmethod def dictiter_traverse(di, visit, arg): di = ctypes.cast(di, ctypes.POINTER(g.dictiterobject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) while True: if (ctypes.cast(di.contents.di_dict, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(di.contents.di_result, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(di.contents.di_result, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del arg del visit del di return ctypes_wrapped.c_int().value @staticmethod def dictiter_len(di): di = ctypes.cast(di, ctypes.POINTER(g.dictiterobject)) len_a = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(di.contents.di_dict, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((di.contents.di_used.value == di.contents.di_dict.contents.ma_used.value)).value)).value: helpers.assign(len_a, di.contents.len.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSize_t(ctypes_wrapped.c_ulong(int(len_a.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del len_a del di return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) length_hint_doc__dict = (ctypes_wrapped.c_byte * 1)() # TODO init length_hint_doc__dict with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) dictiter_methods = (PyMethodDef * 2)() # TODO init dictiter_methods with (PyMethodDef * 2)(structs.PyMethodDef(ctypes.cast(intp._make_string('__length_hint__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, dictiter_len), ctypes_wrapped.c_int(int(4L)), ctypes.cast(length_hint_doc__dict, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) @staticmethod def dictiter_iternextkey(di): goto = None while True: if (goto is None): di = ctypes.cast(di, ctypes.POINTER(g.dictiterobject)) key = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() mask = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() d = ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyDictObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if (not ctypes_wrapped.c_int((di.contents.di_used.value != d.contents.ma_used.value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('dictionary changed size during iteration'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(di.contents.di_used, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assign(i, di.contents.di_pos.value) if (not ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'fail' continue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(d.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, d.contents.ma_mask.value) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value <= mask.value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 5 continue helpers.postfixInc(i) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assign(di.contents.di_pos, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int((i.value > mask.value)).value): goto = 6 continue goto = u'fail' continue if (goto == 6): goto = None if (goto is None): helpers.postfixDec(di.contents.len) helpers.assignPtr(key, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0) if (goto == u'fail'): goto = None if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 12 continue continue goto = 11 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(di.contents.di_dict, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del d del di del i del mask del key del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break PyDictIterKey_Type = PyTypeObject() # TODO init PyDictIterKey_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dictionary-keyiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(56).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dictiter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, dictiter_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, dictiter_iternextkey), ctypes.cast(dictiter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def dictiter_iternextvalue(di): goto = None while True: if (goto is None): di = ctypes.cast(di, ctypes.POINTER(g.dictiterobject)) value = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() mask = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() d = ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyDictObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if (not ctypes_wrapped.c_int((di.contents.di_used.value != d.contents.ma_used.value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('dictionary changed size during iteration'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(di.contents.di_used, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assign(i, di.contents.di_pos.value) helpers.assign(mask, d.contents.ma_mask.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value > mask.value)).value)).value): goto = 3 continue goto = u'fail' continue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(d.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 5 continue helpers.postfixInc(i) if (not ctypes_wrapped.c_int((i.value > mask.value)).value): goto = 6 continue goto = u'fail' continue if (goto == 6): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assign(di.contents.di_pos, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) helpers.postfixDec(di.contents.len) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0) if (goto == u'fail'): goto = None if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 12 continue continue goto = 11 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(di.contents.di_dict, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del d del di del i del mask del value del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break PyDictIterValue_Type = PyTypeObject() # TODO init PyDictIterValue_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dictionary-valueiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(56).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dictiter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, dictiter_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, dictiter_iternextvalue), ctypes.cast(dictiter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def dictiter_iternextitem(di): goto = None while True: if (goto is None): di = ctypes.cast(di, ctypes.POINTER(g.dictiterobject)) key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() result = ctypes.cast(di.contents.di_result, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() mask = g.Py_ssize_t() ep = ctypes.POINTER(g.PyDictEntry)() d = ctypes.cast(di.contents.di_dict, ctypes.POINTER(g.PyDictObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if (not ctypes_wrapped.c_int((di.contents.di_used.value != d.contents.ma_used.value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('dictionary changed size during iteration'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(di.contents.di_used, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assign(i, di.contents.di_pos.value) if (not ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'fail' continue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(ep, (ctypes.cast(intp._storePtr(d.contents.ma_table), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(mask, d.contents.ma_mask.value) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value <= mask.value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 5 continue helpers.postfixInc(i) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assign(di.contents.di_pos, ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int((i.value > mask.value)).value): goto = 6 continue goto = u'fail' continue if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((result.contents.ob_refcnt.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 8 continue helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue pass goto = 11 continue if (goto == 12): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 14 continue continue goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto == 15): goto = None if (goto is None): if (not True): goto = 16 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue pass goto = 17 continue if (goto == 18): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 20 continue continue goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = 16 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 21): goto = None if (goto == 7): goto = None if (goto is None): helpers.postfixDec(di.contents.len) helpers.assignPtr(key, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_key), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ep, '+', i.value).contents.me_value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) if (goto == u'fail'): goto = None if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue pass goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 27 continue continue goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.assignPtr(di.contents.di_dict, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del d del di del i del mask del value del result del key del ep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break PyDictIterItem_Type = PyTypeObject() # TODO init PyDictIterItem_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dictionary-itemiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(56).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dictiter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, dictiter_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, dictiter_iternextitem), ctypes.cast(dictiter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) dictviewobject = structs._anonymous_dictviewobject @staticmethod def dictview_dealloc(dv): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dv.contents.dv_dict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dv.contents.dv_dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dv.contents.dv_dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(dv, ctypes_wrapped.c_void_p)) del dv return @staticmethod def dictview_traverse(dv, visit, arg): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) while True: if (ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(dv.contents.dv_dict, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del dv del visit del arg return ctypes_wrapped.c_int().value @staticmethod def dictview_len(dv): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) len_a = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(len_a, dv.contents.dv_dict.contents.ma_used.value) return len_a.value del dv del len_a return g.Py_ssize_t().value @staticmethod def dictview_new(dict_a, type_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) dv = ctypes.POINTER(g.dictviewobject)() if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/dictobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2795))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("%s() requires a dict argument, not '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), type_a.contents.tp_name, dict_a.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(dv, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(type_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.dictviewobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(dv.contents.dv_dict, (ctypes.cast(intp._storePtr(ctypes.cast(dict_a, ctypes.POINTER(g.PyDictObject))), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(dv, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(dv, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dv del dict_a del type_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def all_contained_in(self, other): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) iter_a = ctypes.cast(intp._getPtr(g.PyObject_GetIter(self), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) ok = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int(((ctypes.cast(iter_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True while True: if first_iteration: first_iteration = False next_a = ctypes.cast(intp._getPtr(g.PyIter_Next(iter_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): helpers.assign(ok, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) break helpers.assign(ok, ctypes_wrapped.c_int(int(g.PySequence_Contains(other, next_a))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(next_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(next_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(next_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ok.value <= ctypes_wrapped.c_int(int(0L)).value)).value: break del next_a while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value del ok del self del other del iter_a return ctypes_wrapped.c_int().value @staticmethod def dictview_richcompare(self, other, op): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) len_self = g.Py_ssize_t() len_other = g.Py_ssize_t() ok = ctypes_wrapped.c_int() result = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDictKeys_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDictItems_Type), ctypes_wrapped.c_void_p).value or 0))).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(other, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PySet_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFrozenSet_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PySet_Type)))).value)).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFrozenSet_Type)))).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDictKeys_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDictItems_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assign(len_self, g.Py_ssize_t(int(g.PyObject_Size(self))).value) if ctypes_wrapped.c_int((len_self.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(len_other, g.Py_ssize_t(int(g.PyObject_Size(other))).value) if ctypes_wrapped.c_int((len_other.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(ok, ctypes_wrapped.c_int(int(0L)).value) if True: _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((len_self.value == len_other.value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.all_contained_in(self, other))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(3L)).value)).value and ctypes_wrapped.c_int((ok.value >= ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int((not ok.value))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((len_self.value < len_other.value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.all_contained_in(self, other))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((len_self.value <= len_other.value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.all_contained_in(self, other))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((len_self.value > len_other.value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.all_contained_in(other, self))).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((len_self.value >= len_other.value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.all_contained_in(other, self))).value) break break del _switchfallthrough del _switchvalue if ctypes_wrapped.c_int((ok.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ok.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del ok del self del other del result del len_other del len_self del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictview_repr(dv): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) seq = ctypes.POINTER(g.PyObject)() seq_str = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_List(ctypes.cast(dv, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(seq_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(seq), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('%s(%s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(dv, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, ctypes.cast(seq_str, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq_str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del dv del seq_str del result del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictkeys_iter(dv): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dv.contents.dv_dict, ctypes.pointer(g.PyDictIterKey_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dv return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictkeys_contains(dv, obj): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(g.PyDict_Contains(ctypes.cast(dv.contents.dv_dict, ctypes.POINTER(g.PyObject)), obj))).value del dv del obj return ctypes_wrapped.c_int().value dictkeys_as_sequence = PySequenceMethods() # TODO init dictkeys_as_sequence with PySequenceMethods(helpers.makeFuncPtr(lenfunc, dictview_len), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(objobjproc, dictkeys_contains)) @staticmethod def dictviews_sub(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.PySet_New(self), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) tmp = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(result, ctypes.cast(intp._make_string('difference_update'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('O'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del tmp del self del other del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictviews_and(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.PySet_New(self), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) tmp = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(result, ctypes.cast(intp._make_string('intersection_update'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('O'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del tmp del self del other del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictviews_or(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.PySet_New(self), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) tmp = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(result, ctypes.cast(intp._make_string('update'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('O'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del tmp del self del other del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictviews_xor(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.PySet_New(self), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) tmp = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(result, ctypes.cast(intp._make_string('symmetric_difference_update'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('O'), ctypes.POINTER(ctypes_wrapped.c_byte)), other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del tmp del self del other del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) dictviews_as_number = PyNumberMethods() # TODO init dictviews_as_number with PyNumberMethods(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(binaryfunc, dictviews_sub), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(binaryfunc, dictviews_and), helpers.makeFuncPtr(binaryfunc, dictviews_xor), helpers.makeFuncPtr(binaryfunc, dictviews_or)) dictkeys_methods = (PyMethodDef * 1)() # TODO init dictkeys_methods with (PyMethodDef * 1)(structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyDictKeys_Type = PyTypeObject() # TODO init PyDictKeys_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dict_keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(24).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dictview_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, dictview_repr), ctypes.pointer(dictviews_as_number), ctypes.pointer(dictkeys_as_sequence), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, dictview_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), dictview_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(getiterfunc, dictkeys_iter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(dictkeys_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def dictkeys_new(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictview_new(dict_a, ctypes.pointer(g.PyDictKeys_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictitems_iter(dv): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dv.contents.dv_dict, ctypes.pointer(g.PyDictIterItem_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dv return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictitems_contains(dv, obj): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() found = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes_wrapped.c_int(int(2L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(key, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(found, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(ctypes.cast(dv.contents.dv_dict, ctypes.POINTER(g.PyObject)), key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(found, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(value, found, ctypes_wrapped.c_int(int(2L))))).value del dv del found del obj del value del key return ctypes_wrapped.c_int().value dictitems_as_sequence = PySequenceMethods() # TODO init dictitems_as_sequence with PySequenceMethods(helpers.makeFuncPtr(lenfunc, dictview_len), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(objobjproc, dictitems_contains)) dictitems_methods = (PyMethodDef * 1)() # TODO init dictitems_methods with (PyMethodDef * 1)(structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyDictItems_Type = PyTypeObject() # TODO init PyDictItems_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dict_items'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(24).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dictview_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, dictview_repr), ctypes.pointer(dictviews_as_number), ctypes.pointer(dictitems_as_sequence), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, dictview_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), dictview_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(getiterfunc, dictitems_iter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(dictitems_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def dictitems_new(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictview_new(dict_a, ctypes.pointer(g.PyDictItems_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def dictvalues_iter(dv): dv = ctypes.cast(dv, ctypes.POINTER(g.dictviewobject)) if ctypes_wrapped.c_int(((ctypes.cast(dv.contents.dv_dict, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictiter_new(dv.contents.dv_dict, ctypes.pointer(g.PyDictIterValue_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dv return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) dictvalues_as_sequence = PySequenceMethods() # TODO init dictvalues_as_sequence with PySequenceMethods(helpers.makeFuncPtr(lenfunc, dictview_len), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), objobjproc(ctypes_wrapped.c_int(int(0L)).value)) dictvalues_methods = (PyMethodDef * 1)() # TODO init dictvalues_methods with (PyMethodDef * 1)(structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyDictValues_Type = PyTypeObject() # TODO init PyDictValues_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dict_values'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(24).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, dictview_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, dictview_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), ctypes.pointer(dictvalues_as_sequence), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, dictview_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(getiterfunc, dictvalues_iter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(dictvalues_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def dictvalues_new(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.dictview_new(dict_a, ctypes.pointer(g.PyDictValues_Type)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) characters = (ctypes.POINTER(PyStringObject) * 256L)() nullstring = ctypes.POINTER(PyStringObject)() interned = ctypes.POINTER(PyObject)() @staticmethod def PyString_FromStringAndSize(str_a, size): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) size = g.Py_ssize_t(int(size.value)) op = ctypes.POINTER(g.PyStringObject)() if ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('Negative size passed to PyString_FromStringAndSize'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(op, (ctypes.cast(intp._storePtr(g.nullstring), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.characters, '+', ctypes_wrapped.c_uint(int((str_a.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((size.value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value))).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('string is too large'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) (helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, size.value), ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyString_Type)), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1])[1] helpers.assign(op.contents.ob_shash, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(op.contents.ob_sstate, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: values.memcpy.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(str_a, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(size.value)) helpers.assign(helpers.ptrArithmetic(op.contents.ob_sval, '+', size.value).contents, ctypes.c_byte(0).value) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: t = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) g.PyString_InternInPlace(ctypes.pointer(t)) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(t, ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g.nullstring, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del t elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: t = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) g.PyString_InternInPlace(ctypes.pointer(t)) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(t, ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(g.characters, '+', ctypes_wrapped.c_uint(int((str_a.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value).contents, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del t return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op del str_a del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_FromString(str_a): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) size = ctypes_wrapped.c_ulong() op = ctypes.POINTER(g.PyStringObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(size, values.strlen.value(str_a).value) if ctypes_wrapped.c_int((size.value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value))).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('string is too long for a Python string'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(op, (ctypes.cast(intp._storePtr(g.nullstring), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.characters, '+', ctypes_wrapped.c_uint(int((str_a.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) (helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, size.value), ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyString_Type)), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1])[1] helpers.assign(op.contents.ob_shash, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(op.contents.ob_sstate, ctypes_wrapped.c_int(int(0L)).value) values.memcpy.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(str_a, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((size.value + ctypes_wrapped.c_int(int(1L)).value)))) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: t = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) g.PyString_InternInPlace(ctypes.pointer(t)) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(t, ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g.nullstring, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del t elif ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(1L)).value)).value: t = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) g.PyString_InternInPlace(ctypes.pointer(t)) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(t, ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(g.characters, '+', ctypes_wrapped.c_uint(int((str_a.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value).contents, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del t return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op del str_a del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_FromFormatV(format_a, vargs): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) vargs = helpers.VarArgs(vargs) count = helpers.VarArgs(None, intp) n = g.Py_ssize_t() f = ctypes.POINTER(ctypes_wrapped.c_byte)() s = ctypes.POINTER(ctypes_wrapped.c_byte)() string_a = ctypes.POINTER(g.PyObject)() helpers.assign(count, vargs) if (not True): goto = 1 continue first_iteration = True helpers.assignPtr(f, (ctypes.cast(intp._storePtr(format_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 2): goto = None if (goto is None): if (not True): goto = 3 continue if (not first_iteration): goto = 5 continue first_iteration = False goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.postfixIncPtr(f) if (goto == 4): goto = None if (goto is None): if (not f.contents.value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(37).value)).value): goto = 9 continue p = ctypes.cast(f, ctypes.POINTER(ctypes_wrapped.c_byte)) if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixIncPtr(f).contents.value and ctypes_wrapped.c_int((f.contents.value != ctypes.c_byte(37).value)).value)).value and ctypes_wrapped.c_int((not values.isalpha.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((f.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value)).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(108).value)).value): goto = 13 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(100).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(117).value)).value)).value): goto = 14 continue helpers.prefixIncPtr(f) if (goto == 14): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(122).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(100).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(117).value)).value)).value)).value): goto = 15 continue helpers.prefixIncPtr(f) if (goto == 15): goto = None if (goto == 12): goto = None if (goto is None): if (not True): goto = 16 continue _switchvalue = None _switchvalue = f.contents.value _switchfallthrough = None _switchfallthrough = False if (goto == 17): goto = None if (goto is None): if (not True): goto = 18 continue if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(99).value))): goto = 19 continue _switchfallthrough = True (values.__va_arg.value(count, ctypes_wrapped.c_int()), None)[1] if (goto == 19): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(37).value))): goto = 20 continue _switchfallthrough = True helpers.postfixInc(n) goto = 18 continue if (goto == 20): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(100).value))): goto = 21 continue _switchfallthrough = True if (goto == 21): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(117).value))): goto = 22 continue _switchfallthrough = True if (goto == 22): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(105).value))): goto = 23 continue _switchfallthrough = True if (goto == 23): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value))): goto = 24 continue _switchfallthrough = True (values.__va_arg.value(count, ctypes_wrapped.c_int()), None)[1] helpers.augAssign(n, u'+=', ctypes_wrapped.c_int(int(20L)).value) goto = 18 continue if (goto == 24): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(115).value))): goto = 25 continue _switchfallthrough = True helpers.assignPtr(s, (ctypes.cast(intp._storePtr(values.__va_arg.value(count, ctypes.POINTER(ctypes_wrapped.c_byte)())), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(n, u'+=', values.strlen.value(s).value) goto = 18 continue if (goto == 25): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(112).value))): goto = 26 continue _switchfallthrough = True (values.__va_arg.value(count, ctypes_wrapped.c_int()), None)[1] helpers.augAssign(n, u'+=', ctypes_wrapped.c_int(int(19L)).value) goto = 18 continue if (goto == 26): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 27 continue helpers.augAssign(n, u'+=', values.strlen.value(p).value) goto = u'expand' continue if (goto == 27): goto = None if (goto is None): goto = 18 continue goto = 17 continue if (goto == 18): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 16): goto = None if (goto is None): del p goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.postfixInc(n) if (goto == 8): goto = None if (goto is None): goto = 2 continue if (goto == 3): goto = None if (goto == 1): goto = None if (goto == u'expand'): goto = None if (goto is None): helpers.assignPtr(string_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(string_a, ctypes_wrapped.c_void_p).value or 0))).value): goto = 28 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 28): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(string_a), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 29 continue first_iteration_a = True helpers.assignPtr(f, (ctypes.cast(intp._storePtr(format_a), ctypes_wrapped.c_void_p).value or 0)) if (goto == 30): goto = None if (goto is None): if (not True): goto = 31 continue if (not first_iteration_a): goto = 33 continue first_iteration_a = False goto = 32 continue if (goto == 33): goto = None if (goto is None): helpers.postfixIncPtr(f) if (goto == 32): goto = None if (goto is None): if (not f.contents.value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(37).value)).value): goto = 37 continue p = ctypes.cast(helpers.postfixIncPtr(f), ctypes.POINTER(ctypes_wrapped.c_byte)) i = g.Py_ssize_t() longflag = ctypes_wrapped.c_int() size_tflag = ctypes_wrapped.c_int() helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) if (goto == 38): goto = None if (goto is None): if (not values.isdigit.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((f.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value): goto = 39 continue helpers.assign(n, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((n.value * ctypes_wrapped.c_int(int(10L)).value))).value + helpers.ptrArithmetic(helpers.postfixIncPtr(f), u'-', ctypes.c_byte(48).value).contents.value))).value) goto = 38 continue if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(46).value)).value): goto = 40 continue helpers.postfixIncPtr(f) helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) if (goto == 41): goto = None if (goto is None): if (not values.isdigit.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((f.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value): goto = 42 continue helpers.assign(n, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((n.value * ctypes_wrapped.c_int(int(10L)).value))).value + helpers.ptrArithmetic(helpers.postfixIncPtr(f), u'-', ctypes.c_byte(48).value).contents.value))).value) goto = 41 continue if (goto == 42): goto = None if (goto == 40): goto = None if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((f.contents.value and ctypes_wrapped.c_int((f.contents.value != ctypes.c_byte(37).value)).value)).value and ctypes_wrapped.c_int((not values.isalpha.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((f.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value)).value): goto = 44 continue helpers.postfixIncPtr(f) goto = 43 continue if (goto == 44): goto = None if (goto is None): if (not ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(108).value)).value): goto = 46 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(100).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(117).value)).value)).value): goto = 47 continue helpers.assign(longflag, ctypes_wrapped.c_int(int(1L)).value) helpers.prefixIncPtr(f) if (goto == 47): goto = None if (goto is None): goto = 45 continue if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((f.contents.value == ctypes.c_byte(122).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(100).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(f, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(117).value)).value)).value)).value): goto = 48 continue helpers.assign(size_tflag, ctypes_wrapped.c_int(int(1L)).value) helpers.prefixIncPtr(f) if (goto == 48): goto = None if (goto == 45): goto = None if (goto is None): if (not True): goto = 49 continue _switchvalue = None _switchvalue = f.contents.value _switchfallthrough = None _switchfallthrough = False if (goto == 50): goto = None if (goto is None): if (not True): goto = 51 continue if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(99).value))): goto = 52 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(s), values.__va_arg.value(vargs, ctypes_wrapped.c_int()).value).contents goto = 51 continue if (goto == 52): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(100).value))): goto = 53 continue _switchfallthrough = True if (not longflag.value): goto = 55 continue values.sprintf.value(s, ctypes.cast(intp._make_string('%ld'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_long())) goto = 54 continue if (goto == 55): goto = None if (goto is None): if (not size_tflag.value): goto = 57 continue values.sprintf.value(s, ctypes.cast(intp._make_string('%ld'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, g.Py_ssize_t())) goto = 56 continue if (goto == 57): goto = None if (goto is None): values.sprintf.value(s, ctypes.cast(intp._make_string('%d'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_int())) if (goto == 56): goto = None if (goto == 54): goto = None if (goto is None): helpers.augAssignPtr(s, u'+=', values.strlen.value(s).value) goto = 51 continue if (goto == 53): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(117).value))): goto = 58 continue _switchfallthrough = True if (not longflag.value): goto = 60 continue values.sprintf.value(s, ctypes.cast(intp._make_string('%lu'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_ulong())) goto = 59 continue if (goto == 60): goto = None if (goto is None): if (not size_tflag.value): goto = 62 continue values.sprintf.value(s, ctypes.cast(intp._make_string('%lu'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_ulong())) goto = 61 continue if (goto == 62): goto = None if (goto is None): values.sprintf.value(s, ctypes.cast(intp._make_string('%u'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_uint())) if (goto == 61): goto = None if (goto == 59): goto = None if (goto is None): helpers.augAssignPtr(s, u'+=', values.strlen.value(s).value) goto = 51 continue if (goto == 58): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(105).value))): goto = 63 continue _switchfallthrough = True values.sprintf.value(s, ctypes.cast(intp._make_string('%i'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_int())) helpers.augAssignPtr(s, u'+=', values.strlen.value(s).value) goto = 51 continue if (goto == 63): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value))): goto = 64 continue _switchfallthrough = True values.sprintf.value(s, ctypes.cast(intp._make_string('%x'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_int())) helpers.augAssignPtr(s, u'+=', values.strlen.value(s).value) goto = 51 continue if (goto == 64): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(115).value))): goto = 65 continue _switchfallthrough = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(values.__va_arg.value(vargs, ctypes.POINTER(ctypes_wrapped.c_byte)())), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(i, values.strlen.value(p).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((i.value > n.value)).value)).value): goto = 66 continue helpers.assign(i, n.value) if (goto == 66): goto = None if (goto is None): values.memcpy.value(ctypes.cast(s, ctypes_wrapped.c_void_p), ctypes.cast(p, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(i.value)) helpers.augAssignPtr(s, u'+=', i.value) goto = 51 continue if (goto == 65): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(112).value))): goto = 67 continue _switchfallthrough = True values.sprintf.value(s, ctypes.cast(intp._make_string('%p'), ctypes.POINTER(ctypes_wrapped.c_byte)), values.__va_arg.value(vargs, ctypes_wrapped.c_void_p())) if (not ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(88).value)).value): goto = 69 continue helpers.assign(helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.c_byte(120).value) goto = 68 continue if (goto == 69): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value != ctypes.c_byte(120).value)).value): goto = 70 continue values.memmove.value(ctypes.cast(helpers.ptrArithmetic(s, u'+', ctypes_wrapped.c_int(int(2L)).value), ctypes_wrapped.c_void_p), ctypes.cast(s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((values.strlen.value(s).value + ctypes_wrapped.c_int(int(1L)).value)))) helpers.assign(helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.c_byte(48).value) helpers.assign(helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.c_byte(120).value) if (goto == 70): goto = None if (goto == 68): goto = None if (goto is None): helpers.augAssignPtr(s, u'+=', values.strlen.value(s).value) goto = 51 continue if (goto == 67): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(37).value))): goto = 71 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(s), ctypes.c_byte(37).value).contents goto = 51 continue if (goto == 71): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 72 continue values.strcpy.value(s, p) helpers.augAssignPtr(s, u'+=', values.strlen.value(s).value) goto = u'end' continue if (goto == 72): goto = None if (goto is None): goto = 51 continue goto = 50 continue if (goto == 51): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 49): goto = None if (goto is None): del i del p del longflag del size_tflag goto = 36 continue if (goto == 37): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(s), f.contents.value).contents if (goto == 36): goto = None if (goto is None): goto = 30 continue if (goto == 31): goto = None if (goto == 29): goto = None if (goto == u'end'): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(string_a), ctypes_wrapped.c_long((((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(ctypes.cast(string_a, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p).value or 0)) / 1))))).value): goto = 73 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 73): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(string_a), ctypes_wrapped.c_void_p).value or 0) del count del f del string_a del n del s del vargs del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyString_FromFormat(format_a, *varargs): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) ret = ctypes.POINTER(g.PyObject)() vargs = helpers.VarArgs(varargs, intp) values.va_start.value(vargs, format_a) helpers.assignPtr(ret, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormatV(format_a, vargs), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(vargs) return (ctypes.cast(intp._storePtr(ret), ctypes_wrapped.c_void_p).value or 0) del vargs del format_a del ret return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_Decode(s, size, encoding, errors): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) size = g.Py_ssize_t(int(size.value)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() str_a = ctypes.POINTER(g.PyObject)() helpers.assignPtr(str_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(s, size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsDecodedString(str_a, encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del errors del str_a del encoding del s del v del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_AsDecodedObject(str_a, encoding, errors): goto = None while True: if (goto is None): str_a = ctypes.cast(str_a, ctypes.POINTER(g.PyObject)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue ctypes_wrapped.c_int(int(g.PyErr_BadArgument())) goto = u'onError' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(encoding, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('no encoding specified'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'onError' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCodec_Decode(str_a, encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'onError' continue if (goto == 3): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del v del errors del str_a del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyString_AsDecodedString(str_a, encoding, errors): goto = None while True: if (goto is None): str_a = ctypes.cast(str_a, ctypes.POINTER(g.PyObject)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsDecodedObject(str_a, encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue goto = u'onError' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('decoder did not return a string object (type=%.400s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue pass goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 8 continue continue goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto is None): goto = u'onError' continue if (goto == 2): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del v del errors del str_a del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyString_Encode(s, size, encoding, errors): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) size = g.Py_ssize_t(int(size.value)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() str_a = ctypes.POINTER(g.PyObject)() helpers.assignPtr(str_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(s, size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsEncodedString(str_a, encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del errors del str_a del encoding del s del v del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_AsEncodedObject(str_a, encoding, errors): goto = None while True: if (goto is None): str_a = ctypes.cast(str_a, ctypes.POINTER(g.PyObject)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue ctypes_wrapped.c_int(int(g.PyErr_BadArgument())) goto = u'onError' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(encoding, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('no encoding specified'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'onError' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCodec_Encode(str_a, encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'onError' continue if (goto == 3): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del v del errors del str_a del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyString_AsEncodedString(str_a, encoding, errors): goto = None while True: if (goto is None): str_a = ctypes.cast(str_a, ctypes.POINTER(g.PyObject)) encoding = ctypes.cast(encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsEncodedObject(str_a, encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue goto = u'onError' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('encoder did not return a string object (type=%.400s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue pass goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 8 continue continue goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto is None): goto = u'onError' continue if (goto == 2): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del v del errors del str_a del encoding return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def string_dealloc(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if True: _switchvalue = None _switchvalue = ctypes.cast(op, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(3L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_DelItem(g.interned, op))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('deletion of interned string failed'), ctypes.POINTER(ctypes_wrapped.c_byte))) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value)): _switchfallthrough = True g.Py_FatalError(ctypes.cast(intp._make_string('Immortal interned string died.'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (not _switchfallthrough): g.Py_FatalError(ctypes.cast(intp._make_string('Inconsistent interned string state.'), ctypes.POINTER(ctypes_wrapped.c_byte))) break del _switchfallthrough del _switchvalue helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(op, ctypes_wrapped.c_void_p)) del op return @staticmethod def PyString_DecodeEscape(s, len_a, errors, unicode_a, recode_encoding): goto = None while True: if (goto is None): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) errors = ctypes.cast(errors, ctypes.POINTER(ctypes_wrapped.c_byte)) unicode_a = g.Py_ssize_t(int(unicode_a.value)) recode_encoding = ctypes.cast(recode_encoding, ctypes.POINTER(ctypes_wrapped.c_byte)) c = ctypes_wrapped.c_int() p = ctypes.POINTER(ctypes_wrapped.c_byte)() buf = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() v = ctypes.POINTER(g.PyObject)() newlen = g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(4L)).value * len_a.value))).value)) if (ctypes.cast(recode_encoding, ctypes_wrapped.c_void_p).value or 0) else ctypes_wrapped.c_ulong(int(len_a.value))).value)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), newlen), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(p, (ctypes.cast(intp._storePtr(helpers.assignPtr(buf, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(v), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(s, u'+', len_a.value)), ctypes_wrapped.c_void_p).value or 0)) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value): goto = 3 continue if (not ctypes_wrapped.c_int((s.contents.value != ctypes.c_byte(92).value)).value): goto = 4 continue if (goto == u'non_esc'): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(p), helpers.postfixIncPtr(s).contents.value).contents continue if (goto == 4): goto = None if (goto is None): helpers.postfixIncPtr(s) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('Trailing \\ in string'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'failed' continue if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue _switchvalue = None _switchvalue = helpers.postfixIncPtr(s).contents.value _switchfallthrough = None _switchfallthrough = False if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(10).value))): goto = 9 continue _switchfallthrough = True goto = 8 continue if (goto == 9): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(92).value))): goto = 10 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(92).value).contents goto = 8 continue if (goto == 10): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(39).value))): goto = 11 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(39).value).contents goto = 8 continue if (goto == 11): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(34).value))): goto = 12 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(34).value).contents goto = 8 continue if (goto == 12): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(98).value))): goto = 13 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(8).value).contents goto = 8 continue if (goto == 13): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(102).value))): goto = 14 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(12).value).contents goto = 8 continue if (goto == 14): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(116).value))): goto = 15 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(9).value).contents goto = 8 continue if (goto == 15): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(110).value))): goto = 16 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(10).value).contents goto = 8 continue if (goto == 16): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(114).value))): goto = 17 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(13).value).contents goto = 8 continue if (goto == 17): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(118).value))): goto = 18 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(11).value).contents goto = 8 continue if (goto == 18): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(97).value))): goto = 19 continue _switchfallthrough = True helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(7).value).contents goto = 8 continue if (goto == 19): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(48).value))): goto = 20 continue _switchfallthrough = True if (goto == 20): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(49).value))): goto = 21 continue _switchfallthrough = True if (goto == 21): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(50).value))): goto = 22 continue _switchfallthrough = True if (goto == 22): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(51).value))): goto = 23 continue _switchfallthrough = True if (goto == 23): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(52).value))): goto = 24 continue _switchfallthrough = True if (goto == 24): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(53).value))): goto = 25 continue _switchfallthrough = True if (goto == 25): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(54).value))): goto = 26 continue _switchfallthrough = True if (goto == 26): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(55).value))): goto = 27 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_byte(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value).contents.value - ctypes.c_byte(48).value))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.c_byte(48).value <= s.contents.value)).value)).value and ctypes_wrapped.c_int((s.contents.value <= ctypes.c_byte(55).value)).value)).value): goto = 28 continue helpers.assign(c, ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int((c.value << ctypes_wrapped.c_int(int(3L)).value))).value + helpers.ptrArithmetic(helpers.postfixIncPtr(s), u'-', ctypes.c_byte(48).value).contents.value))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes.c_byte(48).value <= s.contents.value)).value)).value and ctypes_wrapped.c_int((s.contents.value <= ctypes.c_byte(55).value)).value)).value): goto = 29 continue helpers.assign(c, ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int((c.value << ctypes_wrapped.c_int(int(3L)).value))).value + helpers.ptrArithmetic(helpers.postfixIncPtr(s), u'-', ctypes.c_byte(48).value).contents.value))).value) if (goto == 29): goto = None if (goto == 28): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(p), c.value).contents goto = 8 continue if (goto == 27): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value))): goto = 30 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(s, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value and values.isxdigit.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value and values.isxdigit.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value): goto = 31 continue x = ctypes_wrapped.c_uint() helpers.assign(c, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((s.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) helpers.postfixIncPtr(s) if (not values.isdigit.value(c).value): goto = 33 continue helpers.assign(x, ctypes_wrapped.c_int(int((c.value - ctypes.c_byte(48).value))).value) goto = 32 continue if (goto == 33): goto = None if (goto is None): if (not values.islower.value(c).value): goto = 35 continue helpers.assign(x, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(10L)).value + c.value))).value - ctypes.c_byte(97).value))).value) goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.assign(x, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(10L)).value + c.value))).value - ctypes.c_byte(65).value))).value) if (goto == 34): goto = None if (goto == 32): goto = None if (goto is None): helpers.assign(x, ctypes_wrapped.c_uint(int((x.value << ctypes_wrapped.c_int(int(4L)).value))).value) helpers.assign(c, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((s.contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) helpers.postfixIncPtr(s) if (not values.isdigit.value(c).value): goto = 37 continue helpers.augAssign(x, u'+=', ctypes_wrapped.c_int(int((c.value - ctypes.c_byte(48).value))).value) goto = 36 continue if (goto == 37): goto = None if (goto is None): if (not values.islower.value(c).value): goto = 39 continue helpers.augAssign(x, u'+=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(10L)).value + c.value))).value - ctypes.c_byte(97).value))).value) goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.augAssign(x, u'+=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(10L)).value + c.value))).value - ctypes.c_byte(65).value))).value) if (goto == 38): goto = None if (goto == 36): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(p), x.value).contents goto = 8 continue del x if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(errors, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((values.strcmp.value(errors, ctypes.cast(intp._make_string('strict'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 40 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('invalid \\x escape'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'failed' continue if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int((values.strcmp.value(errors, ctypes.cast(intp._make_string('replace'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(63).value).contents goto = 41 continue if (goto == 42): goto = None if (goto is None): if (not ctypes_wrapped.c_int((values.strcmp.value(errors, ctypes.cast(intp._make_string('ignore'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue pass goto = 43 continue if (goto == 44): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('decoding error; unknown error handling code: %.400s'), ctypes.POINTER(ctypes_wrapped.c_byte)), errors), ctypes.POINTER(g.PyObject)) goto = u'failed' continue if (goto == 43): goto = None if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value and values.isxdigit.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value): goto = 45 continue helpers.postfixIncPtr(s) if (goto == 45): goto = None if (goto is None): goto = 8 continue if (goto == 30): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(117).value))): goto = 46 continue _switchfallthrough = True if (goto == 46): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(85).value))): goto = 47 continue _switchfallthrough = True if (goto == 47): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(78).value))): goto = 48 continue _switchfallthrough = True if (not unicode_a.value): goto = 49 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('Unicode escapes not legal when Unicode disabled'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'failed' continue if (goto == 49): goto = None if (goto == 48): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 50 continue helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(92).value).contents helpers.postfixDecPtr(s) goto = u'non_esc' continue if (goto == 50): goto = None if (goto is None): goto = 8 continue goto = 7 continue if (goto == 8): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 6): goto = None if (goto is None): goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(buf, ctypes_wrapped.c_void_p).value or 0)) / 1)).value < newlen.value)).value and ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(v), ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(buf, ctypes_wrapped.c_void_p).value or 0)) / 1))))).value)).value): goto = 51 continue goto = u'failed' continue if (goto == 51): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'failed'): goto = None if (goto == 52): goto = None if (goto is None): if (not True): goto = 53 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 55 continue pass goto = 54 continue if (goto == 55): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 54): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 57 continue continue goto = 56 continue if (goto == 57): goto = None if (goto is None): goto = 53 continue if (goto == 56): goto = None if (goto is None): goto = 52 continue if (goto == 53): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del newlen del c del errors del end del len_a del v del unicode_a del p del s del recode_encoding del buf return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def string_getsize(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) s = ctypes.POINTER(ctypes_wrapped.c_byte)() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int(int(g.PyString_AsStringAndSize(op, ctypes.pointer(s), ctypes.pointer(len_a)))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return len_a.value del s del len_a del op return g.Py_ssize_t().value @staticmethod def string_getbuffer(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) s = ctypes.POINTER(ctypes_wrapped.c_byte)() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int(int(g.PyString_AsStringAndSize(op, ctypes.pointer(s), ctypes.pointer(len_a)))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0) del s del len_a del op return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_Size(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return g.Py_ssize_t(int(g.string_getsize(op))).value return ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del op return g.Py_ssize_t().value @staticmethod def PyString_AsString(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.string_getbuffer(op), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0) del op return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_AsStringAndSize(obj, s, len_a): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) s = ctypes.cast(s, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) len_a = ctypes.cast(len_a, ctypes.POINTER(g.Py_ssize_t)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/stringobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(804))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected string or Unicode object, %.200s found'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(s.contents, (ctypes.cast(intp._storePtr(ctypes.cast(obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(len_a, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(len_a.contents, ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int((values.strlen.value(s.contents).value != ctypes_wrapped.c_ulong(int(ctypes.cast(obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected string without null bytes'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value del len_a del s del obj return ctypes_wrapped.c_int().value @staticmethod def fastsearch(s, n, p, m, maxcount, mode): first_iteration_h = None first_iteration_g = None first_iteration_f = None first_iteration_e = None first_iteration_d = None first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) n = g.Py_ssize_t(int(n.value)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) m = g.Py_ssize_t(int(m.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) mode = ctypes_wrapped.c_int(int(mode.value)) mask = ctypes_wrapped.c_ulong() skip = g.Py_ssize_t() count = g.Py_ssize_t() i = g.Py_ssize_t() j = g.Py_ssize_t() mlast = g.Py_ssize_t() w = g.Py_ssize_t() helpers.assign(w, ctypes_wrapped.c_long(int((n.value - m.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((w.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((mode.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((maxcount.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((m.value <= ctypes_wrapped.c_int(int(1L)).value)).value: if ctypes_wrapped.c_int((m.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((mode.value == ctypes_wrapped.c_int(int(0L)).value)).value: if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', i.value).contents.value == helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value: helpers.postfixInc(count) if ctypes_wrapped.c_int((count.value == maxcount.value)).value: return maxcount.value return count.value elif ctypes_wrapped.c_int((mode.value == ctypes_wrapped.c_int(int(1L)).value)).value: if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', i.value).contents.value == helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value: return i.value elif True: first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_ulong(int((n.value - ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration_b: first_iteration_b = False else: helpers.postfixDec(i) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', i.value).contents.value == helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value: return i.value return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(mlast, ctypes_wrapped.c_ulong(int((m.value - ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(skip, ctypes_wrapped.c_ulong(int((mlast.value - ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(mask, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((mode.value != ctypes_wrapped.c_int(int(2L)).value)).value: if True: first_iteration_c = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_c: first_iteration_c = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < mlast.value)).value: pass else: break helpers.augAssign(mask, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(p, '+', i.value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value) if ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', i.value).contents.value == helpers.ptrArithmetic(p, '+', mlast.value).contents.value)).value: helpers.assign(skip, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((mlast.value - i.value))).value - ctypes_wrapped.c_int(int(1L)).value))).value) helpers.augAssign(mask, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(p, '+', mlast.value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value) if True: first_iteration_d = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_d: first_iteration_d = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value <= w.value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((i.value + m.value))).value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value == helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((m.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value)).value: if True: first_iteration_e = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_e: first_iteration_e = False else: helpers.postfixInc(j) if ctypes_wrapped.c_int((j.value < mlast.value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_long(int((i.value + j.value))).value).contents.value != helpers.ptrArithmetic(p, '+', j.value).contents.value)).value: break if ctypes_wrapped.c_int((j.value == mlast.value)).value: if ctypes_wrapped.c_int((mode.value != ctypes_wrapped.c_int(int(0L)).value)).value: return i.value helpers.postfixInc(count) if ctypes_wrapped.c_int((count.value == maxcount.value)).value: return maxcount.value helpers.assign(i, ctypes_wrapped.c_long(int((i.value + mlast.value))).value) continue if ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((mask.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_long(int((i.value + m.value))).value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value))).value))).value: helpers.assign(i, ctypes_wrapped.c_long(int((i.value + m.value))).value) else: helpers.assign(i, ctypes_wrapped.c_long(int((i.value + skip.value))).value) elif ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((mask.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_long(int((i.value + m.value))).value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value))).value))).value: helpers.assign(i, ctypes_wrapped.c_long(int((i.value + m.value))).value) else: helpers.augAssign(mask, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value) if True: first_iteration_f = True helpers.assign(i, mlast.value) while True: if first_iteration_f: first_iteration_f = False else: helpers.postfixDec(i) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.augAssign(mask, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(p, '+', i.value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value) if ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', i.value).contents.value == helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value: helpers.assign(skip, ctypes_wrapped.c_ulong(int((i.value - ctypes_wrapped.c_int(int(1L)).value))).value) if True: first_iteration_g = True helpers.assign(i, w.value) while True: if first_iteration_g: first_iteration_g = False else: helpers.postfixDec(i) if ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', i.value).contents.value == helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value: if True: first_iteration_h = True helpers.assign(j, mlast.value) while True: if first_iteration_h: first_iteration_h = False else: helpers.postfixDec(j) if ctypes_wrapped.c_int((j.value > ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_long(int((i.value + j.value))).value).contents.value != helpers.ptrArithmetic(p, '+', j.value).contents.value)).value: break if ctypes_wrapped.c_int((j.value == ctypes_wrapped.c_int(int(0L)).value)).value: return i.value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((mask.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_ulong(int((i.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value))).value))).value)).value: helpers.assign(i, ctypes_wrapped.c_long(int((i.value - m.value))).value) else: helpers.assign(i, ctypes_wrapped.c_long(int((i.value - skip.value))).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_ulong(int((not ctypes_wrapped.c_ulong(int((mask.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', ctypes_wrapped.c_ulong(int((i.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(64L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value))).value))).value)).value: helpers.assign(i, ctypes_wrapped.c_long(int((i.value - m.value))).value) if ctypes_wrapped.c_int((mode.value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return count.value del count del mlast del i del mask del j del m del n del p del s del skip del mode del w del maxcount return g.Py_ssize_t().value @staticmethod def stringlib_count(str_a, str_len, sub, sub_len, maxcount): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sub = ctypes.cast(sub, ctypes.POINTER(ctypes_wrapped.c_byte)) sub_len = g.Py_ssize_t(int(sub_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) count = g.Py_ssize_t() if ctypes_wrapped.c_int((str_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((sub_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((str_len.value + ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((str_len.value < maxcount.value)).value else ctypes_wrapped.c_ulong(int(maxcount.value))).value helpers.assign(count, g.Py_ssize_t(int(g.fastsearch(str_a, str_len, sub, sub_len, maxcount, ctypes_wrapped.c_int(int(0L))))).value) if ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return count.value del count del str_a del sub del str_len del maxcount del sub_len return g.Py_ssize_t().value @staticmethod def stringlib_find(str_a, str_len, sub, sub_len, offset): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sub = ctypes.cast(sub, ctypes.POINTER(ctypes_wrapped.c_byte)) sub_len = g.Py_ssize_t(int(sub_len.value)) offset = g.Py_ssize_t(int(offset.value)) pos = g.Py_ssize_t() if ctypes_wrapped.c_int((str_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((sub_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: return offset.value helpers.assign(pos, g.Py_ssize_t(int(g.fastsearch(str_a, str_len, sub, sub_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_int(int(1L))))).value) if ctypes_wrapped.c_int((pos.value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(pos, u'+=', offset.value) return pos.value del str_a del sub del str_len del pos del offset del sub_len return g.Py_ssize_t().value @staticmethod def stringlib_rfind(str_a, str_len, sub, sub_len, offset): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sub = ctypes.cast(sub, ctypes.POINTER(ctypes_wrapped.c_byte)) sub_len = g.Py_ssize_t(int(sub_len.value)) offset = g.Py_ssize_t(int(offset.value)) pos = g.Py_ssize_t() if ctypes_wrapped.c_int((str_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((sub_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_long(int((str_len.value + offset.value))).value helpers.assign(pos, g.Py_ssize_t(int(g.fastsearch(str_a, str_len, sub, sub_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_int(int(2L))))).value) if ctypes_wrapped.c_int((pos.value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(pos, u'+=', offset.value) return pos.value del str_a del sub del str_len del pos del offset del sub_len return g.Py_ssize_t().value @staticmethod def stringlib_find_slice(str_a, str_len, sub, sub_len, start, end): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sub = ctypes.cast(sub, ctypes.POINTER(ctypes_wrapped.c_byte)) sub_len = g.Py_ssize_t(int(sub_len.value)) start = g.Py_ssize_t(int(start.value)) end = g.Py_ssize_t(int(end.value)) if ctypes_wrapped.c_int((end.value > str_len.value)).value: helpers.assign(end, str_len.value) elif ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(end, u'+=', str_len.value) if ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(end, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(start, u'+=', str_len.value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(start, ctypes_wrapped.c_int(int(0L)).value) return g.Py_ssize_t(int(g.stringlib_find(helpers.ptrArithmetic(str_a, u'+', start.value), ctypes_wrapped.c_long(int((end.value - start.value))), sub, sub_len, start))).value del end del sub del str_len del start del str_a del sub_len return g.Py_ssize_t().value @staticmethod def stringlib_rfind_slice(str_a, str_len, sub, sub_len, start, end): str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sub = ctypes.cast(sub, ctypes.POINTER(ctypes_wrapped.c_byte)) sub_len = g.Py_ssize_t(int(sub_len.value)) start = g.Py_ssize_t(int(start.value)) end = g.Py_ssize_t(int(end.value)) if ctypes_wrapped.c_int((end.value > str_len.value)).value: helpers.assign(end, str_len.value) elif ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(end, u'+=', str_len.value) if ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(end, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(start, u'+=', str_len.value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(start, ctypes_wrapped.c_int(int(0L)).value) return g.Py_ssize_t(int(g.stringlib_rfind(helpers.ptrArithmetic(str_a, u'+', start.value), ctypes_wrapped.c_long(int((end.value - start.value))), sub, sub_len, start))).value del end del sub del str_len del start del str_a del sub_len return g.Py_ssize_t().value @staticmethod def stringlib_contains_obj(str_a, sub): str_a = ctypes.cast(str_a, ctypes.POINTER(g.PyObject)) sub = ctypes.cast(sub, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int((g.Py_ssize_t(int(g.stringlib_find(ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(str_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(sub, ctypes.POINTER(g.PyVarObject)).contents.ob_size, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))))).value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value del str_a del sub return ctypes_wrapped.c_int().value @staticmethod def stringlib_parse_args_finds(function_name, args, subobj, start, end): function_name = ctypes.cast(function_name, ctypes.POINTER(ctypes_wrapped.c_byte)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) subobj = ctypes.cast(subobj, ctypes.POINTER(ctypes.POINTER(g.PyObject))) start = ctypes.cast(start, ctypes.POINTER(g.Py_ssize_t)) end = ctypes.cast(end, ctypes.POINTER(g.Py_ssize_t)) tmp_subobj = ctypes.POINTER(g.PyObject)() tmp_start = g.Py_ssize_t() tmp_end = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) obj_start = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) obj_end = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) format_a = (ctypes_wrapped.c_byte * 50L)(*intp._make_string('O|OO:')) len_a = ctypes_wrapped.c_ulong(int(values.strlen.value(ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte))).value)) values.strncpy.value(helpers.ptrArithmetic(format_a, u'+', len_a.value), function_name, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(50L)).value - len_a.value))).value - ctypes_wrapped.c_int(int(1L)).value)))) helpers.assign(helpers.ptrArithmetic(format_a, '+', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(50L)).value - ctypes_wrapped.c_int(int(1L)).value))).value).contents, ctypes.c_byte(0).value) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(tmp_subobj), ctypes.pointer(obj_start), ctypes.pointer(obj_end)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(obj_start, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyEval_SliceIndex(obj_start, ctypes.pointer(tmp_start)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(obj_end, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyEval_SliceIndex(obj_end, ctypes.pointer(tmp_end)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(start.contents, tmp_start.value) helpers.assign(end.contents, tmp_end.value) helpers.assignPtr(subobj.contents, (ctypes.cast(intp._storePtr(tmp_subobj), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del end del obj_start del args del len_a del format_a del start del tmp_end del subobj del tmp_start del tmp_subobj del obj_end del function_name return ctypes_wrapped.c_int().value @staticmethod def stringlib_partition(str_obj, str_a, str_len, sep_obj, sep, sep_len): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sep_obj = ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)) sep = ctypes.cast(sep, ctypes.POINTER(ctypes_wrapped.c_byte)) sep_len = g.Py_ssize_t(int(sep_len.value)) out = ctypes.POINTER(g.PyObject)() pos = g.Py_ssize_t() if ctypes_wrapped.c_int((sep_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('empty separator'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(out, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(out, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(pos, g.Py_ssize_t(int(g.fastsearch(str_a, str_len, sep, sep_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_int(int(1L))))).value) if ctypes_wrapped.c_int((pos.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(2L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(out), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(str_a, pos), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(sep_obj), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(pos, u'+=', sep_len.value) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(2L)).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', pos.value), ctypes_wrapped.c_long(int((str_len.value - pos.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(out, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(out, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(out, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(out), ctypes_wrapped.c_void_p).value or 0) del str_obj del str_a del sep_len del str_len del sep del sep_obj del pos del out return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def stringlib_rpartition(str_obj, str_a, str_len, sep_obj, sep, sep_len): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sep_obj = ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)) sep = ctypes.cast(sep, ctypes.POINTER(ctypes_wrapped.c_byte)) sep_len = g.Py_ssize_t(int(sep_len.value)) out = ctypes.POINTER(g.PyObject)() pos = g.Py_ssize_t() if ctypes_wrapped.c_int((sep_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('empty separator'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(out, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(3L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(out, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(pos, g.Py_ssize_t(int(g.fastsearch(str_a, str_len, sep, sep_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_int(int(2L))))).value) if ctypes_wrapped.c_int((pos.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(2L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(out), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(str_a, pos), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(sep_obj), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssign(pos, u'+=', sep_len.value) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(out, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(2L)).value).contents, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', pos.value), ctypes_wrapped.c_long(int((str_len.value - pos.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(out, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(out, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(out, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(out), ctypes_wrapped.c_void_p).value or 0) del str_obj del str_a del sep_len del str_len del sep del sep_obj del pos del out return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def stringlib_split_whitespace(str_obj, str_a, str_len, maxcount): goto = None while True: if (goto is None): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() count = g.Py_ssize_t() list_a = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(12L)).value)) if ctypes_wrapped.c_int((maxcount.value >= ctypes_wrapped.c_int(int(12L)).value)).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((maxcount.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value).value) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.postfixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < str_len.value)).value and ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(g._Py_ctype_table, '+', ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value).contents.value & ctypes_wrapped.c_int(int(8L)).value))).value)).value): goto = 5 continue helpers.postfixInc(i) goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value == str_len.value)).value): goto = 6 continue goto = 3 continue if (goto == 6): goto = None if (goto is None): helpers.assign(j, i.value) helpers.postfixInc(i) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < str_len.value)).value and ctypes_wrapped.c_uint(int((not ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(g._Py_ctype_table, '+', ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value).contents.value & ctypes_wrapped.c_int(int(8L)).value))).value))).value)).value): goto = 8 continue helpers.postfixInc(i) goto = 7 continue if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((i.value == str_len.value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 9 continue helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(count) goto = 3 continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', j.value), ctypes_wrapped.c_long(int((i.value - j.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue goto = u'onError' continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 12 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 11 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 14 continue if (goto == 15): goto = None if (goto is None): if (not True): goto = 16 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue pass goto = 17 continue if (goto == 18): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 20 continue continue goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = 16 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = u'onError' continue goto = 13 continue if (goto == 14): goto = None if (goto == 21): goto = None if (goto is None): if (not True): goto = 22 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue pass goto = 23 continue if (goto == 24): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 26 continue continue goto = 25 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 22): goto = None if (goto == 13): goto = None if (goto == 11): goto = None if (goto is None): helpers.postfixInc(count) goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < str_len.value)).value): goto = 27 continue if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < str_len.value)).value and ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(g._Py_ctype_table, '+', ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value).contents.value & ctypes_wrapped.c_int(int(8L)).value))).value)).value): goto = 29 continue helpers.postfixInc(i) goto = 28 continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value != str_len.value)).value): goto = 30 continue helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', i.value), ctypes_wrapped.c_long(int((str_len.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 31 continue goto = u'onError' continue if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 33 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 32 continue if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 35 continue if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = u'onError' continue goto = 34 continue if (goto == 35): goto = None if (goto == 42): goto = None if (goto is None): if (not True): goto = 43 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue pass goto = 44 continue if (goto == 45): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 44): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 47 continue continue goto = 46 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 46): goto = None if (goto is None): goto = 42 continue if (goto == 43): goto = None if (goto == 34): goto = None if (goto == 32): goto = None if (goto is None): helpers.postfixInc(count) if (goto == 30): goto = None if (goto == 27): goto = None if (goto is None): helpers.assign(ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, count.value) return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 48): goto = None if (goto is None): if (not True): goto = 49 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue pass goto = 50 continue if (goto == 51): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 53 continue continue goto = 52 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 52): goto = None if (goto is None): goto = 48 continue if (goto == 49): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del count del str_a del sub del i del str_len del j del list_a del maxcount return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def stringlib_split_char(str_obj, str_a, str_len, ch, maxcount): goto = None while True: if (goto is None): first_iteration = None str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) ch = ctypes_wrapped.c_byte(int(ch.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() count = g.Py_ssize_t() list_a = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(12L)).value)) if ctypes_wrapped.c_int((maxcount.value >= ctypes_wrapped.c_int(int(12L)).value)).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((maxcount.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value).value) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value < str_len.value)).value and ctypes_wrapped.c_int((helpers.postfixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 3 continue if (not True): goto = 4 continue first_iteration = True if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 8 continue first_iteration = False goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.postfixInc(j) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value < str_len.value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.ptrArithmetic(str_a, '+', j.value).contents.value == ch.value)).value): goto = 11 continue helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', i.value), ctypes_wrapped.c_long(int((j.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'onError' continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 14 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 13 continue if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 16 continue if (goto == 17): goto = None if (goto is None): if (not True): goto = 18 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue pass goto = 19 continue if (goto == 20): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 22 continue continue goto = 21 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 21): goto = None if (goto is None): goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = u'onError' continue goto = 15 continue if (goto == 16): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto == 15): goto = None if (goto == 13): goto = None if (goto is None): helpers.postfixInc(count) helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_ulong(int((j.value + ctypes_wrapped.c_int(int(1L)).value))).value).value) goto = 6 continue if (goto == 11): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto is None): goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 30 continue helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(count) goto = 29 continue if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value <= str_len.value)).value): goto = 31 continue helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', i.value), ctypes_wrapped.c_long(int((str_len.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue goto = u'onError' continue if (goto == 32): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 34 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 33 continue if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 36 continue if (goto == 37): goto = None if (goto is None): if (not True): goto = 38 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 40 continue pass goto = 39 continue if (goto == 40): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 42 continue continue goto = 41 continue if (goto == 42): goto = None if (goto is None): goto = 38 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = u'onError' continue goto = 35 continue if (goto == 36): goto = None if (goto == 43): goto = None if (goto is None): if (not True): goto = 44 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue pass goto = 45 continue if (goto == 46): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 45): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 44): goto = None if (goto == 35): goto = None if (goto == 33): goto = None if (goto is None): helpers.postfixInc(count) if (goto == 31): goto = None if (goto == 29): goto = None if (goto is None): helpers.assign(ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, count.value) return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 49): goto = None if (goto is None): if (not True): goto = 50 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 52 continue pass goto = 51 continue if (goto == 52): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 51): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 54 continue continue goto = 53 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 50): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del count del ch del str_a del sub del i del str_len del j del list_a del maxcount return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def stringlib_split(str_obj, str_a, str_len, sep, sep_len, maxcount): goto = None while True: if (goto is None): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sep = ctypes.cast(sep, ctypes.POINTER(ctypes_wrapped.c_byte)) sep_len = g.Py_ssize_t(int(sep_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() pos = g.Py_ssize_t() count = g.Py_ssize_t() list_a = ctypes.POINTER(g.PyObject)() sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((sep_len.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('empty separator'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value goto = 1 continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((sep_len.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 3 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_split_char(str_obj, str_a, str_len, helpers.ptrArithmetic(sep, '+', ctypes_wrapped.c_int(int(0L)).value).contents, maxcount), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 3): goto = None if (goto == 1): goto = None if (goto is None): helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(12L)).value)) if ctypes_wrapped.c_int((maxcount.value >= ctypes_wrapped.c_int(int(12L)).value)).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((maxcount.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 4): goto = None if (goto is None): helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value).value) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.postfixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue helpers.assign(pos, g.Py_ssize_t(int(g.fastsearch(helpers.ptrArithmetic(str_a, u'+', i.value), ctypes_wrapped.c_long(int((str_len.value - i.value))), sep, sep_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_int(int(1L))))).value) if (not ctypes_wrapped.c_int((pos.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.assign(j, ctypes_wrapped.c_long(int((i.value + pos.value))).value) helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', i.value), ctypes_wrapped.c_long(int((j.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue goto = u'onError' continue if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 10 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 9 continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 12 continue if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = u'onError' continue goto = 11 continue if (goto == 12): goto = None if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 24 continue continue goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): helpers.postfixInc(count) helpers.assign(i, ctypes_wrapped.c_long(int((j.value + sep_len.value))).value) goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 26 continue helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(count) goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', i.value), ctypes_wrapped.c_long(int((str_len.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue goto = u'onError' continue if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 29 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 28 continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 31 continue if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): goto = u'onError' continue goto = 30 continue if (goto == 31): goto = None if (goto == 38): goto = None if (goto is None): if (not True): goto = 39 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 41 continue pass goto = 40 continue if (goto == 41): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 43 continue continue goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 42): goto = None if (goto is None): goto = 38 continue if (goto == 39): goto = None if (goto == 30): goto = None if (goto == 28): goto = None if (goto is None): helpers.postfixInc(count) if (goto == 25): goto = None if (goto is None): helpers.assign(ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, count.value) return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 44): goto = None if (goto is None): if (not True): goto = 45 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue pass goto = 46 continue if (goto == 47): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 49 continue continue goto = 48 continue if (goto == 49): goto = None if (goto is None): goto = 45 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 45): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del count del j del str_a del sub del sep_len del i del str_len del sep del pos del list_a del maxcount return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def stringlib_rsplit_whitespace(str_obj, str_a, str_len, maxcount): goto = None while True: if (goto is None): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() count = g.Py_ssize_t() list_a = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(12L)).value)) if ctypes_wrapped.c_int((maxcount.value >= ctypes_wrapped.c_int(int(12L)).value)).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((maxcount.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_ulong(int((str_len.value - ctypes_wrapped.c_int(int(1L)).value))).value).value) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.postfixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(g._Py_ctype_table, '+', ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value).contents.value & ctypes_wrapped.c_int(int(8L)).value))).value)).value): goto = 5 continue helpers.postfixDec(i) goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = 3 continue if (goto == 6): goto = None if (goto is None): helpers.assign(j, i.value) helpers.postfixDec(i) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_uint(int((not ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(g._Py_ctype_table, '+', ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value).contents.value & ctypes_wrapped.c_int(int(8L)).value))).value))).value)).value): goto = 8 continue helpers.postfixDec(i) goto = 7 continue if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value == ctypes_wrapped.c_ulong(int((str_len.value - ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 9 continue helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(count) goto = 3 continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value), g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((j.value + ctypes_wrapped.c_int(int(1L)).value))).value - ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue goto = u'onError' continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 12 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 11 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 14 continue if (goto == 15): goto = None if (goto is None): if (not True): goto = 16 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue pass goto = 17 continue if (goto == 18): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 20 continue continue goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = 16 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = u'onError' continue goto = 13 continue if (goto == 14): goto = None if (goto == 21): goto = None if (goto is None): if (not True): goto = 22 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue pass goto = 23 continue if (goto == 24): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 26 continue continue goto = 25 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 22): goto = None if (goto == 13): goto = None if (goto == 11): goto = None if (goto is None): helpers.postfixInc(count) goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(g._Py_ctype_table, '+', ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value).contents.value & ctypes_wrapped.c_int(int(8L)).value))).value)).value): goto = 29 continue helpers.postfixDec(i) goto = 28 continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', ctypes_wrapped.c_int(int(0L)).value), g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value - ctypes_wrapped.c_int(int(0L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 31 continue goto = u'onError' continue if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 33 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 32 continue if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 35 continue if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 41 continue continue goto = 40 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = u'onError' continue goto = 34 continue if (goto == 35): goto = None if (goto == 42): goto = None if (goto is None): if (not True): goto = 43 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue pass goto = 44 continue if (goto == 45): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 44): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 47 continue continue goto = 46 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 46): goto = None if (goto is None): goto = 42 continue if (goto == 43): goto = None if (goto == 34): goto = None if (goto == 32): goto = None if (goto is None): helpers.postfixInc(count) if (goto == 30): goto = None if (goto == 27): goto = None if (goto is None): helpers.assign(ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, count.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Reverse(list_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue goto = u'onError' continue if (goto == 48): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 49): goto = None if (goto is None): if (not True): goto = 50 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 52 continue pass goto = 51 continue if (goto == 52): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 51): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 54 continue continue goto = 53 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 50): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del count del str_a del sub del i del str_len del j del list_a del maxcount return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def stringlib_rsplit_char(str_obj, str_a, str_len, ch, maxcount): goto = None while True: if (goto is None): first_iteration = None str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) ch = ctypes_wrapped.c_byte(int(ch.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() count = g.Py_ssize_t() list_a = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(12L)).value)) if ctypes_wrapped.c_int((maxcount.value >= ctypes_wrapped.c_int(int(12L)).value)).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((maxcount.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_ulong(int((str_len.value - ctypes_wrapped.c_int(int(1L)).value))).value).value) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((helpers.postfixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 3 continue if (not True): goto = 4 continue first_iteration = True if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 8 continue first_iteration = False goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.postfixDec(i) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value == ch.value)).value): goto = 11 continue helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value), g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((j.value + ctypes_wrapped.c_int(int(1L)).value))).value - ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'onError' continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 14 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 13 continue if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 16 continue if (goto == 17): goto = None if (goto is None): if (not True): goto = 18 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue pass goto = 19 continue if (goto == 20): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 22 continue continue goto = 21 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 21): goto = None if (goto is None): goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = u'onError' continue goto = 15 continue if (goto == 16): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto == 15): goto = None if (goto == 13): goto = None if (goto is None): helpers.postfixInc(count) helpers.assign(j, helpers.assign(i, ctypes_wrapped.c_ulong(int((i.value - ctypes_wrapped.c_int(int(1L)).value))).value).value) goto = 6 continue if (goto == 11): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto is None): goto = 2 continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 30 continue helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(count) goto = 29 continue if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value >= ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 31 continue helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', ctypes_wrapped.c_int(int(0L)).value), g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((j.value + ctypes_wrapped.c_int(int(1L)).value))).value - ctypes_wrapped.c_int(int(0L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue goto = u'onError' continue if (goto == 32): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 34 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 33 continue if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 36 continue if (goto == 37): goto = None if (goto is None): if (not True): goto = 38 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 40 continue pass goto = 39 continue if (goto == 40): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 42 continue continue goto = 41 continue if (goto == 42): goto = None if (goto is None): goto = 38 continue if (goto == 41): goto = None if (goto is None): goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = u'onError' continue goto = 35 continue if (goto == 36): goto = None if (goto == 43): goto = None if (goto is None): if (not True): goto = 44 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue pass goto = 45 continue if (goto == 46): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 45): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 47): goto = None if (goto is None): goto = 43 continue if (goto == 44): goto = None if (goto == 35): goto = None if (goto == 33): goto = None if (goto is None): helpers.postfixInc(count) if (goto == 31): goto = None if (goto == 29): goto = None if (goto is None): helpers.assign(ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, count.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Reverse(list_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 49 continue goto = u'onError' continue if (goto == 49): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 50): goto = None if (goto is None): if (not True): goto = 51 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 53 continue pass goto = 52 continue if (goto == 53): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 52): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 55 continue continue goto = 54 continue if (goto == 55): goto = None if (goto is None): goto = 51 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 51): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del count del ch del str_a del sub del i del str_len del j del list_a del maxcount return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def stringlib_rsplit(str_obj, str_a, str_len, sep, sep_len, maxcount): goto = None while True: if (goto is None): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) sep = ctypes.cast(sep, ctypes.POINTER(ctypes_wrapped.c_byte)) sep_len = g.Py_ssize_t(int(sep_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) j = g.Py_ssize_t() pos = g.Py_ssize_t() count = g.Py_ssize_t() list_a = ctypes.POINTER(g.PyObject)() sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((sep_len.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('empty separator'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value goto = 1 continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((sep_len.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 3 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_rsplit_char(str_obj, str_a, str_len, helpers.ptrArithmetic(sep, '+', ctypes_wrapped.c_int(int(0L)).value).contents, maxcount), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 3): goto = None if (goto == 1): goto = None if (goto is None): helpers.assignPtr(list_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(12L)).value)) if ctypes_wrapped.c_int((maxcount.value >= ctypes_wrapped.c_int(int(12L)).value)).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((maxcount.value + ctypes_wrapped.c_int(int(1L)).value))).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 4): goto = None if (goto is None): helpers.assign(j, str_len.value) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.postfixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue helpers.assign(pos, g.Py_ssize_t(int(g.fastsearch(str_a, j, sep, sep_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_int(int(2L))))).value) if (not ctypes_wrapped.c_int((pos.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', ctypes_wrapped.c_long(int((pos.value + sep_len.value))).value), ctypes_wrapped.c_long(int((j.value - ctypes_wrapped.c_long(int((pos.value + sep_len.value))).value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue goto = u'onError' continue if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 10 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 9 continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 12 continue if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = u'onError' continue goto = 11 continue if (goto == 12): goto = None if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 24 continue continue goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto == 11): goto = None if (goto == 9): goto = None if (goto is None): helpers.postfixInc(count) helpers.assign(j, pos.value) goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 26 continue helpers.postfixInc(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(count) goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', ctypes_wrapped.c_int(int(0L)).value), g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((j.value - ctypes_wrapped.c_int(int(0L)).value))).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue goto = u'onError' continue if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int((count.value < ctypes_wrapped.c_int(int(12L)).value)).value): goto = 29 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(list_a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', count.value).contents, (ctypes.cast(intp._storePtr(sub), ctypes_wrapped.c_void_p).value or 0)) goto = 28 continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 31 continue if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): goto = u'onError' continue goto = 30 continue if (goto == 31): goto = None if (goto == 38): goto = None if (goto is None): if (not True): goto = 39 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 41 continue pass goto = 40 continue if (goto == 41): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 43 continue continue goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 42): goto = None if (goto is None): goto = 38 continue if (goto == 39): goto = None if (goto == 30): goto = None if (goto == 28): goto = None if (goto is None): helpers.postfixInc(count) if (goto == 25): goto = None if (goto is None): helpers.assign(ctypes.cast(list_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, count.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Reverse(list_a))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue goto = u'onError' continue if (goto == 44): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 45): goto = None if (goto is None): if (not True): goto = 46 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue pass goto = 47 continue if (goto == 48): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 47): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 50 continue continue goto = 49 continue if (goto == 50): goto = None if (goto is None): goto = 46 continue if (goto == 49): goto = None if (goto is None): goto = 45 continue if (goto == 46): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del count del j del str_a del sub del sep_len del str_len del sep del pos del list_a del maxcount return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def stringlib_splitlines(str_obj, str_a, str_len, keepends): goto = None while True: if (goto is None): first_iteration = None str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) str_a = ctypes.cast(str_a, ctypes.POINTER(ctypes_wrapped.c_byte)) str_len = g.Py_ssize_t(int(str_len.value)) keepends = ctypes_wrapped.c_int(int(keepends.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() list_a = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) sub = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): if (not True): goto = 2 continue first_iteration = True helpers.assign(i, helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value).value) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 5 continue first_iteration = False if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < str_len.value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): goto = 4 continue if (goto == 6): goto = None if (goto is None): eol = g.Py_ssize_t() if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < str_len.value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value == ctypes.c_byte(10).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value == ctypes.c_byte(13).value)).value)).value)).value)).value): goto = 9 continue helpers.postfixInc(i) goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.assign(eol, i.value) if (not ctypes_wrapped.c_int((i.value < str_len.value)).value): goto = 10 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(str_a, '+', i.value).contents.value == ctypes.c_byte(13).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value < str_len.value)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(str_a, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.value == ctypes.c_byte(10).value)).value)).value): goto = 12 continue helpers.augAssign(i, u'+=', ctypes_wrapped.c_int(int(2L)).value) goto = 11 continue if (goto == 12): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 11): goto = None if (goto is None): if (not keepends.value): goto = 13 continue helpers.assign(eol, i.value) if (goto == 13): goto = None if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((eol.value == str_len.value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 14 continue if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, str_obj))).value): goto = 15 continue goto = u'onError' continue if (goto == 15): goto = None if (goto is None): goto = 4 continue if (goto == 14): goto = None if (goto is None): helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(str_a, u'+', j.value), ctypes_wrapped.c_long(int((eol.value - j.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(sub, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue goto = u'onError' continue if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PyList_Append(list_a, sub))).value): goto = 18 continue if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 24 continue continue goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto is None): goto = u'onError' continue goto = 17 continue if (goto == 18): goto = None if (goto == 25): goto = None if (goto is None): if (not True): goto = 26 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(sub, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue pass goto = 27 continue if (goto == 28): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(sub, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 30 continue continue goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 26 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 26): goto = None if (goto == 17): goto = None if (goto is None): helpers.assign(j, i.value) del eol goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(list_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 36 continue continue goto = 35 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del str_obj del str_a del sub del i del str_len del j del list_a del keepends return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break GroupGenerator = structs._anonymous_GroupGenerator @staticmethod def _GroupGenerator_init(self, grouping): self = ctypes.cast(self, ctypes.POINTER(g.GroupGenerator)) grouping = ctypes.cast(grouping, ctypes.POINTER(ctypes_wrapped.c_byte)) helpers.assignPtr(self.contents.grouping, (ctypes.cast(intp._storePtr(grouping), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(self.contents.i, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(self.contents.previous, ctypes_wrapped.c_int(int(0L)).value) del self del grouping return _GroupGenerator_next = 'Compile exception ' "cannot handle CUnknownType {'name': u'CHAR_MAX'}" @staticmethod def fill(digits_end, buffer_end, n_chars, n_zeros, thousands_sep, thousands_sep_len): digits_end = ctypes.cast(digits_end, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) buffer_end = ctypes.cast(buffer_end, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) n_chars = g.Py_ssize_t(int(n_chars.value)) n_zeros = g.Py_ssize_t(int(n_zeros.value)) thousands_sep = ctypes.cast(thousands_sep, ctypes.POINTER(ctypes_wrapped.c_byte)) thousands_sep_len = g.Py_ssize_t(int(thousands_sep_len.value)) if (ctypes.cast(thousands_sep, ctypes_wrapped.c_void_p).value or 0): helpers.augAssignPtr(buffer_end.contents, u'-=', thousands_sep_len.value) values.memcpy.value(ctypes.cast(buffer_end.contents, ctypes_wrapped.c_void_p), ctypes.cast(thousands_sep, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(thousands_sep_len.value)) helpers.augAssignPtr(buffer_end.contents, u'-=', n_chars.value) helpers.augAssignPtr(digits_end.contents, u'-=', n_chars.value) values.memcpy.value(ctypes.cast(buffer_end.contents, ctypes_wrapped.c_void_p), ctypes.cast(digits_end.contents, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((n_chars.value * ctypes_wrapped.c_size_t(1).value)))) helpers.augAssignPtr(buffer_end.contents, u'-=', n_zeros.value) values.memset.value(ctypes.cast(buffer_end.contents, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes.c_byte(48).value), ctypes_wrapped.c_ulong(n_zeros.value)) del thousands_sep del buffer_end del thousands_sep_len del n_chars del n_zeros del digits_end return @staticmethod def _PyString_InsertThousandsGrouping(buffer_a, n_buffer, digits, n_digits, min_width, grouping, thousands_sep): buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)) n_buffer = g.Py_ssize_t(int(n_buffer.value)) digits = ctypes.cast(digits, ctypes.POINTER(ctypes_wrapped.c_byte)) n_digits = g.Py_ssize_t(int(n_digits.value)) min_width = g.Py_ssize_t(int(min_width.value)) grouping = ctypes.cast(grouping, ctypes.POINTER(ctypes_wrapped.c_byte)) thousands_sep = ctypes.cast(thousands_sep, ctypes.POINTER(ctypes_wrapped.c_byte)) count = g.Py_ssize_t() n_zeros = g.Py_ssize_t() loop_broken = ctypes_wrapped.c_int() use_separator = ctypes_wrapped.c_int() buffer_end = ctypes.POINTER(ctypes_wrapped.c_byte)() digits_end = ctypes.POINTER(ctypes_wrapped.c_byte)() l = g.Py_ssize_t() n_chars = g.Py_ssize_t() thousands_sep_len = g.Py_ssize_t(int(values.strlen.value(thousands_sep).value)) remaining = g.Py_ssize_t(int(n_digits.value)) groupgen = g.GroupGenerator() g._GroupGenerator_init(ctypes.pointer(groupgen), grouping) if (ctypes.cast(buffer_a, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(buffer_end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(buffer_a, u'+', n_buffer.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(digits_end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(digits, u'+', n_digits.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.assign(l, g.Py_ssize_t(int(g._GroupGenerator_next(ctypes.pointer(groupgen)))).value).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(l, (ctypes_wrapped.c_long(int(l.value)) if ctypes_wrapped.c_int((l.value < (ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int(((ctypes_wrapped.c_long(int(min_width.value)) if ctypes_wrapped.c_int((remaining.value < min_width.value)).value else ctypes_wrapped.c_long(int(remaining.value))).value < ctypes_wrapped.c_int(int(1L)).value)).value else ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int(min_width.value)) if ctypes_wrapped.c_int((remaining.value < min_width.value)).value else ctypes_wrapped.c_long(int(remaining.value))).value))).value)).value else ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int(((ctypes_wrapped.c_long(int(min_width.value)) if ctypes_wrapped.c_int((remaining.value < min_width.value)).value else ctypes_wrapped.c_long(int(remaining.value))).value < ctypes_wrapped.c_int(int(1L)).value)).value else ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int(min_width.value)) if ctypes_wrapped.c_int((remaining.value < min_width.value)).value else ctypes_wrapped.c_long(int(remaining.value))).value))).value))).value) helpers.assign(n_zeros, (ctypes_wrapped.c_long(int(ctypes_wrapped.c_long(int((l.value - remaining.value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < ctypes_wrapped.c_long(int((l.value - remaining.value))).value)).value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value) helpers.assign(n_chars, (ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int(remaining.value)) if ctypes_wrapped.c_int((remaining.value < l.value)).value else ctypes_wrapped.c_long(int(l.value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < (ctypes_wrapped.c_long(int(remaining.value)) if ctypes_wrapped.c_int((remaining.value < l.value)).value else ctypes_wrapped.c_long(int(l.value))).value)).value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value) helpers.augAssign(count, u'+=', ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(((ctypes_wrapped.c_long(int(thousands_sep_len.value)) if use_separator.value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value + n_zeros.value))).value + n_chars.value))).value) if (ctypes.cast(buffer_a, ctypes_wrapped.c_void_p).value or 0): g.fill(ctypes.pointer(digits_end), ctypes.pointer(buffer_end), n_chars, n_zeros, (ctypes.cast(thousands_sep, ctypes.POINTER(ctypes_wrapped.c_byte)) if use_separator.value else intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), thousands_sep_len) helpers.assign(use_separator, ctypes_wrapped.c_int(int(1L)).value) helpers.augAssign(remaining, u'-=', n_chars.value) helpers.augAssign(min_width, u'-=', l.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((remaining.value <= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((min_width.value <= ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(loop_broken, ctypes_wrapped.c_int(int(1L)).value) break helpers.augAssign(min_width, u'-=', thousands_sep_len.value) if ctypes_wrapped.c_int(int((not loop_broken.value))).value: helpers.assign(l, (ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)) if ctypes_wrapped.c_int(((ctypes_wrapped.c_long(int(min_width.value)) if ctypes_wrapped.c_int((remaining.value < min_width.value)).value else ctypes_wrapped.c_long(int(remaining.value))).value < ctypes_wrapped.c_int(int(1L)).value)).value else ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int(min_width.value)) if ctypes_wrapped.c_int((remaining.value < min_width.value)).value else ctypes_wrapped.c_long(int(remaining.value))).value))).value) helpers.assign(n_zeros, (ctypes_wrapped.c_long(int(ctypes_wrapped.c_long(int((l.value - remaining.value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < ctypes_wrapped.c_long(int((l.value - remaining.value))).value)).value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value) helpers.assign(n_chars, (ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int(remaining.value)) if ctypes_wrapped.c_int((remaining.value < l.value)).value else ctypes_wrapped.c_long(int(l.value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < (ctypes_wrapped.c_long(int(remaining.value)) if ctypes_wrapped.c_int((remaining.value < l.value)).value else ctypes_wrapped.c_long(int(l.value))).value)).value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value) helpers.augAssign(count, u'+=', ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(((ctypes_wrapped.c_long(int(thousands_sep_len.value)) if use_separator.value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value + n_zeros.value))).value + n_chars.value))).value) if (ctypes.cast(buffer_a, ctypes_wrapped.c_void_p).value or 0): g.fill(ctypes.pointer(digits_end), ctypes.pointer(buffer_end), n_chars, n_zeros, (ctypes.cast(thousands_sep, ctypes.POINTER(ctypes_wrapped.c_byte)) if use_separator.value else intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), thousands_sep_len) return count.value del digits del count del n_chars del use_separator del digits_end del thousands_sep del l del buffer_end del remaining del thousands_sep_len del n_digits del n_zeros del buffer_a del min_width del groupgen del n_buffer del loop_broken del grouping return g.Py_ssize_t().value _Py_InsertThousandsGroupingLocale = 'Compile exception ' "bad type: " @staticmethod def string_print(op, fp, flags): first_iteration = None op = ctypes.cast(op, ctypes.POINTER(g.PyStringObject)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) flags = ctypes_wrapped.c_int(int(flags.value)) i = g.Py_ssize_t() str_len = g.Py_ssize_t() c = ctypes_wrapped.c_byte() quote = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: ret = ctypes_wrapped.c_int() helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyObject_Str(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(ret, ctypes_wrapped.c_int(int(g.string_print(op, fp, flags))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ret.value del ret if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(1L)).value))).value: data = ctypes.cast(op.contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) size = g.Py_ssize_t(int(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) while ctypes_wrapped.c_int((size.value > ctypes_wrapped.c_long(int(2147483648L)).value)).value: chunk_size = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_long(int(2147483648L)).value & ctypes_wrapped.c_int(int((~ ctypes_wrapped.c_int(int(16383L)).value))).value))).value)) values.fwrite.value(ctypes.cast(data, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_ulong(chunk_size.value), ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) helpers.augAssignPtr(data, u'+=', chunk_size.value) helpers.augAssign(size, u'-=', chunk_size.value) del chunk_size values.fwrite.value(ctypes.cast(data, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_ulong(ctypes_wrapped.c_int(int(size.value)).value), ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) return ctypes_wrapped.c_int(int(0L)).value del data del size helpers.assign(quote, ctypes.c_byte(39).value) if ctypes_wrapped.c_int(((ctypes.cast(values.memchr.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes.c_byte(39).value), ctypes_wrapped.c_ulong(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((not (ctypes.cast(values.memchr.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes.c_byte(34).value), ctypes_wrapped.c_ulong(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(quote, ctypes.c_byte(34).value) helpers.assign(str_len, ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) values.fputc.value(quote, ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < str_len.value)).value: pass else: break helpers.assign(c, helpers.ptrArithmetic(op.contents.ob_sval, '+', i.value).contents.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == quote.value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(92).value)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('\\%c'), ctypes.POINTER(ctypes_wrapped.c_byte)), c) elif ctypes_wrapped.c_int((c.value == ctypes.c_byte(9).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('\\t'), ctypes.POINTER(ctypes_wrapped.c_byte))) elif ctypes_wrapped.c_int((c.value == ctypes.c_byte(10).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('\\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) elif ctypes_wrapped.c_int((c.value == ctypes.c_byte(13).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('\\r'), ctypes.POINTER(ctypes_wrapped.c_byte))) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value < ctypes.c_byte(32).value)).value or ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(127L)).value)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('\\x%02x'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_uint(int((c.value & ctypes_wrapped.c_int(int(255L)).value)))) else: values.fputc.value(ctypes_wrapped.c_int(c.value), ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) values.fputc.value(quote, ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int))) return ctypes_wrapped.c_int(int(0L)).value del fp del c del i del quote del str_len del flags del op return ctypes_wrapped.c_int().value @staticmethod def PyString_Repr(obj, smartquotes): first_iteration = None obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) smartquotes = ctypes_wrapped.c_int(int(smartquotes.value)) op = ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyStringObject)) newsize = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(2L)).value + ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(4L)).value * ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value))).value)) v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((newsize.value > g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((newsize.value / ctypes_wrapped.c_int(int(4L)).value))).value != ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('string is too large to make repr'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(newsize.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value else: i = g.Py_ssize_t() c = ctypes_wrapped.c_byte() p = ctypes.POINTER(ctypes_wrapped.c_byte)() quote = ctypes_wrapped.c_int() helpers.assign(quote, ctypes.c_byte(39).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((smartquotes.value and (ctypes.cast(values.memchr.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes.c_byte(39).value), ctypes_wrapped.c_ulong(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not (ctypes.cast(values.memchr.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes.c_byte(34).value), ctypes_wrapped.c_ulong(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(quote, ctypes.c_byte(34).value) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.postfixIncPtr(p), quote.value).contents if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr((newsize.value - ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p).value or 0)) / 1)).value), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_void_p).value or 0) >= ctypes_wrapped.c_int(int(5L)).value))) helpers.assign(c, helpers.ptrArithmetic(op.contents.ob_sval, '+', i.value).contents.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == quote.value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(92).value)).value)).value: (helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(92).value).contents, helpers.assignPtr(helpers.postfixIncPtr(p), c.value).contents)[1] elif ctypes_wrapped.c_int((c.value == ctypes.c_byte(9).value)).value: (helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(92).value).contents, helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(116).value).contents)[1] elif ctypes_wrapped.c_int((c.value == ctypes.c_byte(10).value)).value: (helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(92).value).contents, helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(110).value).contents)[1] elif ctypes_wrapped.c_int((c.value == ctypes.c_byte(13).value)).value: (helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(92).value).contents, helpers.assignPtr(helpers.postfixIncPtr(p), ctypes.c_byte(114).value).contents)[1] elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value < ctypes.c_byte(32).value)).value or ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(127L)).value)).value)).value: values.sprintf.value(p, ctypes.cast(intp._make_string('\\x%02x'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_uint(int((c.value & ctypes_wrapped.c_int(int(255L)).value)))) helpers.augAssignPtr(p, u'+=', ctypes_wrapped.c_int(int(4L)).value) else: helpers.assignPtr(helpers.postfixIncPtr(p), c.value).contents values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr((newsize.value - ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p).value or 0)) / 1)).value), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_void_p).value or 0) >= ctypes_wrapped.c_int(int(1L)).value))) helpers.assignPtr(helpers.postfixIncPtr(p), quote.value).contents helpers.assign(p.contents, ctypes.c_byte(0).value) if ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(v), ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p).value or 0)) / 1))))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del i del p del c del quote del v del newsize del smartquotes del obj del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_repr(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_Repr(op, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_str(s): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0) else: t = ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyStringObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(ctypes.cast(t.contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(t, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del t del s return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_length(a): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) return ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del a return g.Py_ssize_t().value @staticmethod def string_concat(a, bb): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) bb = ctypes.cast(bb, ctypes.POINTER(g.PyObject)) size = g.Py_ssize_t() op = ctypes.POINTER(g.PyStringObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyByteArray_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyByteArray_Type)))).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyByteArray_Concat(ctypes.cast(a, ctypes.POINTER(g.PyObject)), bb), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("cannot concatenate 'str' and '%.200s' objects"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: if ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(bb), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(size, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value < ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('strings are too large to concat'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((size.value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value))).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('strings are too large to concat'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + size.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) (helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, size.value), ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyString_Type)), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1])[1] helpers.assign(op.contents.ob_shash, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(op.contents.ob_sstate, ctypes_wrapped.c_int(int(0L)).value) values.memcpy.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(a.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_sval, u'+', ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value), ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) helpers.assign(helpers.ptrArithmetic(op.contents.ob_sval, '+', size.value).contents, ctypes.c_byte(0).value) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del op del bb del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_repeat(a, n): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) n = g.Py_ssize_t(int(n.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() size = g.Py_ssize_t() op = ctypes.POINTER(g.PyStringObject)() nbytes = ctypes_wrapped.c_ulong() if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(size, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value * n.value))).value) if ctypes_wrapped.c_int((n.value and ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((size.value / n.value))).value != ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('repeated string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(nbytes, ctypes_wrapped.c_ulong(int(size.value)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((nbytes.value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value))).value <= nbytes.value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('repeated string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + nbytes.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + nbytes.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + nbytes.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) (helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, size.value), ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyString_Type)), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1])[1] helpers.assign(op.contents.ob_shash, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(op.contents.ob_sstate, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(helpers.ptrArithmetic(op.contents.ob_sval, '+', size.value).contents, ctypes.c_byte(0).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value: values.memset.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(helpers.ptrArithmetic(a.contents.ob_sval, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value), ctypes_wrapped.c_ulong(n.value)) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((i.value < size.value)).value: values.memcpy.value(ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(a.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) helpers.assign(i, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while ctypes_wrapped.c_int((i.value < size.value)).value: helpers.assign(j, (ctypes_wrapped.c_long(int(i.value)) if ctypes_wrapped.c_int((i.value <= ctypes_wrapped.c_long(int((size.value - i.value))).value)).value else ctypes_wrapped.c_long(int(ctypes_wrapped.c_long(int((size.value - i.value))).value))).value) values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_sval, u'+', i.value), ctypes_wrapped.c_void_p), ctypes.cast(op.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(j.value)) helpers.augAssign(i, u'+=', j.value) return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del i del j del n del nbytes del op del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_slice(a, i, j): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) i = g.Py_ssize_t(int(i.value)) j = g.Py_ssize_t(int(j.value)) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((j.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((j.value > ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assign(j, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value == ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.postfixInc(ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(a, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((j.value < i.value)).value: helpers.assign(j, i.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(a.contents.ob_sval, u'+', i.value), ctypes_wrapped.c_long(int((j.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del i del j return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_contains(str_obj, sub_obj): str_obj = ctypes.cast(str_obj, ctypes.POINTER(g.PyObject)) sub_obj = ctypes.cast(sub_obj, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(sub_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(sub_obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'in ' requires string as left operand, not %.200s"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(sub_obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.stringlib_contains_obj(str_obj, sub_obj))).value del str_obj del sub_obj return ctypes_wrapped.c_int().value @staticmethod def string_item(a, i): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) i = g.Py_ssize_t(int(i.value)) pchar = ctypes_wrapped.c_byte() v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('string index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(pchar, helpers.ptrArithmetic(a.contents.ob_sval, '+', i.value).contents.value) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(g.characters, '+', ctypes_wrapped.c_uint(int((pchar.value & ctypes_wrapped.c_int(int(255L)).value))).value).contents, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(ctypes.pointer(pchar), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del a del i del v del pchar return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_richcompare(a, b, op): goto = None while True: if (goto is None): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyStringObject)) op = ctypes_wrapped.c_int(int(op.value)) c = ctypes_wrapped.c_int() len_a = g.Py_ssize_t() len_b = g.Py_ssize_t() min_len = g.Py_ssize_t() result = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 1 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) goto = u'out' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0))).value): goto = 2 continue if (not True): goto = 3 continue _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value))): goto = 6 continue _switchfallthrough = True if (goto == 6): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value))): goto = 7 continue _switchfallthrough = True if (goto == 7): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value))): goto = 8 continue _switchfallthrough = True helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'out' continue if (goto == 8): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value))): goto = 9 continue _switchfallthrough = True if (goto == 9): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value))): goto = 10 continue _switchfallthrough = True if (goto == 10): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value))): goto = 11 continue _switchfallthrough = True helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'out' continue if (goto == 11): goto = None if (goto is None): goto = 5 continue goto = 4 continue if (goto == 5): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 3): goto = None if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value): goto = 12 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes.cast(b, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(a.contents.ob_sval, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == helpers.ptrArithmetic(b.contents.ob_sval, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value and ctypes_wrapped.c_int((values.memcmp.value(ctypes.cast(a.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(b.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 14 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 13): goto = None if (goto is None): goto = u'out' continue if (goto == 12): goto = None if (goto is None): helpers.assign(len_a, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(len_b, ctypes.cast(b, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(min_len, (ctypes_wrapped.c_long(int(len_a.value)) if ctypes_wrapped.c_int((len_a.value < len_b.value)).value else ctypes_wrapped.c_long(int(len_b.value))).value) if (not ctypes_wrapped.c_int((min_len.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue helpers.assign(c, ctypes_wrapped.c_ubyte(int((ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((a.contents.ob_sval[0].value & ctypes_wrapped.c_int(int(255L)).value))).value)).value - ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((b.contents.ob_sval[0].value & ctypes_wrapped.c_int(int(255L)).value))).value)).value))).value) if (not ctypes_wrapped.c_int((c.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue helpers.assign(c, values.memcmp.value(ctypes.cast(a.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(b.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(min_len.value)).value) if (goto == 17): goto = None if (goto is None): goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.assign(c, ctypes_wrapped.c_int(int(0L)).value) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((c.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue helpers.assign(c, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((len_a.value < len_b.value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int((len_a.value > len_b.value)).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value) if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value))): goto = 22 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value < ctypes_wrapped.c_int(int(0L)).value)).value) goto = 21 continue if (goto == 22): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value))): goto = 23 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value <= ctypes_wrapped.c_int(int(0L)).value)).value) goto = 21 continue if (goto == 23): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value))): goto = 24 continue _switchfallthrough = True values.assert_a.value(ctypes_wrapped.c_int(int(0L))) goto = 21 continue if (goto == 24): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value))): goto = 25 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int(0L)).value)).value) goto = 21 continue if (goto == 25): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value))): goto = 26 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value > ctypes_wrapped.c_int(int(0L)).value)).value) goto = 21 continue if (goto == 26): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value))): goto = 27 continue _switchfallthrough = True helpers.assign(c, ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(0L)).value)).value) goto = 21 continue if (goto == 27): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 28 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0)) goto = u'out' continue if (goto == 28): goto = None if (goto is None): goto = 21 continue goto = 20 continue if (goto == 21): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 19): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if c.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'out'): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del a del c del b del min_len del len_a del len_b del result del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _PyString_Eq(o1, o2): o1 = ctypes.cast(o1, ctypes.POINTER(g.PyObject)) o2 = ctypes.cast(o2, ctypes.POINTER(g.PyObject)) a = ctypes.cast(ctypes.cast(o1, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyStringObject)) b = ctypes.cast(ctypes.cast(o2, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyStringObject)) return ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes.cast(b, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int((a.contents.ob_sval[0].value == b.contents.ob_sval[0].value)).value)).value and ctypes_wrapped.c_int((values.memcmp.value(ctypes.cast(a.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(b.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value del a del b del o2 del o1 return ctypes_wrapped.c_int().value @staticmethod def string_hash(a): a = ctypes.cast(a, ctypes.POINTER(g.PyStringObject)) len_a = g.Py_ssize_t() p = ctypes.POINTER(ctypes_wrapped.c_ubyte)() x = ctypes_wrapped.c_long() if ctypes_wrapped.c_int((a.contents.ob_shash.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return a.contents.ob_shash.value helpers.assign(len_a, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((len_a.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(a.contents.ob_shash, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(a.contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(x, g._Py_HashSecret.prefix.value) helpers.augAssign(x, u'^=', ctypes_wrapped.c_ubyte(int((p.contents.value << ctypes_wrapped.c_int(int(7L)).value))).value) while ctypes_wrapped.c_int((helpers.prefixDec(len_a).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(x, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_int(int(1000003L)).value * x.value))).value ^ helpers.postfixIncPtr(p).contents.value))).value) helpers.augAssign(x, u'^=', ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.augAssign(x, u'^=', g._Py_HashSecret.suffix.value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assign(a.contents.ob_shash, x.value) return x.value del a del p del len_a del x return ctypes_wrapped.c_long().value @staticmethod def string_subscript(self, item): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((item.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: i = g.Py_ssize_t(int(g.Py_ssize_t(int(g.PyNumber_AsSsize_t(item, g.PyExc_IndexError))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.string_item(self, i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PySlice_Type), ctypes_wrapped.c_void_p).value or 0))).value: start = g.Py_ssize_t() stop = g.Py_ssize_t() step = g.Py_ssize_t() slicelength = g.Py_ssize_t() cur = g.Py_ssize_t() i = g.Py_ssize_t() source_buf = ctypes.POINTER(ctypes_wrapped.c_byte)() result_buf = ctypes.POINTER(ctypes_wrapped.c_byte)() result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySlice_GetIndicesEx(ctypes.cast(item, ctypes.POINTER(g.PySliceObject)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes.pointer(start), ctypes.pointer(stop), ctypes.pointer(step), ctypes.pointer(slicelength)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((slicelength.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((start.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((step.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((slicelength.value == ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((step.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', start.value), slicelength), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: helpers.assignPtr(source_buf, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(result_buf, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyMem_Malloc(ctypes_wrapped.c_ulong(int(slicelength.value))), ctypes_wrapped.c_void_p), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result_buf, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if True: first_iteration = True (helpers.assign(cur, start.value), helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: (helpers.augAssign(cur, u'+=', step.value), helpers.postfixInc(i))[1] if ctypes_wrapped.c_int((i.value < slicelength.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(result_buf, '+', i.value).contents, helpers.ptrArithmetic(source_buf, '+', cur.value).contents.value) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(result_buf, slicelength), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyMem_Free(ctypes.cast(result_buf, ctypes_wrapped.c_void_p)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result_buf del cur del i del slicelength del stop del start del step del result del source_buf else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('string indices must be integers, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del item del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_buffer_getreadbuf(self, index, ptr): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) index = g.Py_ssize_t(int(index.value)) ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_void_p)) if ctypes_wrapped.c_int((index.value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('accessing non-existent string segment'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(ptr.contents, (ctypes.cast(intp._storePtr(ctypes.cast(self.contents.ob_sval, ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0)) return ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del index del self del ptr return g.Py_ssize_t().value @staticmethod def string_buffer_getwritebuf(self, index, ptr): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) index = g.Py_ssize_t(int(index.value)) ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_void_p)) g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('Cannot use string as modifiable buffer'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del index del self del ptr return g.Py_ssize_t().value @staticmethod def string_buffer_getsegcount(self, lenp): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) lenp = ctypes.cast(lenp, ctypes.POINTER(g.Py_ssize_t)) if (ctypes.cast(lenp, ctypes_wrapped.c_void_p).value or 0): helpers.assign(lenp.contents, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) return ctypes_wrapped.c_int(int(1L)).value del self del lenp return g.Py_ssize_t().value @staticmethod def string_buffer_getcharbuf(self, index, ptr): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) index = g.Py_ssize_t(int(index.value)) ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((index.value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('accessing non-existent string segment'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(ptr.contents, (ctypes.cast(intp._storePtr(self.contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) return ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del index del self del ptr return g.Py_ssize_t().value @staticmethod def string_buffer_getbuffer(self, view, flags): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) flags = ctypes_wrapped.c_int(int(flags.value)) return ctypes_wrapped.c_int(int(g.PyBuffer_FillInfo(view, ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.cast(self.contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes_wrapped.c_int(int(1L)), flags))).value del self del flags del view return ctypes_wrapped.c_int().value string_as_sequence = PySequenceMethods() # TODO init string_as_sequence with PySequenceMethods(helpers.makeFuncPtr(lenfunc, string_length), helpers.makeFuncPtr(binaryfunc, string_concat), helpers.makeFuncPtr(ssizeargfunc, string_repeat), helpers.makeFuncPtr(ssizeargfunc, string_item), helpers.makeFuncPtr(ssizessizeargfunc, string_slice), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(objobjproc, string_contains)) string_as_mapping = PyMappingMethods() # TODO init string_as_mapping with PyMappingMethods(helpers.makeFuncPtr(lenfunc, string_length), helpers.makeFuncPtr(binaryfunc, string_subscript), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) string_as_buffer = PyBufferProcs() # TODO init string_as_buffer with PyBufferProcs(helpers.makeFuncPtr(readbufferproc, string_buffer_getreadbuf), helpers.makeFuncPtr(writebufferproc, string_buffer_getwritebuf), helpers.makeFuncPtr(segcountproc, string_buffer_getsegcount), helpers.makeFuncPtr(charbufferproc, string_buffer_getcharbuf), helpers.makeFuncPtr(getbufferproc, string_buffer_getbuffer), ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject), ctypes.POINTER(Py_buffer))(ctypes_wrapped.c_int(int(0L)).value)) stripformat = (ctypes.POINTER(ctypes_wrapped.c_byte) * 3)() # TODO init stripformat with (ctypes.POINTER(ctypes_wrapped.c_byte) * 3)(ctypes.cast(intp._make_string('|O:lstrip'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('|O:rstrip'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('|O:strip'), ctypes.POINTER(ctypes_wrapped.c_byte))) split__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init split__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_split(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) len_a = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) n = g.Py_ssize_t() maxsplit = g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) sub = ctypes.POINTER(ctypes_wrapped.c_byte)() subobj = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|On:split'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(subobj), ctypes.pointer(maxsplit)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((maxsplit.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(maxsplit, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value) if ctypes_wrapped.c_int(((ctypes.cast(subobj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_split_whitespace(ctypes.cast(self, ctypes.POINTER(g.PyObject)), s, len_a, maxsplit), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(ctypes.cast(subobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(subobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(subobj, ctypes.pointer(sub), ctypes.pointer(n)))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_split(ctypes.cast(self, ctypes.POINTER(g.PyObject)), s, len_a, sub, n, maxsplit), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del sub del self del args del len_a del n del s del subobj del maxsplit return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) partition__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init partition__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_partition(self, sep_obj): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) sep_obj = ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)) sep = ctypes.POINTER(ctypes_wrapped.c_byte)() sep_len = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sep, (ctypes.cast(intp._storePtr(ctypes.cast(sep_obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(sep_len, ctypes.cast(sep_obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(sep_obj, ctypes.pointer(sep), ctypes.pointer(sep_len)))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_partition(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, sep_obj, sep, sep_len), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del sep_len del sep_obj del sep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) rpartition__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init rpartition__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_rpartition(self, sep_obj): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) sep_obj = ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)) sep = ctypes.POINTER(ctypes_wrapped.c_byte)() sep_len = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(sep_obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sep, (ctypes.cast(intp._storePtr(ctypes.cast(sep_obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(sep_len, ctypes.cast(sep_obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(sep_obj, ctypes.pointer(sep), ctypes.pointer(sep_len)))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_rpartition(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, sep_obj, sep, sep_len), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del sep_len del sep_obj del sep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) rsplit__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init rsplit__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_rsplit(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) len_a = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) n = g.Py_ssize_t() maxsplit = g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) sub = ctypes.POINTER(ctypes_wrapped.c_byte)() subobj = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|On:rsplit'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(subobj), ctypes.pointer(maxsplit)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((maxsplit.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(maxsplit, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value) if ctypes_wrapped.c_int(((ctypes.cast(subobj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_rsplit_whitespace(ctypes.cast(self, ctypes.POINTER(g.PyObject)), s, len_a, maxsplit), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(ctypes.cast(subobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(subobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(subobj, ctypes.pointer(sub), ctypes.pointer(n)))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_rsplit(ctypes.cast(self, ctypes.POINTER(g.PyObject)), s, len_a, sub, n, maxsplit), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del sub del self del args del len_a del n del s del subobj del maxsplit return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) join__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init join__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_join(self, orig): first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) orig = ctypes.cast(orig, ctypes.POINTER(g.PyObject)) sep = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) seplen = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) res = ctypes.POINTER(g.PyObject)() p = ctypes.POINTER(ctypes_wrapped.c_byte)() seqlen = g.Py_ssize_t() sz = ctypes_wrapped.c_ulong() i = g.Py_ssize_t() seq = ctypes.POINTER(g.PyObject)() item = ctypes.POINTER(g.PyObject)() helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Fast(orig, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(seqlen, g.Py_ssize_t(int(g.PySequence_Size(seq))).value) if ctypes_wrapped.c_int((seqlen.value == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((seqlen.value == ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assignPtr(item, (ctypes.cast(intp._storePtr((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < seqlen.value)).value: pass else: break old_sz = ctypes_wrapped.c_ulong(int(sz.value)) helpers.assignPtr(item, (ctypes.cast(intp._storePtr((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('sequence item %zd: expected string, %.80s found'), ctypes.POINTER(ctypes_wrapped.c_byte)), i, ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.augAssign(sz, u'+=', ctypes.cast(item, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((i.value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(sz, u'+=', seplen.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((sz.value < old_sz.value)).value or ctypes_wrapped.c_int((sz.value > g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('join() result is too long for a Python string'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del old_sz helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(sz.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(res, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < seqlen.value)).value: pass else: break n = ctypes_wrapped.c_ulong() helpers.assignPtr(item, (ctypes.cast(intp._storePtr((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, ctypes.cast(item, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) values.memcpy.value(ctypes.cast(p, ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), n) helpers.augAssignPtr(p, u'+=', n.value) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_ulong(int((seqlen.value - ctypes_wrapped.c_int(int(1L)).value))).value)).value: values.memcpy.value(ctypes.cast(p, ctypes_wrapped.c_void_p), ctypes.cast(sep, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(seplen.value)) helpers.augAssignPtr(p, u'+=', seplen.value) del n while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del sz del seq del sep del i del res del self del seplen del seqlen del p del item del orig return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyString_Join(sep, x): sep = ctypes.cast(sep, ctypes.POINTER(g.PyObject)) x = ctypes.cast(x, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(sep, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(sep, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) return (ctypes.cast(intp._storePtr(intp._getPtr(g.string_join(ctypes.cast(sep, ctypes.POINTER(g.PyStringObject)), x), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del x del sep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_find_internal(self, args, dir_a): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) dir_a = ctypes_wrapped.c_int(int(dir_a.value)) subobj = ctypes.POINTER(g.PyObject)() sub = ctypes.POINTER(ctypes_wrapped.c_byte)() sub_len = g.Py_ssize_t() start = g.Py_ssize_t() end = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.stringlib_parse_args_finds(ctypes.cast(intp._make_string('find/rfind/index/rindex'), ctypes.POINTER(ctypes_wrapped.c_byte)), args, ctypes.pointer(subobj), ctypes.pointer(start), ctypes.pointer(end)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(ctypes.cast(subobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(sub_len, ctypes.cast(subobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(subobj, ctypes.pointer(sub), ctypes.pointer(sub_len)))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value if ctypes_wrapped.c_int((dir_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: return g.Py_ssize_t(int(g.stringlib_find_slice(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, sub, sub_len, start, end))).value else: return g.Py_ssize_t(int(g.stringlib_rfind_slice(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, sub, sub_len, start, end))).value del end del sub del self del args del start del subobj del dir_a del sub_len return g.Py_ssize_t().value find__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init find__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_find(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) result = g.Py_ssize_t(int(g.Py_ssize_t(int(g.string_find_internal(self, args, ctypes_wrapped.c_int(int((+ ctypes_wrapped.c_int(int(1L)).value)))))).value)) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(result), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) index__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init index__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_index(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) result = g.Py_ssize_t(int(g.Py_ssize_t(int(g.string_find_internal(self, args, ctypes_wrapped.c_int(int((+ ctypes_wrapped.c_int(int(1L)).value)))))).value)) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('substring not found'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(result), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) rfind__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init rfind__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_rfind(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) result = g.Py_ssize_t(int(g.Py_ssize_t(int(g.string_find_internal(self, args, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value)))))).value)) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(result), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) rindex__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init rindex__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_rindex(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) result = g.Py_ssize_t(int(g.Py_ssize_t(int(g.string_find_internal(self, args, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value)))))).value)) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('substring not found'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(result), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_xstrip(self, striptype, sepobj): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) striptype = ctypes_wrapped.c_int(int(striptype.value)) sepobj = ctypes.cast(sepobj, ctypes.POINTER(g.PyObject)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) sep = ctypes.cast(ctypes.cast(sepobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) seplen = g.Py_ssize_t(int(ctypes.cast(sepobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((striptype.value != ctypes_wrapped.c_int(int(1L)).value)).value: while ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < len_a.value)).value and (ctypes.cast(values.memchr.value(ctypes.cast(sep, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value), ctypes_wrapped.c_ulong(seplen.value)), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(i) helpers.assign(j, len_a.value) if ctypes_wrapped.c_int((striptype.value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: helpers.postfixDec(j) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value >= i.value)).value and (ctypes.cast(values.memchr.value(ctypes.cast(sep, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', j.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value), ctypes_wrapped.c_ulong(seplen.value)), ctypes_wrapped.c_void_p).value or 0))).value: continue else: break helpers.postfixInc(j) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((j.value == len_a.value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(s, u'+', i.value), ctypes_wrapped.c_long(int((j.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del j del seplen del sep del i del self del striptype del len_a del sepobj del s return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_strip(self, striptype): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) striptype = ctypes_wrapped.c_int(int(striptype.value)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((striptype.value != ctypes_wrapped.c_int(int(1L)).value)).value: while ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < len_a.value)).value and values.isspace.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value: helpers.postfixInc(i) helpers.assign(j, len_a.value) if ctypes_wrapped.c_int((striptype.value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: helpers.postfixDec(j) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value >= i.value)).value and values.isspace.value(ctypes_wrapped.c_int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', j.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value)).value: continue else: break helpers.postfixInc(j) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((j.value == len_a.value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(helpers.ptrArithmetic(s, u'+', i.value), ctypes_wrapped.c_long(int((j.value - i.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del j del i del self del striptype del len_a del s return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_argstrip(self, striptype, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) striptype = ctypes_wrapped.c_int(int(striptype.value)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) sep = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(helpers.ptrArithmetic(g.stripformat, '+', striptype.value).contents, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(sep)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(sep, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(sep, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(sep, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_xstrip(self, striptype, sep), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s arg must be None or str'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.ptrArithmetic(helpers.ptrArithmetic(g.stripformat, '+', striptype.value).contents, u'+', ctypes_wrapped.c_int(int(3L)).value)), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_strip(self, striptype), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del striptype del args del sep return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) strip__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init strip__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_strip(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_strip(self, ctypes_wrapped.c_int(int(2L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_argstrip(self, ctypes_wrapped.c_int(int(2L)), args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) lstrip__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init lstrip__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_lstrip(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_strip(self, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_argstrip(self, ctypes_wrapped.c_int(int(0L)), args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) rstrip__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init rstrip__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_rstrip(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_strip(self, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_argstrip(self, ctypes_wrapped.c_int(int(1L)), args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) lower__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init lower__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_lower(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) s = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) newobj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(s, (ctypes.cast(intp._storePtr(ctypes.cast(newobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(s, ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(n.value)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break c = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)) if values.isupper.value(c).value: helpers.assign(helpers.ptrArithmetic(s, '+', i.value).contents, values.tolower.value(c).value) del c return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del i del self del newobj del s del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) upper__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init upper__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_upper(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) s = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) newobj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(s, (ctypes.cast(intp._storePtr(ctypes.cast(newobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(s, ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(n.value)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break c = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(s, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)) if values.islower.value(c).value: helpers.assign(helpers.ptrArithmetic(s, '+', i.value).contents, values.toupper.value(c).value) del c return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del i del self del newobj del s del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) title__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init title__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_title(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) s_new = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) previous_is_cased = ctypes_wrapped.c_int() newobj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(s_new, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(newobj), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break c = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(s).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)) if values.islower.value(c).value: if ctypes_wrapped.c_int(int((not previous_is_cased.value))).value: helpers.assign(c, values.toupper.value(c).value) helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(1L)).value) elif values.isupper.value(c).value: if previous_is_cased.value: helpers.assign(c, values.tolower.value(c).value) helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(1L)).value) else: helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(helpers.postfixIncPtr(s_new), c.value).contents del c return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del s_new del i del self del n del s del newobj del previous_is_cased return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) capitalize__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init capitalize__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_capitalize(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) s_new = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) newobj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(s_new, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(newobj), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value < n.value)).value: c = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(s).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)) if values.islower.value(c).value: helpers.assign(s_new.contents, values.toupper.value(c).value) else: helpers.assign(s_new.contents, c.value) helpers.postfixIncPtr(s_new) del c if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(1L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break c = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(s).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)) if values.isupper.value(c).value: helpers.assign(s_new.contents, values.tolower.value(c).value) else: helpers.assign(s_new.contents, c.value) helpers.postfixIncPtr(s_new) del c return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del s_new del i del self del newobj del s del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) count__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init count__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_count(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) sub_obj = ctypes.POINTER(g.PyObject)() str_a = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) sub = ctypes.POINTER(ctypes_wrapped.c_byte)() sub_len = g.Py_ssize_t() start = g.Py_ssize_t() end = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.stringlib_parse_args_finds(ctypes.cast(intp._make_string('count'), ctypes.POINTER(ctypes_wrapped.c_byte)), args, ctypes.pointer(sub_obj), ctypes.pointer(start), ctypes.pointer(end)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(sub_obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(ctypes.cast(sub_obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(sub_len, ctypes.cast(sub_obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(sub_obj, ctypes.pointer(sub), ctypes.pointer(sub_len)))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((end.value > ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assign(end, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(end, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(end, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(start, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(start, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(g.Py_ssize_t(int(g.stringlib_count(helpers.ptrArithmetic(str_a, u'+', start.value), ctypes_wrapped.c_long(int((end.value - start.value))), sub, sub_len, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)))))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del sub_obj del str_a del sub del self del args del start del end del sub_len return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) swapcase__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init swapcase__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_swapcase(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) s = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) s_new = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) newobj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(newobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(s_new, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(newobj), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break c = ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(s).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)) if values.islower.value(c).value: helpers.assign(s_new.contents, values.toupper.value(c).value) elif values.isupper.value(c).value: helpers.assign(s_new.contents, values.tolower.value(c).value) else: helpers.assign(s_new.contents, c.value) helpers.postfixIncPtr(s_new) del c return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del s_new del i del self del newobj del s del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) translate__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init translate__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_translate(self, args): first_iteration_d = None first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) input_a = ctypes.POINTER(ctypes_wrapped.c_byte)() output = ctypes.POINTER(ctypes_wrapped.c_byte)() table = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() c = g.Py_ssize_t() changed = g.Py_ssize_t() input_obj = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) output_start = ctypes.POINTER(ctypes_wrapped.c_byte)() del_table = ctypes.POINTER(ctypes_wrapped.c_byte)() inlen = g.Py_ssize_t() tablen = g.Py_ssize_t() dellen = g.Py_ssize_t() result = ctypes.POINTER(g.PyObject)() trans_table = (ctypes_wrapped.c_int * 256L)() tableobj = ctypes.POINTER(g.PyObject)() delobj = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('translate'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(tableobj), ctypes.pointer(delobj)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(tableobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(table, (ctypes.cast(intp._storePtr(ctypes.cast(tableobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(tablen, ctypes.cast(tableobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(((ctypes.cast(tableobj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(table, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(tablen, ctypes_wrapped.c_int(int(256L)).value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(tableobj, ctypes.pointer(table), ctypes.pointer(tablen)))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((tablen.value != ctypes_wrapped.c_int(int(256L)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('translation table must be 256 characters long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(delobj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(delobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(del_table, (ctypes.cast(intp._storePtr(ctypes.cast(delobj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(dellen, ctypes.cast(delobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(delobj, ctypes.pointer(del_table), ctypes.pointer(dellen)))).value: return ctypes_wrapped.c_int(int(0L)).value else: helpers.assignPtr(del_table, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(dellen, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(inlen, ctypes.cast(input_obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), inlen), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(output_start, (ctypes.cast(intp._storePtr(helpers.assignPtr(output, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(result), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(input_a, (ctypes.cast(intp._storePtr(ctypes.cast(input_obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((dellen.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(table, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: if True: first_iteration = True helpers.assign(i, inlen.value) while True: if first_iteration: first_iteration = False if ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.assign(c, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(input_a).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.assignPtr(helpers.postfixIncPtr(output), helpers.ptrArithmetic(table, '+', c.value).contents.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value != c.value)).value: helpers.assign(changed, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((changed.value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(input_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.postfixInc(ctypes.cast(input_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(input_obj), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(table, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(256L)).value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(trans_table, '+', i.value).contents, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_ulong(int((i.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) elif True: first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_b: first_iteration_b = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(256L)).value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(trans_table, '+', i.value).contents, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(table, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) if True: first_iteration_c = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_c: first_iteration_c = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < dellen.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(trans_table, '+', ctypes_wrapped.c_int(int(ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.ptrArithmetic(del_table, '+', i.value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value)).value).contents, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if True: first_iteration_d = True helpers.assign(i, inlen.value) while True: if first_iteration_d: first_iteration_d = False if ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.assign(c, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(input_a).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) if ctypes_wrapped.c_int((helpers.ptrArithmetic(trans_table, '+', c.value).contents.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.assignPtr(helpers.postfixIncPtr(output), ctypes_wrapped.c_byte(int(helpers.ptrArithmetic(trans_table, '+', c.value).contents.value)).value).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value == c.value)).value: continue helpers.assign(changed, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((g.Py_ssize_t(int((not changed.value))).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(input_obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.postfixInc(ctypes.cast(input_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(input_obj), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((inlen.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(result), ctypes_wrapped.c_long((((ctypes.cast(output, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(output_start, ctypes_wrapped.c_void_p).value or 0)) / 1))))).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del trans_table del c del changed del input_a del i del self del args del tableobj del output_start del del_table del dellen del result del table del delobj del output del input_obj del tablen del inlen return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def return_self(self): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) del self return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def countchar(target, target_len, c, maxcount): target = ctypes.cast(target, ctypes.POINTER(ctypes_wrapped.c_byte)) target_len = ctypes_wrapped.c_int(int(target_len.value)) c = ctypes_wrapped.c_byte(int(c.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) count = g.Py_ssize_t() start = ctypes.cast(target, ctypes.POINTER(ctypes_wrapped.c_byte)) end = ctypes.cast(helpers.ptrArithmetic(target, u'+', target_len.value), ctypes.POINTER(ctypes_wrapped.c_byte)) while ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(start, (ctypes.cast(intp._storePtr(ctypes.cast(values.memchr.value(ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(c.value), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(count) if ctypes_wrapped.c_int((count.value >= maxcount.value)).value: break helpers.augAssignPtr(start, u'+=', ctypes_wrapped.c_int(int(1L)).value) return count.value del count del c del end del target del target_len del start del maxcount return g.Py_ssize_t().value @staticmethod def replace_interleave(self, to_s, to_len, maxcount): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) to_s = ctypes.cast(to_s, ctypes.POINTER(ctypes_wrapped.c_byte)) to_len = g.Py_ssize_t(int(to_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() result_len = g.Py_ssize_t() count = g.Py_ssize_t() i = g.Py_ssize_t() product = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(count, ctypes_wrapped.c_ulong(int((self_len.value + ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int((maxcount.value < count.value)).value: helpers.assign(count, maxcount.value) helpers.assign(product, ctypes_wrapped.c_long(int((count.value * to_len.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((product.value / to_len.value))).value != count.value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('replace string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(result_len, ctypes_wrapped.c_long(int((product.value + self_len.value))).value) if ctypes_wrapped.c_int((result_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('replace string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not (ctypes.cast(helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), result_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(to_len.value)) helpers.augAssignPtr(result_s, u'+=', to_len.value) helpers.augAssign(count, u'-=', ctypes_wrapped.c_int(int(1L)).value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < count.value)).value: pass else: break helpers.assignPtr(helpers.postfixIncPtr(result_s), helpers.postfixIncPtr(self_s).contents.value).contents values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(to_len.value)) helpers.augAssignPtr(result_s, u'+=', to_len.value) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(self_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long(int((self_len.value - i.value))).value)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del count del product del to_s del i del result_s del self_s del self_len del to_len del maxcount del result_len del self del result return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace_delete_single_character(self, from_c, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_c = ctypes_wrapped.c_byte(int(from_c.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() start = ctypes.POINTER(ctypes_wrapped.c_byte)() next_a = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() result_len = g.Py_ssize_t() count = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(count, g.Py_ssize_t(int(g.countchar(self_s, ctypes_wrapped.c_int(int(self_len.value)), from_c, maxcount))).value) if ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(result_len, ctypes_wrapped.c_long(int((self_len.value - count.value))).value) values.assert_a.value(ctypes_wrapped.c_int((result_len.value >= ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), result_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(self_s), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self_s, u'+', self_len.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.postfixDec(count).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(ctypes.cast(values.memchr.value(ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(from_c.value), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: break values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) helpers.augAssignPtr(result_s, u'+=', ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(next_a, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del count del end del result_s del self del next_a del start del self_len del result del maxcount del from_c del result_len del self_s return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace_delete_substring(self, from_s, from_len, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_s = ctypes.cast(from_s, ctypes.POINTER(ctypes_wrapped.c_byte)) from_len = g.Py_ssize_t(int(from_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() start = ctypes.POINTER(ctypes_wrapped.c_byte)() next_a = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() result_len = g.Py_ssize_t() count = g.Py_ssize_t() offset = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(count, g.Py_ssize_t(int(g.stringlib_count(self_s, self_len, from_s, from_len, maxcount))).value) if ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(result_len, ctypes_wrapped.c_long(int((self_len.value - ctypes_wrapped.c_long(int((count.value * from_len.value))).value))).value) values.assert_a.value(ctypes_wrapped.c_int((result_len.value >= ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), result_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(self_s), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self_s, u'+', self_len.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.postfixDec(count).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(offset, g.Py_ssize_t(int(g.stringlib_find(start, ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)), from_s, from_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))))).value) if ctypes_wrapped.c_int((offset.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: break helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(start, u'+', offset.value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) helpers.augAssignPtr(result_s, u'+=', ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(next_a, u'+', from_len.value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del count del from_len del result_len del from_s del result_s del self del offset del next_a del start del self_len del result del maxcount del end del self_s return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace_single_character_in_place(self, from_c, to_c, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_c = ctypes_wrapped.c_byte(int(from_c.value)) to_c = ctypes_wrapped.c_byte(int(to_c.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() start = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() next_a = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(ctypes.cast(values.memchr.value(ctypes.cast(self_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(from_c.value), ctypes_wrapped.c_ulong(self_len.value)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), self_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(self_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(self_len.value)) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(result_s, u'+', ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(self_s, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(start.contents, to_c.value) helpers.postfixIncPtr(start) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(result_s, u'+', self_len.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.prefixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(ctypes.cast(values.memchr.value(ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(from_c.value), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: break helpers.assign(next_a.contents, to_c.value) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(next_a, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del end del result_s del self del next_a del start del self_len del to_c del maxcount del from_c del self_s del result return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace_substring_in_place(self, from_s, from_len, to_s, to_len, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_s = ctypes.cast(from_s, ctypes.POINTER(ctypes_wrapped.c_byte)) from_len = g.Py_ssize_t(int(from_len.value)) to_s = ctypes.cast(to_s, ctypes.POINTER(ctypes_wrapped.c_byte)) to_len = g.Py_ssize_t(int(to_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() start = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() offset = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(offset, g.Py_ssize_t(int(g.stringlib_find(self_s, self_len, from_s, from_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))))).value) if ctypes_wrapped.c_int((offset.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), self_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(self_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(self_len.value)) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(result_s, u'+', offset.value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(from_len.value)) helpers.augAssignPtr(start, u'+=', from_len.value) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(result_s, u'+', self_len.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.prefixDec(maxcount).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(offset, g.Py_ssize_t(int(g.stringlib_find(start, ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)), from_s, from_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))))).value) if ctypes_wrapped.c_int((offset.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: break values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(start, u'+', offset.value), ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(from_len.value)) helpers.augAssignPtr(start, u'+=', ctypes_wrapped.c_long(int((offset.value + from_len.value))).value) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del from_len del to_s del from_s del result_s del self del offset del start del self_len del to_len del maxcount del end del self_s del result return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace_single_character(self, from_c, to_s, to_len, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_c = ctypes_wrapped.c_byte(int(from_c.value)) to_s = ctypes.cast(to_s, ctypes.POINTER(ctypes_wrapped.c_byte)) to_len = g.Py_ssize_t(int(to_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() start = ctypes.POINTER(ctypes_wrapped.c_byte)() next_a = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() result_len = g.Py_ssize_t() count = g.Py_ssize_t() product = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(count, g.Py_ssize_t(int(g.countchar(self_s, ctypes_wrapped.c_int(int(self_len.value)), from_c, maxcount))).value) if ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(product, ctypes_wrapped.c_ulong(int((count.value * ctypes_wrapped.c_ulong(int((to_len.value - ctypes_wrapped.c_int(int(1L)).value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((product.value / ctypes_wrapped.c_ulong(int((to_len.value - ctypes_wrapped.c_int(int(1L)).value))).value))).value != count.value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('replace string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(result_len, ctypes_wrapped.c_long(int((self_len.value + product.value))).value) if ctypes_wrapped.c_int((result_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('replace string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), result_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(self_s), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self_s, u'+', self_len.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.postfixDec(count).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(ctypes.cast(values.memchr.value(ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(from_c.value), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: break if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0))).value: values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(to_len.value)) helpers.augAssignPtr(result_s, u'+=', to_len.value) helpers.augAssignPtr(start, u'+=', ctypes_wrapped.c_int(int(1L)).value) else: values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) helpers.augAssignPtr(result_s, u'+=', ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(to_len.value)) helpers.augAssignPtr(result_s, u'+=', to_len.value) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(next_a, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del count del product del end del to_s del result_s del self del next_a del start del self_len del to_len del maxcount del from_c del result_len del self_s del result return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace_substring(self, from_s, from_len, to_s, to_len, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_s = ctypes.cast(from_s, ctypes.POINTER(ctypes_wrapped.c_byte)) from_len = g.Py_ssize_t(int(from_len.value)) to_s = ctypes.cast(to_s, ctypes.POINTER(ctypes_wrapped.c_byte)) to_len = g.Py_ssize_t(int(to_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) self_s = ctypes.POINTER(ctypes_wrapped.c_byte)() result_s = ctypes.POINTER(ctypes_wrapped.c_byte)() start = ctypes.POINTER(ctypes_wrapped.c_byte)() next_a = ctypes.POINTER(ctypes_wrapped.c_byte)() end = ctypes.POINTER(ctypes_wrapped.c_byte)() self_len = g.Py_ssize_t() result_len = g.Py_ssize_t() count = g.Py_ssize_t() offset = g.Py_ssize_t() product = g.Py_ssize_t() result = ctypes.POINTER(g.PyStringObject)() helpers.assignPtr(self_s, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(self_len, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(count, g.Py_ssize_t(int(g.stringlib_count(self_s, self_len, from_s, from_len, maxcount))).value) if ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(product, ctypes_wrapped.c_long(int((count.value * ctypes_wrapped.c_long(int((to_len.value - from_len.value))).value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((product.value / ctypes_wrapped.c_long(int((to_len.value - from_len.value))).value))).value != count.value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('replace string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(result_len, ctypes_wrapped.c_long(int((self_len.value + product.value))).value) if ctypes_wrapped.c_int((result_len.value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('replace string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), result_len), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result_s, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(self_s), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self_s, u'+', self_len.value)), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.postfixDec(count).value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(offset, g.Py_ssize_t(int(g.stringlib_find(start, ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)), from_s, from_len, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))))).value) if ctypes_wrapped.c_int((offset.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: break helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(start, u'+', offset.value)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0))).value: values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(to_len.value)) helpers.augAssignPtr(result_s, u'+=', to_len.value) helpers.augAssignPtr(start, u'+=', from_len.value) else: values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) helpers.augAssignPtr(result_s, u'+=', ctypes_wrapped.c_long((((ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(to_s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(to_len.value)) helpers.augAssignPtr(result_s, u'+=', to_len.value) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(next_a, u'+', from_len.value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(result_s, ctypes_wrapped.c_void_p), ctypes.cast(start, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del count del product del from_len del to_s del from_s del result_s del self del offset del next_a del start del self_len del to_len del maxcount del end del result_len del self_s del result return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def replace(self, from_s, from_len, to_s, to_len, maxcount): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) from_s = ctypes.cast(from_s, ctypes.POINTER(ctypes_wrapped.c_byte)) from_len = g.Py_ssize_t(int(from_len.value)) to_s = ctypes.cast(to_s, ctypes.POINTER(ctypes_wrapped.c_byte)) to_len = g.Py_ssize_t(int(to_len.value)) maxcount = g.Py_ssize_t(int(maxcount.value)) if ctypes_wrapped.c_int((maxcount.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(maxcount, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((maxcount.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((maxcount.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((from_len.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((to_len.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((from_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_interleave(self, to_s, to_len, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.return_self(self), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((to_len.value == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((from_len.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_delete_single_character(self, helpers.ptrArithmetic(from_s, '+', ctypes_wrapped.c_int(int(0L)).value).contents, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_delete_substring(self, from_s, from_len, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((from_len.value == to_len.value)).value: if ctypes_wrapped.c_int((from_len.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_single_character_in_place(self, helpers.ptrArithmetic(from_s, '+', ctypes_wrapped.c_int(int(0L)).value).contents, helpers.ptrArithmetic(to_s, '+', ctypes_wrapped.c_int(int(0L)).value).contents, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_substring_in_place(self, from_s, from_len, to_s, to_len, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((from_len.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_single_character(self, helpers.ptrArithmetic(from_s, '+', ctypes_wrapped.c_int(int(0L)).value).contents, to_s, to_len, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.replace_substring(self, from_s, from_len, to_s, to_len, maxcount), ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0) del from_len del to_s del from_s del self del to_len del maxcount return (ctypes.cast(ctypes.POINTER(g.PyStringObject)(), ctypes_wrapped.c_void_p).value or 0) replace__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init replace__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_replace(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) count = g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) from_a = ctypes.POINTER(g.PyObject)() to = ctypes.POINTER(g.PyObject)() from_s = ctypes.POINTER(ctypes_wrapped.c_byte)() to_s = ctypes.POINTER(ctypes_wrapped.c_byte)() from_len = g.Py_ssize_t() to_len = g.Py_ssize_t() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('OO|n:replace'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(from_a), ctypes.pointer(to), ctypes.pointer(count)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(from_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(from_s, (ctypes.cast(intp._storePtr(ctypes.cast(from_a, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(from_len, ctypes.cast(from_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(from_a, ctypes.pointer(from_s), ctypes.pointer(from_len)))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(to, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(to_s, (ctypes.cast(intp._storePtr(ctypes.cast(to, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(to_len, ctypes.cast(to, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(to, ctypes.pointer(to_s), ctypes.pointer(to_len)))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.replace(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)), from_s, from_len, to_s, to_len, count), ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del count del from_len del to_s del from_s del self del args del to del to_len del from_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _string_tailmatch(self, substr, start, end, direction): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) substr = ctypes.cast(substr, ctypes.POINTER(g.PyObject)) start = g.Py_ssize_t(int(start.value)) end = g.Py_ssize_t(int(end.value)) direction = ctypes_wrapped.c_int(int(direction.value)) len_a = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) slen = g.Py_ssize_t() sub = ctypes.POINTER(ctypes_wrapped.c_byte)() str_a = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(substr, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(sub, (ctypes.cast(intp._storePtr(ctypes.cast(substr, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(slen, ctypes.cast(substr, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) elif ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(substr, ctypes.pointer(sub), ctypes.pointer(slen)))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(str_a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((end.value > len_a.value)).value: helpers.assign(end, len_a.value) elif ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(end, u'+=', len_a.value) if ctypes_wrapped.c_int((end.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(end, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(start, u'+=', len_a.value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(start, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((direction.value < ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((start.value + slen.value))).value > len_a.value)).value: return ctypes_wrapped.c_int(int(0L)).value else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((end.value - start.value))).value < slen.value)).value or ctypes_wrapped.c_int((start.value > len_a.value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((end.value - slen.value))).value > start.value)).value: helpers.assign(start, ctypes_wrapped.c_long(int((end.value - slen.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((end.value - start.value))).value >= slen.value)).value: return ctypes_wrapped.c_int((not values.memcmp.value(ctypes.cast(helpers.ptrArithmetic(str_a, u'+', start.value), ctypes_wrapped.c_void_p), ctypes.cast(sub, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(slen.value)).value)).value return ctypes_wrapped.c_int(int(0L)).value del direction del end del sub del start del self del len_a del str_a del substr del slen return ctypes_wrapped.c_int().value startswith__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init startswith__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_startswith(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) start = g.Py_ssize_t() end = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) subobj = ctypes.POINTER(g.PyObject)() result = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.stringlib_parse_args_finds(ctypes.cast(intp._make_string('startswith'), ctypes.POINTER(ctypes_wrapped.c_byte)), args, ctypes.pointer(subobj), ctypes.pointer(start), ctypes.pointer(end)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(subobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break helpers.assign(result, ctypes_wrapped.c_int(int(g._string_tailmatch(self, helpers.ptrArithmetic(ctypes.cast(subobj, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, start, end, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value)))))).value) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value elif result.value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) del i helpers.assign(result, ctypes_wrapped.c_int(int(g._string_tailmatch(self, subobj, start, end, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value)))))).value) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('startswith first arg must be str, unicode, or tuple, not %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(result.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del end del self del args del start del subobj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) endswith__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init endswith__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_endswith(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) start = g.Py_ssize_t() end = g.Py_ssize_t(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)) subobj = ctypes.POINTER(g.PyObject)() result = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.stringlib_parse_args_finds(ctypes.cast(intp._make_string('endswith'), ctypes.POINTER(ctypes_wrapped.c_byte)), args, ctypes.pointer(subobj), ctypes.pointer(start), ctypes.pointer(end)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(subobj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break helpers.assign(result, ctypes_wrapped.c_int(int(g._string_tailmatch(self, helpers.ptrArithmetic(ctypes.cast(subobj, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, start, end, ctypes_wrapped.c_int(int((+ ctypes_wrapped.c_int(int(1L)).value)))))).value) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value elif result.value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)))[1]), ctypes_wrapped.c_void_p).value or 0) del i helpers.assign(result, ctypes_wrapped.c_int(int(g._string_tailmatch(self, subobj, start, end, ctypes_wrapped.c_int(int((+ ctypes_wrapped.c_int(int(1L)).value)))))).value) if ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('endswith first arg must be str, unicode, or tuple, not %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(subobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(result.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del end del self del args del start del subobj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) encode__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init encode__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_encode(self, args, kwargs): goto = None while True: if (goto is None): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 3)(ctypes.cast(intp._make_string('encoding'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('errors'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) encoding = ctypes.POINTER(ctypes_wrapped.c_byte)() errors = ctypes.POINTER(ctypes_wrapped.c_byte)() v = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwargs, ctypes.cast(intp._make_string('|ss:encode'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(encoding), ctypes.pointer(errors)))).value))).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsEncodedObject(ctypes.cast(self, ctypes.POINTER(g.PyObject)), encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue goto = u'onError' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(0L)).value))).value)).value): goto = 3 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('encoder did not return a string/unicode object (type=%.400s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 9 continue continue goto = 8 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 3): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del errors del encoding del self del args del v del kwargs del kwlist return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break decode__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init decode__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_decode(self, args, kwargs): goto = None while True: if (goto is None): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 3)(ctypes.cast(intp._make_string('encoding'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('errors'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) encoding = ctypes.POINTER(ctypes_wrapped.c_byte)() errors = ctypes.POINTER(ctypes_wrapped.c_byte)() v = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwargs, ctypes.cast(intp._make_string('|ss:decode'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(encoding), ctypes.pointer(errors)))).value))).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsDecodedObject(ctypes.cast(self, ctypes.POINTER(g.PyObject)), encoding, errors), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue goto = u'onError' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(0L)).value))).value)).value): goto = 3 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('decoder did not return a string/unicode object (type=%.400s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 9 continue continue goto = 8 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 3): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == u'onError'): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del errors del encoding del self del args del v del kwargs del kwlist return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break expandtabs__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init expandtabs__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_expandtabs(self, args): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) e = ctypes.POINTER(ctypes_wrapped.c_byte)() p = ctypes.POINTER(ctypes_wrapped.c_byte)() qe = ctypes.POINTER(ctypes_wrapped.c_byte)() q = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() j = g.Py_ssize_t() incr = g.Py_ssize_t() u = ctypes.POINTER(g.PyObject)() tabsize = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(8L)).value)) if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|i:expandtabs'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(tabsize)))).value))).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 2 continue first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue if (not first_iteration): goto = 6 continue first_iteration = False goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.postfixIncPtr(p) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(9).value)).value): goto = 10 continue if (not ctypes_wrapped.c_int((tabsize.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue helpers.assign(incr, ctypes_wrapped.c_long(int((tabsize.value - ctypes_wrapped.c_long(int((j.value % tabsize.value))).value))).value) if (not ctypes_wrapped.c_int((j.value > ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - incr.value))).value)).value): goto = 12 continue goto = u'overflow1' continue if (goto == 12): goto = None if (goto is None): helpers.augAssign(j, u'+=', incr.value) if (goto == 11): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 13 continue goto = u'overflow1' continue if (goto == 13): goto = None if (goto is None): helpers.postfixInc(j) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(10).value)).value or ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(13).value)).value)).value): goto = 14 continue if (not ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - j.value))).value)).value): goto = 15 continue goto = u'overflow1' continue if (goto == 15): goto = None if (goto is None): helpers.augAssign(i, u'+=', j.value) helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 14): goto = None if (goto == 9): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - j.value))).value)).value): goto = 16 continue goto = u'overflow1' continue if (goto == 16): goto = None if (goto is None): helpers.assignPtr(u, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int((i.value + j.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0))).value): goto = 17 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 17): goto = None if (goto is None): helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(q, (ctypes.cast(intp._storePtr(ctypes.cast(u, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(qe, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(u, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', ctypes.cast(u, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 18 continue first_iteration_a = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not first_iteration_a): goto = 22 continue first_iteration_a = False goto = 21 continue if (goto == 22): goto = None if (goto is None): helpers.postfixIncPtr(p) if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value): goto = 24 continue pass goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(9).value)).value): goto = 26 continue if (not ctypes_wrapped.c_int((tabsize.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue helpers.assign(i, ctypes_wrapped.c_long(int((tabsize.value - ctypes_wrapped.c_long(int((j.value % tabsize.value))).value))).value) helpers.augAssign(j, u'+=', i.value) if (goto == 28): goto = None if (goto is None): if (not helpers.postfixDec(i).value): goto = 29 continue if (not ctypes_wrapped.c_int(((ctypes.cast(q, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(qe, ctypes_wrapped.c_void_p).value or 0))).value): goto = 30 continue goto = u'overflow2' continue if (goto == 30): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(q), ctypes.c_byte(32).value).contents goto = 28 continue if (goto == 29): goto = None if (goto == 27): goto = None if (goto is None): goto = 25 continue if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(q, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(qe, ctypes_wrapped.c_void_p).value or 0))).value): goto = 31 continue goto = u'overflow2' continue if (goto == 31): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(q), p.contents.value).contents helpers.postfixInc(j) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(10).value)).value or ctypes_wrapped.c_int((p.contents.value == ctypes.c_byte(13).value)).value)).value): goto = 32 continue helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 32): goto = None if (goto == 25): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto == 18): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0) if (goto == u'overflow2'): goto = None if (goto == 33): goto = None if (goto is None): if (not True): goto = 34 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(u, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 36 continue pass goto = 35 continue if (goto == 36): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 35): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 38 continue continue goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = 34 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto == u'overflow1'): goto = None if (goto is None): g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('new string is too long'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del incr del j del e del i del self del args del q del p del qe del tabsize del u return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def pad(self, left, right, fill_a): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) left = g.Py_ssize_t(int(left.value)) right = g.Py_ssize_t(int(right.value)) fill_a = ctypes_wrapped.c_byte(int(fill_a.value)) u = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((left.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(left, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((right.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(right, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((left.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((right.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(u, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((left.value + ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value + right.value)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(u, ctypes_wrapped.c_void_p).value or 0): if left.value: values.memset.value(ctypes.cast(ctypes.cast(u, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(fill_a.value), ctypes_wrapped.c_ulong(left.value)) values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(u, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', left.value), ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if right.value: values.memset.value(ctypes.cast(helpers.ptrArithmetic(helpers.ptrArithmetic(ctypes.cast(u, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', left.value), u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value), ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(fill_a.value), ctypes_wrapped.c_ulong(right.value)) return (ctypes.cast(intp._storePtr(u), ctypes_wrapped.c_void_p).value or 0) del self del right del u del fill_a del left return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) ljust__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init ljust__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_ljust(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) width = g.Py_ssize_t() fillchar = ctypes_wrapped.c_byte(int(ctypes.c_byte(32).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('n|c:ljust'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(width), ctypes.pointer(fillchar)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value >= width.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.pad(self, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_long(int((width.value - ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))), fillchar), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del width del self del args del fillchar return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) rjust__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init rjust__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_rjust(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) width = g.Py_ssize_t() fillchar = ctypes_wrapped.c_byte(int(ctypes.c_byte(32).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('n|c:rjust'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(width), ctypes.pointer(fillchar)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value >= width.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.pad(self, ctypes_wrapped.c_long(int((width.value - ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), fillchar), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del width del self del args del fillchar return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) center__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init center__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_center(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) marg = g.Py_ssize_t() left = g.Py_ssize_t() width = g.Py_ssize_t() fillchar = ctypes_wrapped.c_byte(int(ctypes.c_byte(32).value)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('n|c:center'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(width), ctypes.pointer(fillchar)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value >= width.value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(marg, ctypes_wrapped.c_long(int((width.value - ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) helpers.assign(left, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((marg.value / ctypes_wrapped.c_int(int(2L)).value))).value + ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((marg.value & width.value))).value & ctypes_wrapped.c_int(int(1L)).value))).value))).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.pad(self, left, ctypes_wrapped.c_long(int((marg.value - left.value))), fillchar), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del marg del self del args del width del fillchar del left return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) zfill__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init zfill__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_zfill(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) fill_a = g.Py_ssize_t() s = ctypes.POINTER(g.PyObject)() p = ctypes.POINTER(ctypes_wrapped.c_byte)() width = g.Py_ssize_t() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('n:zfill'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(width)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value >= width.value)).value: if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(fill_a, ctypes_wrapped.c_long(int((width.value - ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.pad(self, fill_a, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.c_byte(48)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(s, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', fill_a.value).contents.value == ctypes.c_byte(43).value)).value or ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', fill_a.value).contents.value == ctypes.c_byte(45).value)).value)).value: helpers.assign(helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents, helpers.ptrArithmetic(p, '+', fill_a.value).contents.value) helpers.assign(helpers.ptrArithmetic(p, '+', fill_a.value).contents, ctypes.c_byte(48).value) return (ctypes.cast(intp._storePtr(ctypes.cast(s, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del args del fill_a del width del s return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) isspace__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init isspace__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_isspace(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value and values.isspace.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break if ctypes_wrapped.c_int((not values.isspace.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del e return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) isalpha__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init isalpha__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_isalpha(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value and values.isalpha.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break if ctypes_wrapped.c_int((not values.isalpha.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del e return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) isalnum__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init isalnum__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_isalnum(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value and values.isalnum.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break if ctypes_wrapped.c_int((not values.isalnum.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del e return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) isdigit__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init isdigit__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_isdigit(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value and values.isdigit.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break if ctypes_wrapped.c_int((not values.isdigit.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del e return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) islower__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init islower__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_islower(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() cased = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int((values.islower.value(ctypes_wrapped.c_int(p.contents.value)).value != ctypes_wrapped.c_int(int(0L)).value)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(cased, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break if values.isupper.value(ctypes_wrapped.c_int(p.contents.value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not cased.value))).value and values.islower.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: helpers.assign(cased, ctypes_wrapped.c_int(int(1L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(cased.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del e del cased return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) isupper__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init isupper__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_isupper(self): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() cased = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int((values.isupper.value(ctypes_wrapped.c_int(p.contents.value)).value != ctypes_wrapped.c_int(int(0L)).value)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(cased, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break if values.islower.value(ctypes_wrapped.c_int(p.contents.value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not cased.value))).value and values.isupper.value(ctypes_wrapped.c_int(p.contents.value)).value)).value: helpers.assign(cased, ctypes_wrapped.c_int(int(1L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(cased.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p del self del e del cased return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) istitle__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init istitle__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_istitle(self, uncased): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) uncased = ctypes.cast(uncased, ctypes.POINTER(g.PyObject)) p = ctypes.cast(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_ubyte)), ctypes.POINTER(ctypes_wrapped.c_ubyte)) e = ctypes.POINTER(ctypes_wrapped.c_ubyte)() cased = ctypes_wrapped.c_int() previous_is_cased = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int((values.isupper.value(ctypes_wrapped.c_int(p.contents.value)).value != ctypes_wrapped.c_int(int(0L)).value)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(e, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(p, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(cased, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(e, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break ch = ctypes_wrapped.c_ubyte(int(p.contents.value)) if values.isupper.value(ctypes_wrapped.c_int(ch.value)).value: if previous_is_cased.value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(cased, ctypes_wrapped.c_int(int(1L)).value) elif values.islower.value(ctypes_wrapped.c_int(ch.value)).value: if ctypes_wrapped.c_int(int((not previous_is_cased.value))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(cased, ctypes_wrapped.c_int(int(1L)).value) else: helpers.assign(previous_is_cased, ctypes_wrapped.c_int(int(0L)).value) del ch return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(cased.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del e del self del uncased del cased del p del previous_is_cased return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) splitlines__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init splitlines__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_splitlines(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) keepends = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|i:splitlines'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(keepends)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.stringlib_splitlines(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, keepends), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del keepends return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) sizeof__doc__str = (ctypes_wrapped.c_byte * 1)() # TODO init sizeof__doc__str with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string_sizeof(v): v = ctypes.cast(v, ctypes.POINTER(g.PyStringObject)) res = g.Py_ssize_t() helpers.assign(res, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + ctypes_wrapped.c_long(int((ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value * ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_itemsize.value))).value))).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(res), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_getnewargs(v): v = ctypes.cast(v, ctypes.POINTER(g.PyStringObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(s#)'), ctypes.POINTER(ctypes_wrapped.c_byte)), v.contents.ob_sval, ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) SubString = structs._anonymous_SubString AutoNumberState = ctypes_wrapped.c_uint32 AutoNumber = structs._anonymous_AutoNumber @staticmethod def AutoNumber_Init(auto_number): auto_number = ctypes.cast(auto_number, ctypes.POINTER(g.AutoNumber)) helpers.assign(auto_number.contents.an_state, ctypes_wrapped.c_uint(0).value) helpers.assign(auto_number.contents.an_field_number, ctypes_wrapped.c_int(int(0L)).value) del auto_number return @staticmethod def SubString_init(str_a, p, len_a): str_a = ctypes.cast(str_a, ctypes.POINTER(g.SubString)) p = ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) helpers.assignPtr(str_a.contents.ptr, (ctypes.cast(intp._storePtr(p), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(str_a.contents.end, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(str_a.contents.end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(str_a.contents.ptr, u'+', len_a.value)), ctypes_wrapped.c_void_p).value or 0)) del p del len_a del str_a return @staticmethod def SubString_new_object(str_a): str_a = ctypes.cast(str_a, ctypes.POINTER(g.SubString)) if ctypes_wrapped.c_int(((ctypes.cast(str_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(str_a.contents.ptr, ctypes_wrapped.c_long((((ctypes.cast(str_a.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(str_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del str_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def SubString_new_object_or_empty(str_a): str_a = ctypes.cast(str_a, ctypes.POINTER(g.SubString)) if ctypes_wrapped.c_int(((ctypes.cast(str_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(str_a.contents.ptr, ctypes_wrapped.c_long((((ctypes.cast(str_a.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(str_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del str_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def autonumber_state_error(state_a, field_name_is_empty): state_a = g.AutoNumberState(state_a.value) field_name_is_empty = ctypes_wrapped.c_int(int(field_name_is_empty.value)) if ctypes_wrapped.c_int((state_a.value == ctypes_wrapped.c_uint(2).value)).value: if field_name_is_empty.value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('cannot switch from manual field specification to automatic field numbering'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(1L)).value elif ctypes_wrapped.c_int(int((not field_name_is_empty.value))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('cannot switch from automatic field numbering to manual field specification'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del state_a del field_name_is_empty return ctypes_wrapped.c_int().value OutputString = structs._anonymous_OutputString @staticmethod def output_initialize(output, size): output = ctypes.cast(output, ctypes.POINTER(g.OutputString)) size = g.Py_ssize_t(int(size.value)) helpers.assignPtr(output.contents.obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(output.contents.obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(output.contents.ptr, (ctypes.cast(intp._storePtr(ctypes.cast(output.contents.obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(output.contents.end, (ctypes.cast(intp._storePtr(intp._getPtr((ctypes.cast(output.contents.obj, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + (ctypes.cast(output.contents.ptr, ctypes_wrapped.c_void_p).value or 0)), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(output.contents.size_increment, ctypes_wrapped.c_int(int(100L)).value) return ctypes_wrapped.c_int(int(1L)).value del output del size return ctypes_wrapped.c_int().value @staticmethod def output_extend(output, count): output = ctypes.cast(output, ctypes.POINTER(g.OutputString)) count = g.Py_ssize_t(int(count.value)) startptr = ctypes.cast(ctypes.cast(output.contents.obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)) curlen = g.Py_ssize_t(int(ctypes_wrapped.c_long((((ctypes.cast(output.contents.ptr, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(startptr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) maxlen = g.Py_ssize_t(int(ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((curlen.value + count.value))).value + output.contents.size_increment.value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(output.contents.obj), maxlen))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(startptr, (ctypes.cast(intp._storePtr(ctypes.cast(output.contents.obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(output.contents.ptr, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(startptr, u'+', curlen.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(output.contents.end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(startptr, u'+', maxlen.value)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((output.contents.size_increment.value < ctypes_wrapped.c_int(int(3200L)).value)).value: helpers.augAssign(output.contents.size_increment, u'*=', ctypes_wrapped.c_int(int(2L)).value) return ctypes_wrapped.c_int(int(1L)).value del count del output del startptr del curlen del maxlen return ctypes_wrapped.c_int().value @staticmethod def output_data(output, s, count): output = ctypes.cast(output, ctypes.POINTER(g.OutputString)) s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) count = g.Py_ssize_t(int(count.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((count.value > ctypes_wrapped.c_long((((ctypes.cast(output.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(output.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.output_extend(output, count))).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.memcpy.value(ctypes.cast(output.contents.ptr, ctypes_wrapped.c_void_p), ctypes.cast(s, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((count.value * ctypes_wrapped.c_size_t(1).value)))) helpers.augAssignPtr(output.contents.ptr, u'+=', count.value) return ctypes_wrapped.c_int(int(1L)).value del count del output del s return ctypes_wrapped.c_int().value @staticmethod def get_integer(str_a): first_iteration = None str_a = ctypes.cast(str_a, ctypes.POINTER(g.SubString)) accumulator = g.Py_ssize_t() digitval = g.Py_ssize_t() p = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int(((ctypes.cast(str_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(str_a.contents.end, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True helpers.assignPtr(p, (ctypes.cast(intp._storePtr(str_a.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(p) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(str_a.contents.end, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.assign(digitval, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_byte(int((p.contents.value - ctypes.c_byte(48).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((p.contents.value >= ctypes.c_byte(48).value)).value and ctypes_wrapped.c_int((p.contents.value <= ctypes.c_byte(57).value)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value))).value) if ctypes_wrapped.c_int((digitval.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((accumulator.value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - digitval.value))).value / ctypes_wrapped.c_int(int(10L)).value))).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('Too many decimal digits in format string'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(accumulator, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((accumulator.value * ctypes_wrapped.c_int(int(10L)).value))).value + digitval.value))).value) return accumulator.value del accumulator del digitval del str_a del p return g.Py_ssize_t().value @staticmethod def getattr(obj, name): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.SubString)) newobj = ctypes.POINTER(g.PyObject)() str_a = ctypes.cast(intp._getPtr(g.SubString_new_object(name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(obj, str_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del str_a del obj del name del newobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def getitem_sequence(obj, idx): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) idx = g.Py_ssize_t(int(idx.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_GetItem(obj, idx), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del obj del idx return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def getitem_idx(obj, idx): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) idx = g.Py_ssize_t(int(idx.value)) newobj = ctypes.POINTER(g.PyObject)() idx_obj = ctypes.cast(intp._getPtr(g.PyLong_FromSsize_t(idx), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(idx_obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(obj, idx_obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(idx_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(idx_obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(idx_obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del idx_obj del obj del idx del newobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def getitem_str(obj, name): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.SubString)) newobj = ctypes.POINTER(g.PyObject)() str_a = ctypes.cast(intp._getPtr(g.SubString_new_object(name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(newobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(obj, str_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(str_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(newobj), ctypes_wrapped.c_void_p).value or 0) del str_a del obj del name del newobj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) FieldNameIterator = structs._anonymous_FieldNameIterator @staticmethod def FieldNameIterator_init(self, ptr, len_a): self = ctypes.cast(self, ctypes.POINTER(g.FieldNameIterator)) ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) g.SubString_init(ctypes.pointer(self.contents.str), ptr, len_a) helpers.assignPtr(self.contents.ptr, (ctypes.cast(intp._storePtr(self.contents.str.ptr), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del self del len_a del ptr return ctypes_wrapped.c_int().value @staticmethod def _FieldNameIterator_attr(self, name): self = ctypes.cast(self, ctypes.POINTER(g.FieldNameIterator)) name = ctypes.cast(name, ctypes.POINTER(g.SubString)) c = ctypes_wrapped.c_byte() helpers.assignPtr(name.contents.ptr, (ctypes.cast(intp._storePtr(self.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(self.contents.ptr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value: if True: _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(self.contents.ptr).contents.value).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(91).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(46).value)): _switchfallthrough = True helpers.postfixDecPtr(self.contents.ptr) break if (not _switchfallthrough): continue break del _switchfallthrough del _switchvalue break helpers.assignPtr(name.contents.end, (ctypes.cast(intp._storePtr(self.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del c del self del name return ctypes_wrapped.c_int().value @staticmethod def _FieldNameIterator_item(self, name): self = ctypes.cast(self, ctypes.POINTER(g.FieldNameIterator)) name = ctypes.cast(name, ctypes.POINTER(g.SubString)) bracket_seen = ctypes_wrapped.c_int() c = ctypes_wrapped.c_byte() helpers.assignPtr(name.contents.ptr, (ctypes.cast(intp._storePtr(self.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(self.contents.ptr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value: if True: _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(self.contents.ptr).contents.value).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(93).value)): _switchfallthrough = True helpers.assign(bracket_seen, ctypes_wrapped.c_int(int(1L)).value) break if (not _switchfallthrough): continue break del _switchfallthrough del _switchvalue break if ctypes_wrapped.c_int(int((not bracket_seen.value))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string("Missing ']' in format string"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(name.contents.end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self.contents.ptr, u'-', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del c del self del name del bracket_seen return ctypes_wrapped.c_int().value @staticmethod def FieldNameIterator_next(self, is_attribute, name_idx, name): self = ctypes.cast(self, ctypes.POINTER(g.FieldNameIterator)) is_attribute = ctypes.cast(is_attribute, ctypes.POINTER(ctypes_wrapped.c_int)) name_idx = ctypes.cast(name_idx, ctypes.POINTER(g.Py_ssize_t)) name = ctypes.cast(name, ctypes.POINTER(g.SubString)) if ctypes_wrapped.c_int(((ctypes.cast(self.contents.ptr, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value if True: _switchvalue = None _switchvalue = helpers.postfixIncPtr(self.contents.ptr).contents.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(46).value)): _switchfallthrough = True helpers.assign(is_attribute.contents, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._FieldNameIterator_attr(self, name))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(name_idx.contents, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(91).value)): _switchfallthrough = True helpers.assign(is_attribute.contents, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._FieldNameIterator_item(self, name))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(name_idx.contents, g.Py_ssize_t(int(g.get_integer(name))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((name_idx.contents.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value break if (not _switchfallthrough): g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string("Only '.' or '[' may follow ']' in format field specifier"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value break del _switchfallthrough del _switchvalue if ctypes_wrapped.c_int(((ctypes.cast(name.contents.ptr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(name.contents.end, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('Empty attribute in format string'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(2L)).value del is_attribute del self del name del name_idx return ctypes_wrapped.c_int().value @staticmethod def field_name_split(ptr, len_a, first, first_idx, rest, auto_number): ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) first = ctypes.cast(first, ctypes.POINTER(g.SubString)) first_idx = ctypes.cast(first_idx, ctypes.POINTER(g.Py_ssize_t)) rest = ctypes.cast(rest, ctypes.POINTER(g.FieldNameIterator)) auto_number = ctypes.cast(auto_number, ctypes.POINTER(g.AutoNumber)) c = ctypes_wrapped.c_byte() p = ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_byte)) end = ctypes.cast(helpers.ptrArithmetic(ptr, u'+', len_a.value), ctypes.POINTER(ctypes_wrapped.c_byte)) field_name_is_empty = ctypes_wrapped.c_int() using_numeric_index = ctypes_wrapped.c_int() while ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0))).value: if True: _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(p).contents.value).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(91).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(46).value)): _switchfallthrough = True helpers.postfixDecPtr(p) break if (not _switchfallthrough): continue break del _switchfallthrough del _switchvalue break g.SubString_init(first, ptr, ctypes_wrapped.c_long((((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(ptr, ctypes_wrapped.c_void_p).value or 0)) / 1))) ctypes_wrapped.c_int(int(g.FieldNameIterator_init(rest, p, ctypes_wrapped.c_long((((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0)) / 1))))) helpers.assign(first_idx.contents, g.Py_ssize_t(int(g.get_integer(first))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((first_idx.contents.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(field_name_is_empty, ctypes_wrapped.c_int(((ctypes.cast(first.contents.ptr, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(first.contents.end, ctypes_wrapped.c_void_p).value or 0))).value) helpers.assign(using_numeric_index, ctypes_wrapped.c_int((field_name_is_empty.value or ctypes_wrapped.c_int((first_idx.contents.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value) if (ctypes.cast(auto_number, ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int((ctypes_wrapped.c_int((auto_number.contents.an_state.value == ctypes_wrapped.c_uint(0).value)).value and using_numeric_index.value)).value: helpers.assign(auto_number.contents.an_state, (ctypes_wrapped.c_uint(ctypes_wrapped.c_uint(1).value) if field_name_is_empty.value else ctypes_wrapped.c_uint(ctypes_wrapped.c_uint(2).value)).value) if using_numeric_index.value: if ctypes_wrapped.c_int(int(g.autonumber_state_error(auto_number.contents.an_state, field_name_is_empty))).value: return ctypes_wrapped.c_int(int(0L)).value if field_name_is_empty.value: helpers.assign(first_idx.contents, helpers.postfixInc(auto_number.contents.an_field_number).value) return ctypes_wrapped.c_int(int(1L)).value del c del end del auto_number del field_name_is_empty del len_a del rest del first_idx del p del using_numeric_index del ptr del first return ctypes_wrapped.c_int().value @staticmethod def get_field_object(input_a, args, kwargs, auto_number): goto = None while True: if (goto is None): input_a = ctypes.cast(input_a, ctypes.POINTER(g.SubString)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) auto_number = ctypes.cast(auto_number, ctypes.POINTER(g.AutoNumber)) obj = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int() is_attribute = ctypes_wrapped.c_int() name = g.SubString() first = g.SubString() index = g.Py_ssize_t() rest = g.FieldNameIterator() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.field_name_split(input_a.contents.ptr, ctypes_wrapped.c_long((((ctypes.cast(input_a.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(input_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1)), ctypes.pointer(first), ctypes.pointer(index), ctypes.pointer(rest), auto_number))).value))).value): goto = 1 continue goto = u'error' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((index.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 3 continue key = ctypes.cast(intp._getPtr(g.SubString_new_object(ctypes.pointer(first)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue goto = u'error' continue if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwargs, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(kwargs, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 5 continue g.PyErr_SetObject(g.PyExc_KeyError, key) if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 11 continue continue goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): goto = u'error' continue if (goto == 5): goto = None if (goto == 12): goto = None if (goto is None): if (not True): goto = 13 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue pass goto = 14 continue if (goto == 15): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del key goto = 2 continue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_GetItem(args, index), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue goto = u'error' continue if (goto == 18): goto = None if (goto == 2): goto = None if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.assign(ok, ctypes_wrapped.c_int(int(g.FieldNameIterator_next(ctypes.pointer(rest), ctypes.pointer(is_attribute), ctypes.pointer(index), ctypes.pointer(name)))).value).value == ctypes_wrapped.c_int(int(2L)).value)).value): goto = 20 continue tmp = ctypes.POINTER(g.PyObject)() if (not is_attribute.value): goto = 22 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.getattr(obj, ctypes.pointer(name)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 21 continue if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int((index.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 24 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.getitem_str(obj, ctypes.pointer(name)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 23 continue if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g.PySequence_Check(obj))).value): goto = 26 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.getitem_sequence(obj, index), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.getitem_idx(obj, index), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 25): goto = None if (goto == 23): goto = None if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue goto = u'error' continue if (goto == 27): goto = None if (goto == 28): goto = None if (goto is None): if (not True): goto = 29 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 31 continue pass goto = 30 continue if (goto == 31): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 33 continue continue goto = 32 continue if (goto == 33): goto = None if (goto is None): goto = 29 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 29): goto = None if (goto is None): helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) del tmp goto = 19 continue if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ok.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 34 continue return (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0) if (goto == 34): goto = None if (goto == u'error'): goto = None if (goto == 35): goto = None if (goto is None): if (not True): goto = 36 continue if (not ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue pass goto = 37 continue if (goto == 38): goto = None if (goto == 39): goto = None if (goto is None): if (not True): goto = 40 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue pass goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 41): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 44 continue continue goto = 43 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 40): goto = None if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 46 continue continue goto = 45 continue if (goto == 46): goto = None if (goto is None): goto = 36 continue if (goto == 45): goto = None if (goto is None): goto = 35 continue if (goto == 36): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del index del obj del name del input_a del auto_number del is_attribute del args del rest del kwargs del ok del first return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def render_field(fieldobj, format_spec, output): goto = None while True: if (goto is None): fieldobj = ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(g.SubString)) output = ctypes.cast(output, ctypes.POINTER(g.OutputString)) ok = ctypes_wrapped.c_int() result = ctypes.POINTER(g.PyObject)() format_spec_object = ctypes.POINTER(g.PyObject)() formatter = ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), g.Py_ssize_t)() format_spec_start = ctypes.cast((ctypes.cast(format_spec.contents.ptr, ctypes.POINTER(ctypes_wrapped.c_byte)) if (ctypes.cast(format_spec.contents.ptr, ctypes_wrapped.c_void_p).value or 0) else intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_len = g.Py_ssize_t(int((ctypes_wrapped.c_long(int(ctypes_wrapped.c_long((((ctypes.cast(format_spec.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(format_spec.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value)) if (ctypes.cast(format_spec.contents.ptr, ctypes_wrapped.c_void_p).value or 0) else ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))).value)) if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 2 continue helpers.assignPtr(formatter, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), g.Py_ssize_t), g._PyBytes_FormatAdvanced), ctypes_wrapped.c_void_p).value or 0)) goto = 1 continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(fieldobj.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 4 continue helpers.assignPtr(formatter, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), g.Py_ssize_t), g._PyInt_FormatAdvanced), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyLong_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 6 continue helpers.assignPtr(formatter, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), g.Py_ssize_t), g._PyLong_FormatAdvanced), ctypes_wrapped.c_void_p).value or 0)) goto = 5 continue if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFloat_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 7 continue helpers.assignPtr(formatter, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), g.Py_ssize_t), g._PyFloat_FormatAdvanced), ctypes_wrapped.c_void_p).value or 0)) if (goto == 7): goto = None if (goto == 5): goto = None if (goto == 3): goto = None if (goto == 1): goto = None if (goto is None): if (not (ctypes.cast(formatter, ctypes_wrapped.c_void_p).value or 0)): goto = 9 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(formatter, fieldobj, format_spec_start, format_spec_len), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 8 continue if (goto == 9): goto = None if (goto is None): helpers.assignPtr(format_spec_object, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(format_spec_start, format_spec_len), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(format_spec_object, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue goto = u'done' continue if (goto == 10): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Format(fieldobj, format_spec_object), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue goto = u'done' continue if (goto == 11): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(int(0L)).value))) tmp = ctypes.cast(intp._getPtr(g.PyObject_Str(result), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'done' continue if (goto == 12): goto = None if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) del tmp helpers.assign(ok, ctypes_wrapped.c_int(int(g.output_data(output, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(result, ctypes.POINTER(g.PyVarObject)).contents.ob_size))).value) if (goto == u'done'): goto = None if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int(((ctypes.cast(format_spec_object, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(format_spec_object, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(format_spec_object, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(format_spec_object, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 30 continue continue goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 20 continue if (goto == 29): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto == 35): goto = None if (goto is None): if (not True): goto = 36 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue pass goto = 37 continue if (goto == 38): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 40 continue continue goto = 39 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 39): goto = None if (goto is None): goto = 35 continue if (goto == 36): goto = None if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 42 continue continue goto = 41 continue if (goto == 42): goto = None if (goto is None): goto = 32 continue if (goto == 41): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto is None): return ok.value del ok del format_spec_object del format_spec_len del fieldobj del result del format_spec del output del formatter del format_spec_start return ctypes_wrapped.c_int().value break @staticmethod def parse_field(str_a, field_name, format_spec, conversion): str_a = ctypes.cast(str_a, ctypes.POINTER(g.SubString)) field_name = ctypes.cast(field_name, ctypes.POINTER(g.SubString)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(g.SubString)) conversion = ctypes.cast(conversion, ctypes.POINTER(ctypes_wrapped.c_byte)) c = ctypes_wrapped.c_byte() helpers.assign(conversion.contents, ctypes.c_byte(0).value) g.SubString_init(format_spec, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(field_name.contents.ptr, (ctypes.cast(intp._storePtr(str_a.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(str_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(str_a.contents.end, ctypes_wrapped.c_void_p).value or 0))).value: if True: _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(str_a.contents.ptr).contents.value).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(58).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(33).value)): _switchfallthrough = True break if (not _switchfallthrough): continue break del _switchfallthrough del _switchvalue break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes.c_byte(33).value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(58).value)).value)).value: helpers.assignPtr(field_name.contents.end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(str_a.contents.ptr, u'-', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(format_spec.contents.ptr, (ctypes.cast(intp._storePtr(str_a.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(format_spec.contents.end, (ctypes.cast(intp._storePtr(str_a.contents.end), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((c.value == ctypes.c_byte(33).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(format_spec.contents.ptr, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(format_spec.contents.end, ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('end of format while looking for conversion specifier'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(conversion.contents, helpers.postfixIncPtr(format_spec.contents.ptr).contents.value) if ctypes_wrapped.c_int(((ctypes.cast(format_spec.contents.ptr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(format_spec.contents.end, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assign(c, helpers.postfixIncPtr(format_spec.contents.ptr).contents.value) if ctypes_wrapped.c_int((c.value != ctypes.c_byte(58).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string("expected ':' after format specifier"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value else: helpers.assignPtr(field_name.contents.end, (ctypes.cast(intp._storePtr(str_a.contents.ptr), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value del field_name del conversion del str_a del c del format_spec return ctypes_wrapped.c_int().value MarkupIterator = structs._anonymous_MarkupIterator @staticmethod def MarkupIterator_init(self, ptr, len_a): self = ctypes.cast(self, ctypes.POINTER(g.MarkupIterator)) ptr = ctypes.cast(ptr, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) g.SubString_init(ctypes.pointer(self.contents.str), ptr, len_a) return ctypes_wrapped.c_int(int(1L)).value del self del len_a del ptr return ctypes_wrapped.c_int().value @staticmethod def MarkupIterator_next(self, literal, field_present, field_name, format_spec, conversion, format_spec_needs_expanding): self = ctypes.cast(self, ctypes.POINTER(g.MarkupIterator)) literal = ctypes.cast(literal, ctypes.POINTER(g.SubString)) field_present = ctypes.cast(field_present, ctypes.POINTER(ctypes_wrapped.c_int)) field_name = ctypes.cast(field_name, ctypes.POINTER(g.SubString)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(g.SubString)) conversion = ctypes.cast(conversion, ctypes.POINTER(ctypes_wrapped.c_byte)) format_spec_needs_expanding = ctypes.cast(format_spec_needs_expanding, ctypes.POINTER(ctypes_wrapped.c_int)) at_end = ctypes_wrapped.c_int() c = ctypes_wrapped.c_byte() start = ctypes.POINTER(ctypes_wrapped.c_byte)() count = ctypes_wrapped.c_int() len_a = g.Py_ssize_t() markup_follows = ctypes_wrapped.c_int() g.SubString_init(literal, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))) g.SubString_init(field_name, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))) g.SubString_init(format_spec, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(conversion.contents, ctypes.c_byte(0).value) helpers.assign(format_spec_needs_expanding.contents, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(field_present.contents, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(self.contents.str.ptr, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value helpers.assignPtr(start, (ctypes.cast(intp._storePtr(self.contents.str.ptr), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(self.contents.str.ptr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value: if True: _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(self.contents.str.ptr).contents.value).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(123).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(125).value)): _switchfallthrough = True helpers.assign(markup_follows, ctypes_wrapped.c_int(int(1L)).value) break if (not _switchfallthrough): continue break del _switchfallthrough del _switchvalue break helpers.assign(at_end, ctypes_wrapped.c_int(((ctypes.cast(self.contents.str.ptr, ctypes_wrapped.c_void_p).value or 0) >= (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value) helpers.assign(len_a, ctypes_wrapped.c_long((((ctypes.cast(self.contents.str.ptr, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes.c_byte(125).value)).value and ctypes_wrapped.c_int((at_end.value or ctypes_wrapped.c_int((c.value != self.contents.str.ptr.contents.value)).value)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string("Single '}' encountered in format string"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((at_end.value and ctypes_wrapped.c_int((c.value == ctypes.c_byte(123).value)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string("Single '{' encountered in format string"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not at_end.value))).value: if ctypes_wrapped.c_int((c.value == self.contents.str.ptr.contents.value)).value: helpers.postfixIncPtr(self.contents.str.ptr) helpers.assign(markup_follows, ctypes_wrapped.c_int(int(0L)).value) else: helpers.postfixDec(len_a) helpers.assignPtr(literal.contents.ptr, (ctypes.cast(intp._storePtr(start), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(literal.contents.end, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(start, u'+', len_a.value)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int((not markup_follows.value))).value: return ctypes_wrapped.c_int(int(2L)).value helpers.assign(field_present.contents, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(count, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(start, (ctypes.cast(intp._storePtr(self.contents.str.ptr), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int(((ctypes.cast(self.contents.str.ptr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(self.contents.str.end, ctypes_wrapped.c_void_p).value or 0))).value: if True: _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(self.contents.str.ptr).contents.value).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(123).value)): _switchfallthrough = True helpers.assign(format_spec_needs_expanding.contents, ctypes_wrapped.c_int(int(1L)).value) helpers.postfixInc(count) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(125).value)): _switchfallthrough = True helpers.postfixDec(count) if ctypes_wrapped.c_int((count.value <= ctypes_wrapped.c_int(int(0L)).value)).value: s = g.SubString() g.SubString_init(ctypes.pointer(s), start, ctypes_wrapped.c_long((((ctypes.cast(helpers.ptrArithmetic(self.contents.str.ptr, u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(start, ctypes_wrapped.c_void_p).value or 0)) / 1))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.parse_field(ctypes.pointer(s), field_name, format_spec, conversion))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(2L)).value del s break break del _switchfallthrough del _switchvalue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string("unmatched '{' in format"), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del count del markup_follows del conversion del start del self del len_a del c del at_end del format_spec_needs_expanding del literal del field_present del format_spec del field_name return ctypes_wrapped.c_int().value @staticmethod def do_conversion(obj, conversion): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) conversion = ctypes_wrapped.c_byte(int(conversion.value)) if True: _switchvalue = None _switchvalue = conversion.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(114).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(115).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (not _switchfallthrough): if ctypes_wrapped.c_int((ctypes_wrapped.c_int((conversion.value > ctypes_wrapped.c_int(int(32L)).value)).value and ctypes_wrapped.c_int((conversion.value < ctypes_wrapped.c_int(int(127L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('Unknown conversion specifier %c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_byte(int(conversion.value))), ctypes.POINTER(g.PyObject)) else: intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('Unknown conversion specifier \\x%x'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_uint(int(conversion.value))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value break del _switchfallthrough del _switchvalue del conversion del obj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def output_markup(field_name, format_spec, format_spec_needs_expanding, conversion, output, args, kwargs, recursion_depth, auto_number): goto = None while True: if (goto is None): field_name = ctypes.cast(field_name, ctypes.POINTER(g.SubString)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(g.SubString)) format_spec_needs_expanding = ctypes_wrapped.c_int(int(format_spec_needs_expanding.value)) conversion = ctypes_wrapped.c_byte(int(conversion.value)) output = ctypes.cast(output, ctypes.POINTER(g.OutputString)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) recursion_depth = ctypes_wrapped.c_int(int(recursion_depth.value)) auto_number = ctypes.cast(auto_number, ctypes.POINTER(g.AutoNumber)) tmp = ctypes.POINTER(g.PyObject)() fieldobj = ctypes.POINTER(g.PyObject)() expanded_format_spec = g.SubString() actual_format_spec = ctypes.POINTER(g.SubString)() result = ctypes_wrapped.c_int() helpers.assignPtr(fieldobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.get_field_object(field_name, args, kwargs, auto_number), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(fieldobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue goto = u'done' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((conversion.value != ctypes.c_byte(0).value)).value): goto = 2 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.do_conversion(fieldobj, conversion), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'done' continue if (goto == 3): goto = None if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 9 continue continue goto = 8 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(fieldobj, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tmp, ctypes_wrapped.c_int(int(0L)).value) if (goto == 2): goto = None if (goto is None): if (not format_spec_needs_expanding.value): goto = 11 continue helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.build_string(format_spec, args, kwargs, ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((recursion_depth.value - ctypes_wrapped.c_int(int(1L)).value))).value)), auto_number), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'done' continue if (goto == 12): goto = None if (goto is None): g.SubString_init(ctypes.pointer(expanded_format_spec), ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(tmp, ctypes.POINTER(g.PyVarObject)).contents.ob_size) helpers.assignPtr(actual_format_spec, (ctypes.cast(intp._storePtr(ctypes.pointer(expanded_format_spec)), ctypes_wrapped.c_void_p).value or 0)) goto = 10 continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(actual_format_spec, (ctypes.cast(intp._storePtr(format_spec), ctypes_wrapped.c_void_p).value or 0)) if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.render_field(fieldobj, actual_format_spec, output))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'done' continue if (goto == 13): goto = None if (goto is None): helpers.assign(result, ctypes_wrapped.c_int(int(1L)).value) if (goto == u'done'): goto = None if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int(((ctypes.cast(fieldobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue pass goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(fieldobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 23 continue continue goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 19): goto = None if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 15 continue if (goto == 24): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto == 26): goto = None if (goto is None): if (not True): goto = 27 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 29 continue pass goto = 28 continue if (goto == 29): goto = None if (goto == 30): goto = None if (goto is None): if (not True): goto = 31 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 33 continue pass goto = 32 continue if (goto == 33): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 32): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 35 continue continue goto = 34 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 34): goto = None if (goto is None): goto = 30 continue if (goto == 31): goto = None if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 27 continue if (goto == 36): goto = None if (goto is None): goto = 26 continue if (goto == 27): goto = None if (goto is None): return result.value del tmp del conversion del auto_number del recursion_depth del args del format_spec_needs_expanding del fieldobj del actual_format_spec del result del format_spec del kwargs del output del expanded_format_spec del field_name return ctypes_wrapped.c_int().value break @staticmethod def do_markup(input_a, args, kwargs, output, recursion_depth, auto_number): input_a = ctypes.cast(input_a, ctypes.POINTER(g.SubString)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) output = ctypes.cast(output, ctypes.POINTER(g.OutputString)) recursion_depth = ctypes_wrapped.c_int(int(recursion_depth.value)) auto_number = ctypes.cast(auto_number, ctypes.POINTER(g.AutoNumber)) iter_a = g.MarkupIterator() format_spec_needs_expanding = ctypes_wrapped.c_int() result = ctypes_wrapped.c_int() field_present = ctypes_wrapped.c_int() literal = g.SubString() field_name = g.SubString() format_spec = g.SubString() conversion = ctypes_wrapped.c_byte() ctypes_wrapped.c_int(int(g.MarkupIterator_init(ctypes.pointer(iter_a), input_a.contents.ptr, ctypes_wrapped.c_long((((ctypes.cast(input_a.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(input_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1))))) while ctypes_wrapped.c_int((helpers.assign(result, ctypes_wrapped.c_int(int(g.MarkupIterator_next(ctypes.pointer(iter_a), ctypes.pointer(literal), ctypes.pointer(field_present), ctypes.pointer(field_name), ctypes.pointer(format_spec), ctypes.pointer(conversion), ctypes.pointer(format_spec_needs_expanding)))).value).value == ctypes_wrapped.c_int(int(2L)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.output_data(output, literal.ptr, ctypes_wrapped.c_long((((ctypes.cast(literal.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(literal.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1))))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if field_present.value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.output_markup(ctypes.pointer(field_name), ctypes.pointer(format_spec), format_spec_needs_expanding, conversion, output, args, kwargs, recursion_depth, auto_number))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return result.value del conversion del iter_a del input_a del auto_number del recursion_depth del args del format_spec_needs_expanding del literal del result del format_spec del kwargs del output del field_name del field_present return ctypes_wrapped.c_int().value @staticmethod def build_string(input_a, args, kwargs, recursion_depth, auto_number): goto = None while True: if (goto is None): input_a = ctypes.cast(input_a, ctypes.POINTER(g.SubString)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) recursion_depth = ctypes_wrapped.c_int(int(recursion_depth.value)) auto_number = ctypes.cast(auto_number, ctypes.POINTER(g.AutoNumber)) output = g.OutputString() result = ctypes.POINTER(g.PyObject)() count = g.Py_ssize_t() helpers.assignPtr(output.obj, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int((recursion_depth.value <= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('Max string recursion exceeded'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'done' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.output_initialize(ctypes.pointer(output), g.Py_ssize_t(int((ctypes.cast(intp._getPtr((ctypes_wrapped.c_long((((ctypes.cast(input_a.contents.end, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(input_a.contents.ptr, ctypes_wrapped.c_void_p).value or 0)) / 1)).value + ctypes_wrapped.c_int(int(100L)).value), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_void_p).value or 0)))))).value))).value): goto = 2 continue goto = u'done' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.do_markup(input_a, args, kwargs, ctypes.pointer(output), recursion_depth, auto_number))).value))).value): goto = 3 continue goto = u'done' continue if (goto == 3): goto = None if (goto is None): helpers.assign(count, ctypes_wrapped.c_long((((ctypes.cast(output.ptr, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(ctypes.cast(output.obj, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p).value or 0)) / 1)).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(output.obj), count))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue goto = u'done' continue if (goto == 4): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(output.obj), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(output.obj, ctypes_wrapped.c_int(int(0L)).value) if (goto == u'done'): goto = None if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int(((ctypes.cast(output.obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(output.obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue pass goto = 11 continue if (goto == 12): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(output.obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(output.obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 14 continue continue goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 6 continue if (goto == 15): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del count del input_a del auto_number del recursion_depth del args del result del kwargs del output return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def do_string_format(self, args, kwargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwargs = ctypes.cast(kwargs, ctypes.POINTER(g.PyObject)) input_a = g.SubString() recursion_depth = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(2L)).value)) auto_number = g.AutoNumber() g.AutoNumber_Init(ctypes.pointer(auto_number)) g.SubString_init(ctypes.pointer(input_a), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size) return (ctypes.cast(intp._storePtr(intp._getPtr(g.build_string(ctypes.pointer(input_a), args, kwargs, recursion_depth, ctypes.pointer(auto_number)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del input_a del auto_number del recursion_depth del self del args del kwargs return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) formatteriterobject = structs._anonymous_formatteriterobject @staticmethod def formatteriter_dealloc(it): it = ctypes.cast(it, ctypes.POINTER(g.formatteriterobject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(it.contents.str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it.contents.str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it.contents.str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it.contents.str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.free.value(it) del it return formatteriter_next = 'Compile exception ' '' formatteriter_methods = (PyMethodDef * 1)() # TODO init formatteriter_methods with (PyMethodDef * 1)(structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyFormatterIter_Type = PyTypeObject() # TODO init PyFormatterIter_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('formatteriterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, formatteriter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, formatteriter_next), ctypes.cast(formatteriter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def formatter_parser(self): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) it = ctypes.POINTER(g.formatteriterobject)() helpers.assignPtr(it, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_New(ctypes.pointer(g.PyFormatterIter_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.formatteriterobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(it.contents.str, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) ctypes_wrapped.c_int(int(g.MarkupIterator_init(ctypes.pointer(it.contents.it_markup), ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size))) return (ctypes.cast(intp._storePtr(ctypes.cast(it, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del it return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) fieldnameiterobject = structs._anonymous_fieldnameiterobject @staticmethod def fieldnameiter_dealloc(it): it = ctypes.cast(it, ctypes.POINTER(g.fieldnameiterobject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(it.contents.str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it.contents.str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it.contents.str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it.contents.str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.free.value(it) del it return @staticmethod def fieldnameiter_next(it): goto = None while True: if (goto is None): it = ctypes.cast(it, ctypes.POINTER(g.fieldnameiterobject)) result = ctypes_wrapped.c_int() is_attr = ctypes_wrapped.c_int() idx = g.Py_ssize_t() name = g.SubString() helpers.assign(result, ctypes_wrapped.c_int(int(g.FieldNameIterator_next(ctypes.pointer(it.contents.it_field), ctypes.pointer(is_attr), ctypes.pointer(idx), ctypes.pointer(name)))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((result.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value goto = 1 continue if (goto == 2): goto = None if (goto is None): result_a = ctypes.POINTER(g.PyObject)() is_attr_obj = ctypes.POINTER(g.PyObject)() obj = ctypes.POINTER(g.PyObject)() helpers.assignPtr(is_attr_obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(is_attr.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(is_attr_obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'done' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((idx.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 5 continue helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromSsize_t(idx), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.SubString_new_object(ctypes.pointer(name)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = u'done' continue if (goto == 6): goto = None if (goto is None): helpers.assignPtr(result_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), is_attr_obj, obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'done'): goto = None if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int(((ctypes.cast(is_attr_obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(is_attr_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(is_attr_obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(is_attr_obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 8 continue if (goto == 17): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 30 continue continue goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 20 continue if (goto == 29): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result_a), ctypes_wrapped.c_void_p).value or 0) del result_a del obj del is_attr_obj if (goto == 1): goto = None if (goto is None): del is_attr del name del it del idx del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break fieldnameiter_methods = (PyMethodDef * 1)() # TODO init fieldnameiter_methods with (PyMethodDef * 1)(structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyFieldNameIter_Type = PyTypeObject() # TODO init PyFieldNameIter_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('fieldnameiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(48).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, fieldnameiter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, fieldnameiter_next), ctypes.cast(fieldnameiter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def formatter_field_name_split(self): goto = None while True: if (goto is None): self = ctypes.cast(self, ctypes.POINTER(g.PyStringObject)) first = g.SubString() first_idx = g.Py_ssize_t() it = ctypes.POINTER(g.fieldnameiterobject)() first_obj = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(it, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_New(ctypes.pointer(g.PyFieldNameIter_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.fieldnameiterobject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(it.contents.str, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.field_name_split(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes.pointer(first), ctypes.pointer(first_idx), ctypes.pointer(it.contents.it_field), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.AutoNumber))))).value))).value): goto = 2 continue goto = u'done' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((first_idx.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 4 continue helpers.assignPtr(first_obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromSsize_t(first_idx), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 3 continue if (goto == 4): goto = None if (goto is None): helpers.assignPtr(first_obj, (ctypes.cast(intp._storePtr(intp._getPtr(g.SubString_new_object(ctypes.pointer(first)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(first_obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 5 continue goto = u'done' continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), first_obj, it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'done'): goto = None if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue pass goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 15 continue continue goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 7 continue if (goto == 16): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not ctypes_wrapped.c_int(((ctypes.cast(first_obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue pass goto = 20 continue if (goto == 21): goto = None if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(first_obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue pass goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(first_obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(first_obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 27 continue continue goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 23): goto = None if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 29 continue continue goto = 28 continue if (goto == 29): goto = None if (goto is None): goto = 19 continue if (goto == 28): goto = None if (goto is None): goto = 18 continue if (goto == 19): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del first_obj del self del it del first_idx del result del first return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break format__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init format__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def string__format__(self, args): goto = None while True: if (goto is None): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) format_spec = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() tmp = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('O:__format__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(format_spec)))).value))).value): goto = 1 continue goto = u'done' continue if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(format_spec, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__format__ arg must be str or unicode, not %s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(format_spec, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'done' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(format_spec), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'done' continue if (goto == 3): goto = None if (goto is None): helpers.assignPtr(format_spec, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyBytes_FormatAdvanced(self, ctypes.cast(ctypes.cast(format_spec, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(format_spec, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'done'): goto = None if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 13 continue continue goto = 12 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 9): goto = None if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 15 continue continue goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 5 continue if (goto == 14): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del tmp del self del args del result del format_spec return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break p_format__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init p_format__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) string_methods = (PyMethodDef * 44)() # TODO init string_methods with (PyMethodDef * 44)(structs.PyMethodDef(ctypes.cast(intp._make_string('join'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_join), ctypes_wrapped.c_int(int(8L)), ctypes.cast(join__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('split'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_split), ctypes_wrapped.c_int(int(1L)), ctypes.cast(split__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('rsplit'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_rsplit), ctypes_wrapped.c_int(int(1L)), ctypes.cast(rsplit__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('lower'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_lower), ctypes_wrapped.c_int(int(4L)), ctypes.cast(lower__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('upper'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_upper), ctypes_wrapped.c_int(int(4L)), ctypes.cast(upper__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('islower'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_islower), ctypes_wrapped.c_int(int(4L)), ctypes.cast(islower__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('isupper'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_isupper), ctypes_wrapped.c_int(int(4L)), ctypes.cast(isupper__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('isspace'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_isspace), ctypes_wrapped.c_int(int(4L)), ctypes.cast(isspace__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('isdigit'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_isdigit), ctypes_wrapped.c_int(int(4L)), ctypes.cast(isdigit__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('istitle'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_istitle), ctypes_wrapped.c_int(int(4L)), ctypes.cast(istitle__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('isalpha'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_isalpha), ctypes_wrapped.c_int(int(4L)), ctypes.cast(isalpha__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('isalnum'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_isalnum), ctypes_wrapped.c_int(int(4L)), ctypes.cast(isalnum__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('capitalize'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_capitalize), ctypes_wrapped.c_int(int(4L)), ctypes.cast(capitalize__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('count'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_count), ctypes_wrapped.c_int(int(1L)), ctypes.cast(count__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('endswith'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_endswith), ctypes_wrapped.c_int(int(1L)), ctypes.cast(endswith__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('partition'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_partition), ctypes_wrapped.c_int(int(8L)), ctypes.cast(partition__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('find'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_find), ctypes_wrapped.c_int(int(1L)), ctypes.cast(find__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('index'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_index), ctypes_wrapped.c_int(int(1L)), ctypes.cast(index__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('lstrip'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_lstrip), ctypes_wrapped.c_int(int(1L)), ctypes.cast(lstrip__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('replace'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_replace), ctypes_wrapped.c_int(int(1L)), ctypes.cast(replace__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('rfind'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_rfind), ctypes_wrapped.c_int(int(1L)), ctypes.cast(rfind__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('rindex'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_rindex), ctypes_wrapped.c_int(int(1L)), ctypes.cast(rindex__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('rstrip'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_rstrip), ctypes_wrapped.c_int(int(1L)), ctypes.cast(rstrip__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('rpartition'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_rpartition), ctypes_wrapped.c_int(int(8L)), ctypes.cast(rpartition__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('startswith'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_startswith), ctypes_wrapped.c_int(int(1L)), ctypes.cast(startswith__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('strip'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_strip), ctypes_wrapped.c_int(int(1L)), ctypes.cast(strip__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('swapcase'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_swapcase), ctypes_wrapped.c_int(int(4L)), ctypes.cast(swapcase__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('translate'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_translate), ctypes_wrapped.c_int(int(1L)), ctypes.cast(translate__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('title'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_title), ctypes_wrapped.c_int(int(4L)), ctypes.cast(title__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('ljust'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_ljust), ctypes_wrapped.c_int(int(1L)), ctypes.cast(ljust__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('rjust'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_rjust), ctypes_wrapped.c_int(int(1L)), ctypes.cast(rjust__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('center'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_center), ctypes_wrapped.c_int(int(1L)), ctypes.cast(center__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('zfill'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_zfill), ctypes_wrapped.c_int(int(1L)), ctypes.cast(zfill__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('format'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, do_string_format), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(format__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__format__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string__format__), ctypes_wrapped.c_int(int(1L)), ctypes.cast(p_format__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('_formatter_field_name_split'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, formatter_field_name_split), ctypes_wrapped.c_int(int(4L))), structs.PyMethodDef(ctypes.cast(intp._make_string('_formatter_parser'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, formatter_parser), ctypes_wrapped.c_int(int(4L))), structs.PyMethodDef(ctypes.cast(intp._make_string('encode'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_encode), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(encode__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('decode'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_decode), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(decode__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('expandtabs'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_expandtabs), ctypes_wrapped.c_int(int(1L)), ctypes.cast(expandtabs__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('splitlines'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_splitlines), ctypes_wrapped.c_int(int(1L)), ctypes.cast(splitlines__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__sizeof__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_sizeof), ctypes_wrapped.c_int(int(4L)), ctypes.cast(sizeof__doc__str, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__getnewargs__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, string_getnewargs), ctypes_wrapped.c_int(int(4L))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) @staticmethod def string_new(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) x = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 2)(ctypes.cast(intp._make_string('object'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.str_subtype_new(type_a, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwds, ctypes.cast(intp._make_string('|O:str'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(x)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(x), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del x del type_a del args del kwlist del kwds return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def str_subtype_new(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) tmp = ctypes.POINTER(g.PyObject)() pnew = ctypes.POINTER(g.PyObject)() n = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int(int(g.PyType_IsSubtype(type_a, ctypes.pointer(g.PyString_Type))))) helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.string_new(ctypes.pointer(g.PyString_Type), args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(tmp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(n, ctypes.cast(tmp, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(pnew, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(type_a.contents.tp_alloc, type_a, n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(pnew, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: values.memcpy.value(ctypes.cast(ctypes.cast(pnew, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value)))) helpers.assign(ctypes.cast(pnew, ctypes.POINTER(g.PyStringObject)).contents.ob_shash, ctypes.cast(tmp, ctypes.POINTER(g.PyStringObject)).contents.ob_shash.value) helpers.assign(ctypes.cast(pnew, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(pnew), ctypes_wrapped.c_void_p).value or 0) del tmp del type_a del kwds del args del pnew del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def basestring_new(type_a, args, kwds): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('The basestring type cannot be instantiated'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del type_a del args del kwds return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def string_mod(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_Format(v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) basestring_doc = (ctypes_wrapped.c_byte * 1)() # TODO init basestring_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) string_as_number = PyNumberMethods() # TODO init string_as_number with PyNumberMethods(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), string_mod)) PyBaseString_Type = PyTypeObject() # TODO init PyBaseString_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('basestring'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value)), ctypes.cast(basestring_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), ctypes.pointer(PyBaseObject_Type), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), basestring_new), ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value)) string_doc = (ctypes_wrapped.c_byte * 1)() # TODO init string_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) PyString_Type = PyTypeObject() # TODO init PyString_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('str'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(1).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), string_dealloc), helpers.makeFuncPtr(printfunc, string_print), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), string_repr), ctypes.pointer(string_as_number), ctypes.pointer(string_as_sequence), ctypes.pointer(string_as_mapping), helpers.makeFuncPtr(hashfunc, string_hash), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), string_str), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.pointer(string_as_buffer), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value)), ctypes.cast(string_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(richcmpfunc, string_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(string_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), ctypes.pointer(PyBaseString_Type), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), string_new), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_Free)) @staticmethod def PyString_Concat(pv, w): pv = ctypes.cast(pv, ctypes.POINTER(ctypes.POINTER(g.PyObject))) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(pv.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: while True: if (ctypes.cast(pv.contents, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(pv.contents, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break return helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.string_concat(ctypes.cast(pv.contents, ctypes.POINTER(g.PyStringObject)), w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(pv.contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del pv del w del v return @staticmethod def PyString_ConcatAndDel(pv, w): pv = ctypes.cast(pv, ctypes.POINTER(ctypes.POINTER(g.PyObject))) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) g.PyString_Concat(pv, w) while True: if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break del pv del w return @staticmethod def _PyString_Resize(pv, newsize): pv = ctypes.cast(pv, ctypes.POINTER(ctypes.POINTER(g.PyObject))) newsize = g.Py_ssize_t(int(newsize.value)) v = ctypes.POINTER(g.PyObject)() sv = ctypes.POINTER(g.PyStringObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(pv.contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value != ctypes_wrapped.c_int(int(1L)).value)).value)).value or ctypes_wrapped.c_int((newsize.value < ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes.cast(v, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate.value)).value: helpers.assignPtr(pv.contents, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/stringobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(3903))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(pv.contents, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + newsize.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.realloc.value(ctypes.cast(v, ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + newsize.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(36)).value)).value + ctypes_wrapped.c_int(int(1L)).value))).value + newsize.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(pv.contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyObject_Free(ctypes.cast(v, ctypes_wrapped.c_void_p)) intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(ctypes.cast(pv.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(sv, (ctypes.cast(intp._storePtr(ctypes.cast(pv.contents, ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ctypes.cast(sv, ctypes.POINTER(g.PyVarObject)).contents.ob_size, newsize.value) helpers.assign(helpers.ptrArithmetic(sv.contents.ob_sval, '+', newsize.value).contents, ctypes.c_byte(0).value) helpers.assign(sv.contents.ob_shash, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) return ctypes_wrapped.c_int(int(0L)).value del newsize del pv del sv del v return ctypes_wrapped.c_int().value @staticmethod def getnextarg(args, arglen, p_argidx): args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) arglen = g.Py_ssize_t(int(arglen.value)) p_argidx = ctypes.cast(p_argidx, ctypes.POINTER(g.Py_ssize_t)) argidx = g.Py_ssize_t(int(p_argidx.contents.value)) if ctypes_wrapped.c_int((argidx.value < arglen.value)).value: helpers.postfixInc(p_argidx.contents) if ctypes_wrapped.c_int((arglen.value < ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(args), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetItem(args, argidx), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('not enough arguments for format string'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del argidx del p_argidx del args del arglen return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def formatfloat(v, flags, prec, type_a): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) flags = ctypes_wrapped.c_int(int(flags.value)) prec = ctypes_wrapped.c_int(int(prec.value)) type_a = ctypes_wrapped.c_int(int(type_a.value)) p = ctypes.POINTER(ctypes_wrapped.c_byte)() result = ctypes.POINTER(g.PyObject)() x = ctypes_wrapped.c_double() helpers.assign(x, ctypes_wrapped.c_double(g.PyFloat_AsDouble(v)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_double((- ctypes_wrapped.c_double(1.0).value)).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('float argument required, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((prec.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(prec, ctypes_wrapped.c_int(int(6L)).value) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyOS_double_to_string(x, ctypes_wrapped.c_byte(int(type_a.value)), prec, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(4L)).value)) if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_int))), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(p, g.Py_ssize_t(int(values.strlen.value(p).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyMem_Free(ctypes.cast(p, ctypes_wrapped.c_void_p)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del type_a del prec del p del flags del result del v del x return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyString_FormatLong(val, flags, prec, type_a, pbuf, plen): first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None val = ctypes.cast(val, ctypes.POINTER(g.PyObject)) flags = ctypes_wrapped.c_int(int(flags.value)) prec = ctypes_wrapped.c_int(int(prec.value)) type_a = ctypes_wrapped.c_int(int(type_a.value)) pbuf = ctypes.cast(pbuf, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) plen = ctypes.cast(plen, ctypes.POINTER(ctypes_wrapped.c_int)) result = ctypes.POINTER(g.PyObject)() buf = ctypes.POINTER(ctypes_wrapped.c_byte)() i = g.Py_ssize_t() sign = ctypes_wrapped.c_int() len_a = ctypes_wrapped.c_int() llen = g.Py_ssize_t() numdigits = ctypes_wrapped.c_int() numnondigits = ctypes_wrapped.c_int() if True: _switchvalue = None _switchvalue = type_a.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(100).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(117).value)): _switchfallthrough = True helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(val, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_str, val), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(111).value)): _switchfallthrough = True helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(val, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_oct, val), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(88).value)): _switchfallthrough = True helpers.assign(numnondigits, ctypes_wrapped.c_int(int(2L)).value) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(val, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_number.contents.nb_hex, val), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) break if (not _switchfallthrough): values.assert_a.value(ctypes_wrapped.c_int((not (ctypes.cast(intp._make_string("'type' not in [duoxX]"), ctypes_wrapped.c_void_p).value or 0)))) break del _switchfallthrough del _switchvalue if ctypes_wrapped.c_int((not (ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(buf, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(result), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(buf, ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value != ctypes_wrapped.c_int(int(1L)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/stringobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(4045))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(llen, g.Py_ssize_t(int(g.PyString_Size(result))).value) if ctypes_wrapped.c_int((llen.value > ctypes_wrapped.c_long(int(2147483648L)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('string too large in _PyString_FormatLong'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(len_a, ctypes_wrapped.c_int(int(llen.value)).value) if ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_uint(int((len_a.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.value == ctypes.c_byte(76).value)).value: helpers.prefixDec(len_a) helpers.assign(helpers.ptrArithmetic(buf, '+', len_a.value).contents, ctypes.c_byte(0).value) helpers.assign(sign, ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes.c_byte(45).value)).value) helpers.augAssign(numnondigits, u'+=', sign.value) helpers.assign(numdigits, ctypes_wrapped.c_int(int((len_a.value - numnondigits.value))).value) values.assert_a.value(ctypes_wrapped.c_int((numdigits.value > ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value == ctypes_wrapped.c_int(int(0L)).value)).value: skipped = ctypes_wrapped.c_int() if True: _switchvalue = None _switchvalue = type_a.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(111).value)): _switchfallthrough = True values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', sign.value).contents.value == ctypes.c_byte(48).value))) if ctypes_wrapped.c_int((numdigits.value > ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assign(skipped, ctypes_wrapped.c_int(int(1L)).value) helpers.prefixDec(numdigits) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(88).value)): _switchfallthrough = True values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', sign.value).contents.value == ctypes.c_byte(48).value))) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_uint(int((sign.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.value == ctypes.c_byte(120).value))) helpers.assign(skipped, ctypes_wrapped.c_int(int(2L)).value) helpers.augAssign(numnondigits, u'-=', ctypes_wrapped.c_int(int(2L)).value) break break del _switchfallthrough del _switchvalue if skipped.value: helpers.augAssignPtr(buf, u'+=', skipped.value) helpers.augAssign(len_a, u'-=', skipped.value) if sign.value: helpers.assign(helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes.c_byte(45).value) values.assert_a.value(ctypes_wrapped.c_int((len_a.value == ctypes_wrapped.c_int(int((numnondigits.value + numdigits.value))).value))) values.assert_a.value(ctypes_wrapped.c_int((numdigits.value > ctypes_wrapped.c_int(int(0L)).value))) del skipped if ctypes_wrapped.c_int((prec.value > numdigits.value)).value: r1 = ctypes.cast(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int((numnondigits.value + prec.value))).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) b1 = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((not (ctypes.cast(r1, ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(b1, (ctypes.cast(intp._storePtr(ctypes.cast(r1, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < numnondigits.value)).value: pass else: break helpers.assignPtr(helpers.postfixIncPtr(b1), helpers.postfixIncPtr(buf).contents.value).contents if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int((prec.value - numdigits.value))).value)).value: pass else: break helpers.assignPtr(helpers.postfixIncPtr(b1), ctypes.c_byte(48).value).contents if True: first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_b: first_iteration_b = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < numdigits.value)).value: pass else: break helpers.assignPtr(helpers.postfixIncPtr(b1), helpers.postfixIncPtr(buf).contents.value).contents helpers.assign(b1.contents, ctypes.c_byte(0).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(result, (ctypes.cast(intp._storePtr(r1), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(buf, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes_wrapped.c_int(int((numnondigits.value + prec.value))).value) del r1 del b1 if ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(88).value)).value: if True: first_iteration_c = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_c: first_iteration_c = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < len_a.value)).value: pass else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', i.value).contents.value >= ctypes.c_byte(97).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(buf, '+', i.value).contents.value <= ctypes.c_byte(120).value)).value)).value: helpers.augAssign(helpers.ptrArithmetic(buf, '+', i.value).contents, u'-=', ctypes_wrapped.c_byte(int((ctypes.c_byte(97).value - ctypes.c_byte(65).value))).value) helpers.assignPtr(pbuf.contents, (ctypes.cast(intp._storePtr(buf), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(plen.contents, len_a.value) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del type_a del numnondigits del val del i del pbuf del len_a del prec del sign del flags del result del plen del buf del llen del numdigits return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def formatint(buf, buflen, flags, prec, type_a, v): buf = ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte)) buflen = ctypes_wrapped.c_ulong(int(buflen.value)) flags = ctypes_wrapped.c_int(int(flags.value)) prec = ctypes_wrapped.c_int(int(prec.value)) type_a = ctypes_wrapped.c_int(int(type_a.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) fmt = (ctypes_wrapped.c_byte * 64L)() sign = ctypes.POINTER(ctypes_wrapped.c_byte)() x = ctypes_wrapped.c_long() helpers.assign(x, ctypes_wrapped.c_long(int(g.PyInt_AsLong(v))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('int argument required, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((x.value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(117).value)).value)).value: helpers.assign(type_a, ctypes.c_byte(100).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((x.value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(120).value)).value or ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(88).value)).value)).value or ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(111).value)).value)).value)).value: helpers.assignPtr(sign, (ctypes.cast(intp._storePtr(intp._make_string('-')), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(sign, (ctypes.cast(intp._storePtr(intp._make_string('')), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((prec.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(prec, ctypes_wrapped.c_int(int(1L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(120).value)).value or ctypes_wrapped.c_int((type_a.value == ctypes.c_byte(88).value)).value)).value)).value: ctypes_wrapped.c_int(int(g.PyOS_snprintf(ctypes.cast(fmt, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_size_t(ctypes.sizeof(fmt)), ctypes.cast(intp._make_string('%s0%c%%.%dl%c'), ctypes.POINTER(ctypes_wrapped.c_byte)), sign, type_a, prec, type_a))) else: ctypes_wrapped.c_int(int(g.PyOS_snprintf(ctypes.cast(fmt, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_size_t(ctypes.sizeof(fmt)), ctypes.cast(intp._make_string('%s%%%s.%dl%c'), ctypes.POINTER(ctypes_wrapped.c_byte)), sign, (ctypes.cast(intp._make_string('#'), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value else ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), prec, type_a))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((buflen.value <= ctypes_wrapped.c_int(int(14L)).value)).value or ctypes_wrapped.c_int((buflen.value <= ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(3L)).value)).value + ctypes_wrapped.c_ulong(int(prec.value)).value))).value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('formatted integer is too long (precision too large?)'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if helpers.ptrArithmetic(sign, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value: ctypes_wrapped.c_int(int(g.PyOS_snprintf(buf, buflen, ctypes.cast(fmt, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int((- x.value)))))) else: ctypes_wrapped.c_int(int(g.PyOS_snprintf(buf, buflen, ctypes.cast(fmt, ctypes.POINTER(ctypes_wrapped.c_byte)), x))) return ctypes_wrapped.c_int(int(values.strlen.value(buf).value)).value del type_a del buflen del prec del sign del flags del v del x del buf del fmt return ctypes_wrapped.c_int().value @staticmethod def formatchar(buf, buflen, v): buf = ctypes.cast(buf, ctypes.POINTER(ctypes_wrapped.c_byte)) buflen = ctypes_wrapped.c_ulong(int(buflen.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_Parse(v, ctypes.cast(intp._make_string('c;%c requires int or char'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(0L)).value).contents)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_Parse(v, ctypes.cast(intp._make_string('b;%c requires int or char'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(0L)).value).contents)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(helpers.ptrArithmetic(buf, '+', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes.c_byte(0).value) return ctypes_wrapped.c_int(int(1L)).value del buflen del buf del v return ctypes_wrapped.c_int().value @staticmethod def PyString_Format(format_a, args): goto = None while True: if (goto is None): format_a = ctypes.cast(format_a, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) fmt = ctypes.POINTER(ctypes_wrapped.c_byte)() res = ctypes.POINTER(ctypes_wrapped.c_byte)() arglen = g.Py_ssize_t() argidx = g.Py_ssize_t() reslen = g.Py_ssize_t() rescnt = g.Py_ssize_t() fmtcnt = g.Py_ssize_t() args_owned = ctypes_wrapped.c_int() result = ctypes.POINTER(g.PyObject)() orig_args = ctypes.POINTER(g.PyObject)() dict_a = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(format_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value): goto = 1 continue g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/stringobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(4242))) return ctypes_wrapped.c_int(int(0L)).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(orig_args, (ctypes.cast(intp._storePtr(args), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(fmt, (ctypes.cast(intp._storePtr(ctypes.cast(format_a, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(fmtcnt, ctypes.cast(format_a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(reslen, helpers.assign(rescnt, ctypes_wrapped.c_ulong(int((fmtcnt.value + ctypes_wrapped.c_int(int(100L)).value))).value).value) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), reslen), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(result), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue helpers.assign(arglen, ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(argidx, ctypes_wrapped.c_int(int(0L)).value) goto = 3 continue if (goto == 4): goto = None if (goto is None): helpers.assign(arglen, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(argidx, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyBaseString_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyBaseString_Type)))).value)).value)).value)).value)).value): goto = 5 continue helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(args), ctypes_wrapped.c_void_p).value or 0)) if (goto == 5): goto = None if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue if (not ctypes_wrapped.c_int((fmt.contents.value != ctypes.c_byte(37).value)).value): goto = 9 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(rescnt).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue helpers.assign(rescnt, ctypes_wrapped.c_ulong(int((fmtcnt.value + ctypes_wrapped.c_int(int(100L)).value))).value) helpers.augAssign(reslen, u'+=', rescnt.value) if (not ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(result), reslen))).value): goto = 11 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 11): goto = None if (goto is None): helpers.assignPtr(res, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', reslen.value), u'-', rescnt.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(rescnt) if (goto == 10): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(res), helpers.postfixIncPtr(fmt).contents.value).contents goto = 8 continue if (goto == 9): goto = None if (goto is None): flags = ctypes_wrapped.c_int() width = g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) prec = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) c = ctypes_wrapped.c_int() fill_a = ctypes_wrapped.c_int() isnumok = ctypes_wrapped.c_int() v = ctypes.POINTER(g.PyObject)() temp = ctypes.POINTER(g.PyObject)() pbuf = ctypes.POINTER(ctypes_wrapped.c_byte)() sign = ctypes_wrapped.c_int() len_a = g.Py_ssize_t() formatbuf = (ctypes_wrapped.c_byte * 120L)() helpers.postfixIncPtr(fmt) if (not ctypes_wrapped.c_int((fmt.contents.value == ctypes.c_byte(40).value)).value): goto = 12 continue keystart = ctypes.POINTER(ctypes_wrapped.c_byte)() keylen = g.Py_ssize_t() key = ctypes.POINTER(g.PyObject)() pcount = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) if (not ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('format requires a mapping'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 13): goto = None if (goto is None): helpers.prefixIncPtr(fmt) helpers.prefixDec(fmtcnt) helpers.assignPtr(keystart, (ctypes.cast(intp._storePtr(fmt), ctypes_wrapped.c_void_p).value or 0)) if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((pcount.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 15 continue if (not ctypes_wrapped.c_int((fmt.contents.value == ctypes.c_byte(41).value)).value): goto = 17 continue helpers.prefixDec(pcount) goto = 16 continue if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((fmt.contents.value == ctypes.c_byte(40).value)).value): goto = 18 continue helpers.prefixInc(pcount) if (goto == 18): goto = None if (goto == 16): goto = None if (goto is None): helpers.postfixIncPtr(fmt) goto = 14 continue if (goto == 15): goto = None if (goto is None): helpers.assign(keylen, (ctypes.cast(intp._storePtr(intp._getPtr((ctypes_wrapped.c_long((((ctypes.cast(fmt, ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(keystart, ctypes_wrapped.c_void_p).value or 0)) / 1)).value - ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((fmtcnt.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((pcount.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 19 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('incomplete format key'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 19): goto = None if (goto is None): helpers.assignPtr(key, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(keystart, keylen), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue goto = u'error' continue if (goto == 20): goto = None if (goto is None): if (not args_owned.value): goto = 21 continue if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue pass goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 27 continue continue goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.assign(args_owned, ctypes_wrapped.c_int(int(0L)).value) if (goto == 21): goto = None if (goto is None): helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(dict_a, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 28): goto = None if (goto is None): if (not True): goto = 29 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 31 continue pass goto = 30 continue if (goto == 31): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 33 continue continue goto = 32 continue if (goto == 33): goto = None if (goto is None): goto = 29 continue if (goto == 32): goto = None if (goto is None): goto = 28 continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue goto = u'error' continue if (goto == 34): goto = None if (goto is None): helpers.assign(args_owned, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(arglen, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(argidx, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) del pcount del keylen del key del keystart if (goto == 12): goto = None if (goto == 35): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 36 continue if (not True): goto = 37 continue _switchvalue = None _switchvalue = helpers.assign(c, helpers.postfixIncPtr(fmt).contents.value).value _switchfallthrough = None _switchfallthrough = False if (goto == 38): goto = None if (goto is None): if (not True): goto = 39 continue if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(45).value))): goto = 40 continue _switchfallthrough = True helpers.augAssign(flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value) continue if (goto == 40): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(43).value))): goto = 41 continue _switchfallthrough = True helpers.augAssign(flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value) continue if (goto == 41): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(32).value))): goto = 42 continue _switchfallthrough = True helpers.augAssign(flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(2L)).value))).value) continue if (goto == 42): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(35).value))): goto = 43 continue _switchfallthrough = True helpers.augAssign(flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value) continue if (goto == 43): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(48).value))): goto = 44 continue _switchfallthrough = True helpers.augAssign(flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value) continue if (goto == 44): goto = None if (goto is None): goto = 39 continue goto = 38 continue if (goto == 39): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 37): goto = None if (goto is None): goto = 36 continue goto = 35 continue if (goto == 36): goto = None if (goto is None): if (not ctypes_wrapped.c_int((c.value == ctypes.c_byte(42).value)).value): goto = 46 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.getnextarg(args, arglen, ctypes.pointer(argidx)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue goto = u'error' continue if (goto == 47): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 48 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('* wants int'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 48): goto = None if (goto is None): helpers.assign(width, g.Py_ssize_t(int(g.PyInt_AsSsize_t(v))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((width.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 49 continue goto = u'error' continue if (goto == 49): goto = None if (goto is None): if (not ctypes_wrapped.c_int((width.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue helpers.augAssign(flags, u'|=', ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value) helpers.assign(width, g.Py_ssize_t(int((- width.value))).value) if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue helpers.assign(c, helpers.postfixIncPtr(fmt).contents.value) if (goto == 51): goto = None if (goto is None): goto = 45 continue if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(0L)).value)).value and values.isdigit.value(c).value)).value): goto = 52 continue helpers.assign(width, ctypes_wrapped.c_int(int((c.value - ctypes.c_byte(48).value))).value) if (goto == 53): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 54 continue helpers.assign(c, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(fmt).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) if (not ctypes_wrapped.c_int((not values.isdigit.value(c).value)).value): goto = 55 continue goto = 54 continue if (goto == 55): goto = None if (goto is None): if (not ctypes_wrapped.c_int((width.value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int(c.value)).value - ctypes.c_byte(48).value))).value))).value / ctypes_wrapped.c_int(int(10L)).value))).value)).value): goto = 56 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('width too big'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 56): goto = None if (goto is None): helpers.assign(width, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((width.value * ctypes_wrapped.c_int(int(10L)).value))).value + ctypes_wrapped.c_int(int((c.value - ctypes.c_byte(48).value))).value))).value) goto = 53 continue if (goto == 54): goto = None if (goto == 52): goto = None if (goto == 45): goto = None if (goto is None): if (not ctypes_wrapped.c_int((c.value == ctypes.c_byte(46).value)).value): goto = 57 continue helpers.assign(prec, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 58 continue helpers.assign(c, helpers.postfixIncPtr(fmt).contents.value) if (goto == 58): goto = None if (goto is None): if (not ctypes_wrapped.c_int((c.value == ctypes.c_byte(42).value)).value): goto = 60 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.getnextarg(args, arglen, ctypes.pointer(argidx)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 61 continue goto = u'error' continue if (goto == 61): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 62 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('* wants int'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 62): goto = None if (goto is None): helpers.assign(prec, ctypes_wrapped.c_int(int(g._PyInt_AsInt(v))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((prec.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 63 continue goto = u'error' continue if (goto == 63): goto = None if (goto is None): if (not ctypes_wrapped.c_int((prec.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 64 continue helpers.assign(prec, ctypes_wrapped.c_int(int(0L)).value) if (goto == 64): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 65 continue helpers.assign(c, helpers.postfixIncPtr(fmt).contents.value) if (goto == 65): goto = None if (goto is None): goto = 59 continue if (goto == 60): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(0L)).value)).value and values.isdigit.value(c).value)).value): goto = 66 continue helpers.assign(prec, ctypes_wrapped.c_int(int((c.value - ctypes.c_byte(48).value))).value) if (goto == 67): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 68 continue helpers.assign(c, ctypes_wrapped.c_ubyte(int(ctypes_wrapped.c_uint(int((helpers.postfixIncPtr(fmt).contents.value & ctypes_wrapped.c_int(int(255L)).value))).value)).value) if (not ctypes_wrapped.c_int((not values.isdigit.value(c).value)).value): goto = 69 continue goto = 68 continue if (goto == 69): goto = None if (goto is None): if (not ctypes_wrapped.c_int((prec.value > ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_long(int(2147483648L)).value - ctypes_wrapped.c_int(int((ctypes_wrapped.c_int(int(c.value)).value - ctypes.c_byte(48).value))).value))).value / ctypes_wrapped.c_int(int(10L)).value))).value)).value): goto = 70 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('prec too big'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 70): goto = None if (goto is None): helpers.assign(prec, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((prec.value * ctypes_wrapped.c_int(int(10L)).value))).value + ctypes_wrapped.c_int(int((c.value - ctypes.c_byte(48).value))).value))).value) goto = 67 continue if (goto == 68): goto = None if (goto == 66): goto = None if (goto == 59): goto = None if (goto == 57): goto = None if (goto is None): if (not ctypes_wrapped.c_int((fmtcnt.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 71 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes.c_byte(104).value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(108).value)).value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(76).value)).value)).value): goto = 72 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(fmtcnt).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 73 continue helpers.assign(c, helpers.postfixIncPtr(fmt).contents.value) if (goto == 73): goto = None if (goto == 72): goto = None if (goto == 71): goto = None if (goto is None): if (not ctypes_wrapped.c_int((fmtcnt.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 74 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('incomplete format'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 74): goto = None if (goto is None): if (not ctypes_wrapped.c_int((c.value != ctypes.c_byte(37).value)).value): goto = 75 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.getnextarg(args, arglen, ctypes.pointer(argidx)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 76 continue goto = u'error' continue if (goto == 76): goto = None if (goto == 75): goto = None if (goto is None): helpers.assign(sign, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(fill_a, ctypes.c_byte(32).value) if (not True): goto = 77 continue _switchvalue = None _switchvalue = c.value _switchfallthrough = None _switchfallthrough = False if (goto == 78): goto = None if (goto is None): if (not True): goto = 79 continue if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(37).value))): goto = 80 continue _switchfallthrough = True helpers.assignPtr(pbuf, (ctypes.cast(intp._storePtr(intp._make_string('%')), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes_wrapped.c_int(int(1L)).value) goto = 79 continue if (goto == 80): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(115).value))): goto = 81 continue _switchfallthrough = True helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_Str(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 81): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(114).value))): goto = 82 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((c.value == ctypes.c_byte(114).value)).value): goto = 83 continue helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 83): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 84 continue goto = u'error' continue if (goto == 84): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 85 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('%s argument has non-string str()'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == 86): goto = None if (goto is None): if (not True): goto = 87 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 89 continue pass goto = 88 continue if (goto == 89): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 88): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 91 continue continue goto = 90 continue if (goto == 91): goto = None if (goto is None): goto = 87 continue if (goto == 90): goto = None if (goto is None): goto = 86 continue if (goto == 87): goto = None if (goto is None): goto = u'error' continue if (goto == 85): goto = None if (goto is None): helpers.assignPtr(pbuf, (ctypes.cast(intp._storePtr(ctypes.cast(temp, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes.cast(temp, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((prec.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((len_a.value > prec.value)).value)).value): goto = 92 continue helpers.assign(len_a, prec.value) if (goto == 92): goto = None if (goto is None): goto = 79 continue if (goto == 82): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(105).value))): goto = 93 continue _switchfallthrough = True if (goto == 93): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(100).value))): goto = 94 continue _switchfallthrough = True if (goto == 94): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(117).value))): goto = 95 continue _switchfallthrough = True if (goto == 95): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(111).value))): goto = 96 continue _switchfallthrough = True if (goto == 96): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(120).value))): goto = 97 continue _switchfallthrough = True if (goto == 97): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(88).value))): goto = 98 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((c.value == ctypes.c_byte(105).value)).value): goto = 99 continue helpers.assign(c, ctypes.c_byte(100).value) if (goto == 99): goto = None if (goto is None): helpers.assign(isnumok, ctypes_wrapped.c_int(int(0L)).value) if (not ctypes_wrapped.c_int(int(g.PyNumber_Check(v))).value): goto = 100 continue iobj = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 102 continue helpers.assignPtr(iobj, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) goto = 101 continue if (goto == 102): goto = None if (goto is None): helpers.assignPtr(iobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Int(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(iobj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 103 continue g.PyErr_Clear() helpers.assignPtr(iobj, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyNumber_Long(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 103): goto = None if (goto == 101): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(iobj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 104 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((iobj.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 106 continue helpers.assign(isnumok, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(pbuf, (ctypes.cast(intp._storePtr(formatbuf), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes_wrapped.c_int(int(g.formatint(pbuf, ctypes_wrapped.c_size_t(ctypes.sizeof(formatbuf)), flags, prec, c, iobj))).value) if (goto == 107): goto = None if (goto is None): if (not True): goto = 108 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 110 continue pass goto = 109 continue if (goto == 110): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 109): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 112 continue continue goto = 111 continue if (goto == 112): goto = None if (goto is None): goto = 108 continue if (goto == 111): goto = None if (goto is None): goto = 107 continue if (goto == 108): goto = None if (goto is None): if (not ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 113 continue goto = u'error' continue if (goto == 113): goto = None if (goto is None): helpers.assign(sign, ctypes_wrapped.c_int(int(1L)).value) goto = 105 continue if (goto == 106): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(iobj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 115 continue ilen = ctypes_wrapped.c_int() helpers.assign(isnumok, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyString_FormatLong(iobj, flags, prec, c, ctypes.pointer(pbuf), ctypes.pointer(ilen)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 116): goto = None if (goto is None): if (not True): goto = 117 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 119 continue pass goto = 118 continue if (goto == 119): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 118): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 121 continue continue goto = 120 continue if (goto == 121): goto = None if (goto is None): goto = 117 continue if (goto == 120): goto = None if (goto is None): goto = 116 continue if (goto == 117): goto = None if (goto is None): helpers.assign(len_a, ilen.value) if (not ctypes_wrapped.c_int((not (ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0))).value): goto = 122 continue goto = u'error' continue if (goto == 122): goto = None if (goto is None): helpers.assign(sign, ctypes_wrapped.c_int(int(1L)).value) del ilen goto = 114 continue if (goto == 115): goto = None if (goto == 123): goto = None if (goto is None): if (not True): goto = 124 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 126 continue pass goto = 125 continue if (goto == 126): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(iobj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 125): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 128 continue continue goto = 127 continue if (goto == 128): goto = None if (goto is None): goto = 124 continue if (goto == 127): goto = None if (goto is None): goto = 123 continue if (goto == 124): goto = None if (goto == 114): goto = None if (goto == 105): goto = None if (goto == 104): goto = None if (goto is None): del iobj if (goto == 100): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not isnumok.value))).value): goto = 129 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%%%c format: a number is required, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), c, ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'error' continue if (goto == 129): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value): goto = 130 continue helpers.assign(fill_a, ctypes.c_byte(48).value) if (goto == 130): goto = None if (goto is None): goto = 79 continue if (goto == 98): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(101).value))): goto = 131 continue _switchfallthrough = True if (goto == 131): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(69).value))): goto = 132 continue _switchfallthrough = True if (goto == 132): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(102).value))): goto = 133 continue _switchfallthrough = True if (goto == 133): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(70).value))): goto = 134 continue _switchfallthrough = True if (goto == 134): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(103).value))): goto = 135 continue _switchfallthrough = True if (goto == 135): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(71).value))): goto = 136 continue _switchfallthrough = True helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(intp._getPtr(g.formatfloat(v, flags, prec, c), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 137 continue goto = u'error' continue if (goto == 137): goto = None if (goto is None): helpers.assignPtr(pbuf, (ctypes.cast(intp._storePtr(ctypes.cast(temp, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes.cast(temp, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(sign, ctypes_wrapped.c_int(int(1L)).value) if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value): goto = 138 continue helpers.assign(fill_a, ctypes.c_byte(48).value) if (goto == 138): goto = None if (goto is None): goto = 79 continue if (goto == 136): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes.c_byte(99).value))): goto = 139 continue _switchfallthrough = True helpers.assignPtr(pbuf, (ctypes.cast(intp._storePtr(formatbuf), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(len_a, ctypes_wrapped.c_int(int(g.formatchar(pbuf, ctypes_wrapped.c_size_t(ctypes.sizeof(formatbuf)), v))).value) if (not ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 140 continue goto = u'error' continue if (goto == 140): goto = None if (goto is None): goto = 79 continue if (goto == 139): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 141 continue intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string("unsupported format character '%c' (0x%x) at index %zd"), ctypes.POINTER(ctypes_wrapped.c_byte)), c, c, g.Py_ssize_t(int(ctypes_wrapped.c_long((((ctypes.cast(helpers.ptrArithmetic(fmt, u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p).value or 0) - (ctypes.cast(intp._getPtr(g.PyString_AsString(format_a), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_void_p).value or 0)) / 1)).value))), ctypes.POINTER(g.PyObject)) goto = u'error' continue if (goto == 141): goto = None if (goto is None): goto = 79 continue goto = 78 continue if (goto == 79): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 77): goto = None if (goto is None): if (not sign.value): goto = 142 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((pbuf.contents.value == ctypes.c_byte(45).value)).value or ctypes_wrapped.c_int((pbuf.contents.value == ctypes.c_byte(43).value)).value)).value): goto = 144 continue helpers.assign(sign, helpers.postfixIncPtr(pbuf).contents.value) helpers.postfixDec(len_a) goto = 143 continue if (goto == 144): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value): goto = 146 continue helpers.assign(sign, ctypes.c_byte(43).value) goto = 145 continue if (goto == 146): goto = None if (goto is None): if (not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(2L)).value))).value))).value): goto = 148 continue helpers.assign(sign, ctypes.c_byte(32).value) goto = 147 continue if (goto == 148): goto = None if (goto is None): helpers.assign(sign, ctypes_wrapped.c_int(int(0L)).value) if (goto == 147): goto = None if (goto == 145): goto = None if (goto == 143): goto = None if (goto == 142): goto = None if (goto is None): if (not ctypes_wrapped.c_int((width.value < len_a.value)).value): goto = 149 continue helpers.assign(width, len_a.value) if (goto == 149): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((rescnt.value - ctypes_wrapped.c_int((sign.value != ctypes_wrapped.c_int(int(0L)).value)).value))).value < width.value)).value): goto = 150 continue helpers.augAssign(reslen, u'-=', rescnt.value) helpers.assign(rescnt, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((width.value + fmtcnt.value))).value + ctypes_wrapped.c_int(int(100L)).value))).value) helpers.augAssign(reslen, u'+=', rescnt.value) if (not ctypes_wrapped.c_int((reslen.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 151 continue if (goto == 152): goto = None if (goto is None): if (not True): goto = 153 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 155 continue pass goto = 154 continue if (goto == 155): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 154): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 157 continue continue goto = 156 continue if (goto == 157): goto = None if (goto is None): goto = 153 continue if (goto == 156): goto = None if (goto is None): goto = 152 continue if (goto == 153): goto = None if (goto == 158): goto = None if (goto is None): if (not True): goto = 159 continue if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 161 continue pass goto = 160 continue if (goto == 161): goto = None if (goto == 162): goto = None if (goto is None): if (not True): goto = 163 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 165 continue pass goto = 164 continue if (goto == 165): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 164): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 167 continue continue goto = 166 continue if (goto == 167): goto = None if (goto is None): goto = 163 continue if (goto == 166): goto = None if (goto is None): goto = 162 continue if (goto == 163): goto = None if (goto == 160): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 169 continue continue goto = 168 continue if (goto == 169): goto = None if (goto is None): goto = 159 continue if (goto == 168): goto = None if (goto is None): goto = 158 continue if (goto == 159): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 151): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(result), reslen))).value): goto = 170 continue if (goto == 171): goto = None if (goto is None): if (not True): goto = 172 continue if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 174 continue pass goto = 173 continue if (goto == 174): goto = None if (goto == 175): goto = None if (goto is None): if (not True): goto = 176 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 178 continue pass goto = 177 continue if (goto == 178): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 177): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 180 continue continue goto = 179 continue if (goto == 180): goto = None if (goto is None): goto = 176 continue if (goto == 179): goto = None if (goto is None): goto = 175 continue if (goto == 176): goto = None if (goto == 173): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 182 continue continue goto = 181 continue if (goto == 182): goto = None if (goto is None): goto = 172 continue if (goto == 181): goto = None if (goto is None): goto = 171 continue if (goto == 172): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 170): goto = None if (goto is None): helpers.assignPtr(res, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, u'+', reslen.value), u'-', rescnt.value)), ctypes_wrapped.c_void_p).value or 0)) if (goto == 150): goto = None if (goto is None): if (not sign.value): goto = 183 continue if (not ctypes_wrapped.c_int((fill_a.value != ctypes.c_byte(32).value)).value): goto = 184 continue helpers.assignPtr(helpers.postfixIncPtr(res), sign.value).contents if (goto == 184): goto = None if (goto is None): helpers.postfixDec(rescnt) if (not ctypes_wrapped.c_int((width.value > len_a.value)).value): goto = 185 continue helpers.postfixDec(width) if (goto == 185): goto = None if (goto == 183): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes.c_byte(120).value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(88).value)).value)).value)).value): goto = 186 continue values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(pbuf, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes.c_byte(48).value))) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(pbuf, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == c.value))) if (not ctypes_wrapped.c_int((fill_a.value != ctypes.c_byte(32).value)).value): goto = 187 continue helpers.assignPtr(helpers.postfixIncPtr(res), helpers.postfixIncPtr(pbuf).contents.value).contents helpers.assignPtr(helpers.postfixIncPtr(res), helpers.postfixIncPtr(pbuf).contents.value).contents if (goto == 187): goto = None if (goto is None): helpers.augAssign(rescnt, u'-=', ctypes_wrapped.c_int(int(2L)).value) helpers.augAssign(width, u'-=', ctypes_wrapped.c_int(int(2L)).value) if (not ctypes_wrapped.c_int((width.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 188 continue helpers.assign(width, ctypes_wrapped.c_int(int(0L)).value) if (goto == 188): goto = None if (goto is None): helpers.augAssign(len_a, u'-=', ctypes_wrapped.c_int(int(2L)).value) if (goto == 186): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((width.value > len_a.value)).value and ctypes_wrapped.c_uint(int((not ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value))).value))).value)).value): goto = 189 continue if (goto == 190): goto = None if (goto is None): if (not True): goto = 191 continue helpers.prefixDec(rescnt) helpers.assignPtr(helpers.postfixIncPtr(res), fill_a.value).contents if (not ctypes_wrapped.c_int((helpers.prefixDec(width).value > len_a.value)).value): goto = 193 continue continue goto = 192 continue if (goto == 193): goto = None if (goto is None): goto = 191 continue if (goto == 192): goto = None if (goto is None): goto = 190 continue if (goto == 191): goto = None if (goto == 189): goto = None if (goto is None): if (not ctypes_wrapped.c_int((fill_a.value == ctypes.c_byte(32).value)).value): goto = 194 continue if (not sign.value): goto = 195 continue helpers.assignPtr(helpers.postfixIncPtr(res), sign.value).contents if (goto == 195): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((c.value == ctypes.c_byte(120).value)).value or ctypes_wrapped.c_int((c.value == ctypes.c_byte(88).value)).value)).value)).value): goto = 196 continue values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(pbuf, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes.c_byte(48).value))) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(pbuf, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == c.value))) helpers.assignPtr(helpers.postfixIncPtr(res), helpers.postfixIncPtr(pbuf).contents.value).contents helpers.assignPtr(helpers.postfixIncPtr(res), helpers.postfixIncPtr(pbuf).contents.value).contents if (goto == 196): goto = None if (goto == 194): goto = None if (goto is None): values.memcpy.value(ctypes.cast(res, ctypes_wrapped.c_void_p), ctypes.cast(pbuf, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(len_a.value)) helpers.augAssignPtr(res, u'+=', len_a.value) helpers.augAssign(rescnt, u'-=', len_a.value) if (goto == 197): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(width).value >= len_a.value)).value): goto = 198 continue helpers.prefixDec(rescnt) helpers.assignPtr(helpers.postfixIncPtr(res), ctypes.c_byte(32).value).contents goto = 197 continue if (goto == 198): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((argidx.value < arglen.value)).value)).value and ctypes_wrapped.c_int((c.value != ctypes.c_byte(37).value)).value)).value): goto = 199 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('not all arguments converted during string formatting'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == 200): goto = None if (goto is None): if (not True): goto = 201 continue if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 203 continue pass goto = 202 continue if (goto == 203): goto = None if (goto == 204): goto = None if (goto is None): if (not True): goto = 205 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 207 continue pass goto = 206 continue if (goto == 207): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 206): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 209 continue continue goto = 208 continue if (goto == 209): goto = None if (goto is None): goto = 205 continue if (goto == 208): goto = None if (goto is None): goto = 204 continue if (goto == 205): goto = None if (goto == 202): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 211 continue continue goto = 210 continue if (goto == 211): goto = None if (goto is None): goto = 201 continue if (goto == 210): goto = None if (goto is None): goto = 200 continue if (goto == 201): goto = None if (goto is None): goto = u'error' continue if (goto == 199): goto = None if (goto == 212): goto = None if (goto is None): if (not True): goto = 213 continue if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 215 continue pass goto = 214 continue if (goto == 215): goto = None if (goto == 216): goto = None if (goto is None): if (not True): goto = 217 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 219 continue pass goto = 218 continue if (goto == 219): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 218): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 221 continue continue goto = 220 continue if (goto == 221): goto = None if (goto is None): goto = 217 continue if (goto == 220): goto = None if (goto is None): goto = 216 continue if (goto == 217): goto = None if (goto == 214): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 223 continue continue goto = 222 continue if (goto == 223): goto = None if (goto is None): goto = 213 continue if (goto == 222): goto = None if (goto is None): goto = 212 continue if (goto == 213): goto = None if (goto is None): del formatbuf del c del temp del isnumok del pbuf del len_a del fill_a del prec del sign del width del flags del v if (goto == 8): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((argidx.value < arglen.value)).value and ctypes_wrapped.c_int((not (ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 224 continue g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('not all arguments converted during string formatting'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'error' continue if (goto == 224): goto = None if (goto is None): if (not args_owned.value): goto = 225 continue if (goto == 226): goto = None if (goto is None): if (not True): goto = 227 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 229 continue pass goto = 228 continue if (goto == 229): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 228): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 231 continue continue goto = 230 continue if (goto == 231): goto = None if (goto is None): goto = 227 continue if (goto == 230): goto = None if (goto is None): goto = 226 continue if (goto == 227): goto = None if (goto == 225): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(g._PyString_Resize(ctypes.pointer(result), ctypes_wrapped.c_long(int((reslen.value - rescnt.value)))))).value): goto = 232 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 232): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) if (goto == u'error'): goto = None if (goto == 233): goto = None if (goto is None): if (not True): goto = 234 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 236 continue pass goto = 235 continue if (goto == 236): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 235): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 238 continue continue goto = 237 continue if (goto == 238): goto = None if (goto is None): goto = 234 continue if (goto == 237): goto = None if (goto is None): goto = 233 continue if (goto == 234): goto = None if (goto is None): if (not args_owned.value): goto = 239 continue if (goto == 240): goto = None if (goto is None): if (not True): goto = 241 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 243 continue pass goto = 242 continue if (goto == 243): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 242): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 245 continue continue goto = 244 continue if (goto == 245): goto = None if (goto is None): goto = 241 continue if (goto == 244): goto = None if (goto is None): goto = 240 continue if (goto == 241): goto = None if (goto == 239): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del fmtcnt del orig_args del res del fmt del args del argidx del reslen del dict_a del result del arglen del rescnt del args_owned del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyString_InternInPlace(p): p = ctypes.cast(p, ctypes.POINTER(ctypes.POINTER(g.PyObject))) s = ctypes.cast(ctypes.cast(p.contents, ctypes.POINTER(g.PyStringObject)), ctypes.POINTER(g.PyStringObject)) t = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('PyString_InternInPlace: strings only please!'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyString_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: return if ctypes.cast(s, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate.value: return if ctypes_wrapped.c_int(((ctypes.cast(g.interned, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.interned, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.interned, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() return helpers.assignPtr(t, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_GetItem(g.interned, ctypes.cast(s, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(t, ctypes_wrapped.c_void_p).value or 0): helpers.postfixInc(ctypes.cast(t, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(p.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(p.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(p.contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(t), ctypes_wrapped.c_void_p).value or 0)) return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItem(g.interned, ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.cast(s, ctypes.POINTER(g.PyObject))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() return helpers.augAssign(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, u'-=', ctypes_wrapped.c_int(int(2L)).value) helpers.assign(ctypes.cast(s, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate, ctypes_wrapped.c_int(int(1L)).value) del p del s del t return @staticmethod def PyString_InternImmortal(p): p = ctypes.cast(p, ctypes.POINTER(ctypes.POINTER(g.PyObject))) g.PyString_InternInPlace(p) if ctypes_wrapped.c_int((ctypes.cast(p.contents, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate.value != ctypes_wrapped.c_int(int(2L)).value)).value: helpers.assign(ctypes.cast(p.contents, ctypes.POINTER(g.PyStringObject)).contents.ob_sstate, ctypes_wrapped.c_int(int(2L)).value) helpers.postfixInc(ctypes.cast(p.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) del p return @staticmethod def PyString_InternFromString(cp): cp = ctypes.cast(cp, ctypes.POINTER(ctypes_wrapped.c_byte)) s = ctypes.cast(intp._getPtr(g.PyString_FromString(cp), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value g.PyString_InternInPlace(ctypes.pointer(s)) return (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0) del s del cp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyString_Fini(): first_iteration = None i = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(255L)).value + ctypes_wrapped.c_int(int(1L)).value))).value)).value: pass else: break while True: if (ctypes.cast(helpers.ptrArithmetic(g.characters, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(g.characters, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(helpers.ptrArithmetic(g.characters, '+', i.value).contents, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(g.nullstring, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(g.nullstring, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(g.nullstring, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break del i return @staticmethod def _Py_ReleaseInternedStrings(): first_iteration = None keys = ctypes.POINTER(g.PyObject)() s = ctypes.POINTER(g.PyStringObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() immortal_size = g.Py_ssize_t() mortal_size = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(g.interned, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(g.interned, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: return helpers.assignPtr(keys, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_Keys(g.interned), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(keys, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(keys, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g.PyErr_Clear() return helpers.assign(n, ctypes.cast(keys, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('releasing %ld interned strings\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), n) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(s, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(keys, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyStringObject))), ctypes_wrapped.c_void_p).value or 0)) if True: _switchvalue = None _switchvalue = s.contents.ob_sstate.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value)): _switchfallthrough = True helpers.augAssign(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, u'+=', ctypes_wrapped.c_int(int(1L)).value) helpers.augAssign(immortal_size, u'+=', ctypes.cast(s, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True helpers.augAssign(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt, u'+=', ctypes_wrapped.c_int(int(2L)).value) helpers.augAssign(mortal_size, u'+=', ctypes.cast(s, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) break if (not _switchfallthrough): g.Py_FatalError(ctypes.cast(intp._make_string('Inconsistent interned string state.'), ctypes.POINTER(ctypes_wrapped.c_byte))) break del _switchfallthrough del _switchvalue helpers.assign(s.contents.ob_sstate, ctypes_wrapped.c_int(int(0L)).value) values.fprintf.value(values.stderr.value, ctypes.cast(intp._make_string('total size of all interned strings: %ld/%ld mortal/immortal\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), mortal_size, immortal_size) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(keys, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(keys, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(keys, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyDict_Clear(g.interned) while True: if (ctypes.cast(g.interned, ctypes_wrapped.c_void_p).value or 0): _py_tmp = ctypes.cast(ctypes.cast(g.interned, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(g.interned, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(_py_tmp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del _py_tmp if ctypes_wrapped.c_int(int(0L)).value: continue else: break del keys del n del i del s del mortal_size del immortal_size return @staticmethod def PyObject_Malloc(n): n = ctypes_wrapped.c_ulong(int(n.value)) return (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(n.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(n.value)) if n.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0) del n return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Realloc(p, n): p = ctypes.cast(p, ctypes_wrapped.c_void_p) n = ctypes_wrapped.c_ulong(int(n.value)) return (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(n.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.realloc.value(p, (ctypes_wrapped.c_ulong(int(n.value)) if n.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p))), ctypes_wrapped.c_void_p).value or 0) del p del n return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Free(p): p = ctypes.cast(p, ctypes_wrapped.c_void_p) values.free.value(p) del p return generations = (structs.gc_generation * 3L)() # TODO init generations with (structs.gc_generation * 3L)(structs.gc_generation(unions._gc_head(structs._local__anonymous_6(ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.head), ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.head), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)))), ctypes_wrapped.c_int(int(700L)), ctypes_wrapped.c_int(int(0L))), structs.gc_generation(unions._gc_head(structs._local__anonymous_6(ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(1L)).value).contents.head), ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(1L)).value).contents.head), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)))), ctypes_wrapped.c_int(int(10L)), ctypes_wrapped.c_int(int(0L))), structs.gc_generation(unions._gc_head(structs._local__anonymous_6(ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(2L)).value).contents.head), ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(2L)).value).contents.head), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)))), ctypes_wrapped.c_int(int(10L)), ctypes_wrapped.c_int(int(0L)))) _PyGC_generation0 = ctypes.POINTER(PyGC_Head)() # TODO init _PyGC_generation0 with ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.head), ctypes.POINTER(PyGC_Head)) enabled = ctypes_wrapped.c_int() # TODO init enabled with ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value)) collecting = ctypes_wrapped.c_int() garbage = ctypes.POINTER(PyObject)() gc_str = ctypes.POINTER(PyObject)() delstr = ctypes.POINTER(PyObject)() long_lived_total = Py_ssize_t() long_lived_pending = Py_ssize_t() debug = ctypes_wrapped.c_int() tmod = ctypes.POINTER(PyObject)() @staticmethod def gc_list_init(list_a): list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyGC_Head)) helpers.assignPtr(list_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(list_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0)) del list_a return @staticmethod def gc_list_is_empty(list_a): list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyGC_Head)) return ctypes_wrapped.c_int(((ctypes.cast(list_a.contents.gc.gc_next, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0))).value del list_a return ctypes_wrapped.c_int().value @staticmethod def gc_list_remove(node_a): node_a = ctypes.cast(node_a, ctypes.POINTER(g.PyGC_Head)) helpers.assignPtr(node_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(node_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(node_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(node_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(node_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del node_a return @staticmethod def gc_list_move(node_a, list_a): node_a = ctypes.cast(node_a, ctypes.POINTER(g.PyGC_Head)) list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyGC_Head)) new_prev = ctypes.POINTER(g.PyGC_Head)() current_prev = ctypes.cast(node_a.contents.gc.gc_prev, ctypes.POINTER(g.PyGC_Head)) current_next = ctypes.cast(node_a.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) helpers.assignPtr(current_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(current_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(current_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(current_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(new_prev, (ctypes.cast(intp._storePtr(helpers.assignPtr(node_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(list_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(new_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(helpers.assignPtr(list_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(node_a), ctypes_wrapped.c_void_p).value or 0))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(node_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(list_a), ctypes_wrapped.c_void_p).value or 0)) del list_a del current_next del new_prev del node_a del current_prev return @staticmethod def gc_list_merge(from_a, to): from_a = ctypes.cast(from_a, ctypes.POINTER(g.PyGC_Head)) to = ctypes.cast(to, ctypes.POINTER(g.PyGC_Head)) tail = ctypes.POINTER(g.PyGC_Head)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(from_a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(to, ctypes_wrapped.c_void_p).value or 0)))) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.gc_list_is_empty(from_a))).value))).value: helpers.assignPtr(tail, (ctypes.cast(intp._storePtr(to.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tail.contents.gc.gc_next, (ctypes.cast(intp._storePtr(from_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(tail.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(tail), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(to.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(from_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(to.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(to), ctypes_wrapped.c_void_p).value or 0)) g.gc_list_init(from_a) del to del from_a del tail return @staticmethod def gc_list_size(list_a): first_iteration = None list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.POINTER(g.PyGC_Head)() n = g.Py_ssize_t() if True: first_iteration = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(list_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.postfixInc(n) return n.value del list_a del gc del n return g.Py_ssize_t().value @staticmethod def append_objects(py_list, gc_list): first_iteration = None py_list = ctypes.cast(py_list, ctypes.POINTER(g.PyObject)) gc_list = ctypes.cast(gc_list, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.POINTER(g.PyGC_Head)() if True: first_iteration = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc_list.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(gc_list, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break op = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(py_list, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int(int(g.PyList_Append(py_list, op))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del op return ctypes_wrapped.c_int(int(0L)).value del gc_list del py_list del gc return ctypes_wrapped.c_int().value @staticmethod def update_refs(containers): first_iteration = None containers = ctypes.cast(containers, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.cast(containers.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(containers, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break values.assert_a.value(ctypes_wrapped.c_int((gc.contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value))) helpers.assign(gc.contents.gc.gc_refs, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt.value) values.assert_a.value(ctypes_wrapped.c_int((gc.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int(0L)).value))) del gc del containers return @staticmethod def visit_decref(op, data): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) data = ctypes.cast(data, ctypes_wrapped.c_void_p) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, op).value)).value)).value: gc = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((gc.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((gc.contents.gc.gc_refs.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixDec(gc.contents.gc.gc_refs) del gc return ctypes_wrapped.c_int(int(0L)).value del data del op return ctypes_wrapped.c_int().value @staticmethod def subtract_refs(containers): first_iteration = None containers = ctypes.cast(containers, ctypes.POINTER(g.PyGC_Head)) traverse = g.traverseproc() gc = ctypes.cast(containers.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(containers, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.assignPtr(traverse, (ctypes.cast(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0)) (helpers.checkedFuncPtrCall(traverse, ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), helpers.makeFuncPtr(g.visitproc, g.visit_decref), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p)), None)[1] del traverse del gc del containers return @staticmethod def visit_reachable(op, reachable): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) reachable = ctypes.cast(reachable, ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, op).value)).value)).value: gc = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) gc_refs = g.Py_ssize_t(int(gc.contents.gc.gc_refs.value)) if ctypes_wrapped.c_int((gc_refs.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int(1L)).value) elif ctypes_wrapped.c_int((gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value)).value: g.gc_list_move(gc, reachable) helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int(1L)).value) else: values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((gc_refs.value > ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value)).value or ctypes_wrapped.c_int((gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value))) del gc_refs del gc return ctypes_wrapped.c_int(int(0L)).value del reachable del op return ctypes_wrapped.c_int().value @staticmethod def move_unreachable(young, unreachable): young = ctypes.cast(young, ctypes.POINTER(g.PyGC_Head)) unreachable = ctypes.cast(unreachable, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.cast(young.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) while ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(young, ctypes_wrapped.c_void_p).value or 0))).value: next_a = ctypes.POINTER(g.PyGC_Head)() if gc.contents.gc.gc_refs.value: op = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) traverse = ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_traverse, g.traverseproc) values.assert_a.value(ctypes_wrapped.c_int((gc.contents.gc.gc_refs.value > ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) (helpers.checkedFuncPtrCall(traverse, op, helpers.makeFuncPtr(g.visitproc, g.visit_reachable), ctypes.cast(young, ctypes_wrapped.c_void_p)), None)[1] helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value: g._PyTuple_MaybeUntrack(op) del traverse del op else: helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) g.gc_list_move(gc, unreachable) helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value) helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(next_a), ctypes_wrapped.c_void_p).value or 0)) del next_a del unreachable del gc del young return @staticmethod def has_finalizer(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(op.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(g.delstr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) return ctypes_wrapped.c_int(((ctypes.cast(intp._getPtr(g._PyInstance_Lookup(op, g.delstr), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((op.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(9L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(((ctypes.cast(op.contents.ob_type.contents.tp_del, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyGen_Type), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(g.PyGen_NeedsFinalizing(ctypes.cast(op, ctypes.POINTER(g.PyGenObject))))).value else: return ctypes_wrapped.c_int(int(0L)).value del op return ctypes_wrapped.c_int().value @staticmethod def untrack_dicts(head): head = ctypes.cast(head, ctypes.POINTER(g.PyGC_Head)) next_a = ctypes.POINTER(g.PyGC_Head)() gc = ctypes.cast(head.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) while ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(head, ctypes_wrapped.c_void_p).value or 0))).value: op = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyDict_Type), ctypes_wrapped.c_void_p).value or 0))).value: g._PyDict_MaybeUntrack(op) helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(next_a), ctypes_wrapped.c_void_p).value or 0)) del op del head del gc del next_a return @staticmethod def move_finalizers(unreachable, finalizers): first_iteration = None unreachable = ctypes.cast(unreachable, ctypes.POINTER(g.PyGC_Head)) finalizers = ctypes.cast(finalizers, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.POINTER(g.PyGC_Head)() next_a = ctypes.POINTER(g.PyGC_Head)() if True: first_iteration = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(unreachable.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(next_a), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(unreachable, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break op = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value))) helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int(g.has_finalizer(op))).value: g.gc_list_move(gc, finalizers) helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) del op del unreachable del gc del next_a del finalizers return @staticmethod def visit_move(op, tolist): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) tolist = ctypes.cast(tolist, ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, op).value)).value)).value: if ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value)).value: gc = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) g.gc_list_move(gc, tolist) helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) del gc return ctypes_wrapped.c_int(int(0L)).value del tolist del op return ctypes_wrapped.c_int().value @staticmethod def move_finalizer_reachable(finalizers): first_iteration = None finalizers = ctypes.cast(finalizers, ctypes.POINTER(g.PyGC_Head)) traverse = g.traverseproc() gc = ctypes.cast(finalizers.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(finalizers, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.assignPtr(traverse, (ctypes.cast(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0)) (helpers.checkedFuncPtrCall(traverse, ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), helpers.makeFuncPtr(g.visitproc, g.visit_move), ctypes.cast(finalizers, ctypes_wrapped.c_void_p)), None)[1] del finalizers del traverse del gc return @staticmethod def handle_weakrefs(unreachable, old): first_iteration_a = None first_iteration = None unreachable = ctypes.cast(unreachable, ctypes.POINTER(g.PyGC_Head)) old = ctypes.cast(old, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.POINTER(g.PyGC_Head)() op = ctypes.POINTER(g.PyObject)() wr = ctypes.POINTER(g.PyWeakReference)() wrcb_to_call = g.PyGC_Head() next_a = ctypes.POINTER(g.PyGC_Head)() num_freed = ctypes_wrapped.c_int() g.gc_list_init(ctypes.pointer(wrcb_to_call)) if True: first_iteration = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(unreachable.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(next_a), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(unreachable, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break wrlist = ctypes.POINTER(ctypes.POINTER(g.PyWeakReference))() helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value))) helpers.assignPtr(next_a, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: continue helpers.assignPtr(wrlist, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(ctypes_wrapped.c_byte)), u'+', ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_weaklistoffset.value), ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes.POINTER(g.PyWeakReference)))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_a = True helpers.assignPtr(wr, (ctypes.cast(intp._storePtr(wrlist.contents), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_a: first_iteration_a = False else: helpers.assignPtr(wr, (ctypes.cast(intp._storePtr(wrlist.contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(wr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break wrasgc = ctypes.POINTER(g.PyGC_Head)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(wr.contents.wr_object, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0)))) g._PyWeakref_ClearRef(wr) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(wr.contents.wr_object, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0)))) if ctypes_wrapped.c_int(((ctypes.cast(wr.contents.wr_callback, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: continue if ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(wr, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value)).value: continue values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(wr, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value))) helpers.postfixInc(ctypes.cast(wr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(wrasgc, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(wr, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(wrasgc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(next_a, ctypes_wrapped.c_void_p).value or 0)))) g.gc_list_move(wrasgc, ctypes.pointer(wrcb_to_call)) del wrasgc del wrlist while ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.gc_list_is_empty(ctypes.pointer(wrcb_to_call)))).value))).value: temp = ctypes.POINTER(g.PyObject)() callback = ctypes.POINTER(g.PyObject)() helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(wrcb_to_call.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_RefType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g._PyWeakref_RefType)))).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_ProxyType), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._PyWeakref_CallableProxyType), ctypes_wrapped.c_void_p).value or 0))).value)).value))) helpers.assignPtr(wr, (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyWeakReference))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(callback, (ctypes.cast(intp._storePtr(wr.contents.wr_callback), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(callback, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(callback, wr, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_WriteUnraisable(callback) else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(temp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(temp, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(wrcb_to_call.gc.gc_next, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0))).value: g.gc_list_move(gc, old) else: helpers.prefixInc(num_freed) del callback del temp return num_freed.value del wrcb_to_call del old del gc del wr del unreachable del next_a del num_freed del op return ctypes_wrapped.c_int().value @staticmethod def debug_instance(msg, inst): msg = ctypes.cast(msg, ctypes.POINTER(ctypes_wrapped.c_byte)) inst = ctypes.cast(inst, ctypes.POINTER(g.PyInstanceObject)) cname = ctypes.POINTER(ctypes_wrapped.c_byte)() classname = ctypes.cast(inst.contents.in_class.contents.cl_name, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(classname, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(classname, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(cname, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_AsString(classname), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(cname, (ctypes.cast(intp._storePtr(intp._make_string('?')), ctypes_wrapped.c_void_p).value or 0)) g.PySys_WriteStderr(ctypes.cast(intp._make_string('gc: %.100s <%.100s instance at %p>\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), msg, cname, inst) del msg del classname del cname del inst return @staticmethod def debug_cycle(msg, op): msg = ctypes.cast(msg, ctypes.POINTER(ctypes_wrapped.c_byte)) op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value and ctypes_wrapped.c_int(((ctypes.cast(op.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.debug_instance(msg, ctypes.cast(op, ctypes.POINTER(g.PyInstanceObject))) elif ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value: g.PySys_WriteStderr(ctypes.cast(intp._make_string('gc: %.100s <%.100s %p>\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), msg, ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, op) del msg del op return @staticmethod def handle_finalizers(finalizers, old): first_iteration = None finalizers = ctypes.cast(finalizers, ctypes.POINTER(g.PyGC_Head)) old = ctypes.cast(old, ctypes.POINTER(g.PyGC_Head)) gc = ctypes.cast(finalizers.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int(((ctypes.cast(g.garbage, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.garbage, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.garbage, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string("gc couldn't create gc.garbage list"), ctypes.POINTER(ctypes_wrapped.c_byte))) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(finalizers, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break op = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value or ctypes_wrapped.c_int(int(g.has_finalizer(op))).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Append(g.garbage, op))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del op g.gc_list_merge(finalizers, old) return ctypes_wrapped.c_int(int(0L)).value del finalizers del old del gc return ctypes_wrapped.c_int().value @staticmethod def delete_garbage(collectable, old): collectable = ctypes.cast(collectable, ctypes.POINTER(g.PyGC_Head)) old = ctypes.cast(old, ctypes.POINTER(g.PyGC_Head)) clear = g.inquiry() while ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.gc_list_is_empty(collectable))).value))).value: gc = ctypes.cast(collectable.contents.gc.gc_next, ctypes.POINTER(g.PyGC_Head)) op = ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(4L)).value))).value))) if ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value: ctypes_wrapped.c_int(int(g.PyList_Append(g.garbage, op))) elif ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(clear, (ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_clear, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.checkedFuncPtrCall(clear, op) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(collectable.contents.gc.gc_next, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0))).value: g.gc_list_move(gc, old) helpers.assign(gc.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) del gc del op del collectable del clear del old return @staticmethod def clear_freelists(): (ctypes_wrapped.c_int(int(g.PyMethod_ClearFreeList())), None)[1] (ctypes_wrapped.c_int(int(g.PyFrame_ClearFreeList())), None)[1] (ctypes_wrapped.c_int(int(g.PyCFunction_ClearFreeList())), None)[1] (ctypes_wrapped.c_int(int(g.PyTuple_ClearFreeList())), None)[1] (ctypes_wrapped.c_int(int(g.PyInt_ClearFreeList())), None)[1] (ctypes_wrapped.c_int(int(g.PyFloat_ClearFreeList())), None)[1] return @staticmethod def get_time(): result = ctypes_wrapped.c_double() if ctypes_wrapped.c_int(((ctypes.cast(g.tmod, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: f = ctypes.cast(intp._getPtr(g.PyObject_CallMethod(g.tmod, ctypes.cast(intp._make_string('time'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFloat_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFloat_Type)))).value)).value: helpers.assign(result, ctypes_wrapped.c_double(g.PyFloat_AsDouble(f)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(f, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(f, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del f return result.value del result return ctypes_wrapped.c_double().value @staticmethod def collect(generation): first_iteration_d = None first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None generation = ctypes_wrapped.c_int(int(generation.value)) i = ctypes_wrapped.c_int() m = g.Py_ssize_t() n = g.Py_ssize_t() young = ctypes.POINTER(g.PyGC_Head)() old = ctypes.POINTER(g.PyGC_Head)() unreachable = g.PyGC_Head() finalizers = g.PyGC_Head() gc = ctypes.POINTER(g.PyGC_Head)() t1 = ctypes_wrapped.c_double() if ctypes_wrapped.c_int(((ctypes.cast(g.delstr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.delstr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__del__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.delstr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('gc couldn\'t allocate "__del__"'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value))).value: g.PySys_WriteStderr(ctypes.cast(intp._make_string('gc: collecting generation %d...\n'), ctypes.POINTER(ctypes_wrapped.c_byte)), generation) g.PySys_WriteStderr(ctypes.cast(intp._make_string('gc: objects in each generation:'), ctypes.POINTER(ctypes_wrapped.c_byte))) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(3L)).value)).value: pass else: break g.PySys_WriteStderr(ctypes.cast(intp._make_string(' %ld'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(g.gc_list_size(ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', i.value).contents.head))))) helpers.assign(t1, ctypes_wrapped.c_double(g.get_time()).value) g.PySys_WriteStderr(ctypes.cast(intp._make_string('\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((generation.value + ctypes_wrapped.c_int(int(1L)).value))).value < ctypes_wrapped.c_int(int(3L)).value)).value: helpers.augAssign(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_uint(int((generation.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.count, u'+=', ctypes_wrapped.c_int(int(1L)).value) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value <= generation.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(g.generations, '+', i.value).contents.count, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_b: first_iteration_b = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < generation.value)).value: pass else: break g.gc_list_merge(ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', i.value).contents.head), ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', generation.value).contents.head)) helpers.assignPtr(young, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', generation.value).contents.head)), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((generation.value < ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assignPtr(old, (ctypes.cast(intp._storePtr(ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_uint(int((generation.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.head)), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(old, (ctypes.cast(intp._storePtr(young), ctypes_wrapped.c_void_p).value or 0)) g.update_refs(young) g.subtract_refs(young) g.gc_list_init(ctypes.pointer(unreachable)) g.move_unreachable(young, ctypes.pointer(unreachable)) if ctypes_wrapped.c_int(((ctypes.cast(young, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(old, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((generation.value == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(2L)).value))).value)).value: helpers.augAssign(g.long_lived_pending, u'+=', g.Py_ssize_t(int(g.gc_list_size(young))).value) g.gc_list_merge(young, old) else: g.untrack_dicts(young) helpers.assign(g.long_lived_pending, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(g.long_lived_total, g.Py_ssize_t(int(g.gc_list_size(young))).value) g.gc_list_init(ctypes.pointer(finalizers)) g.move_finalizers(ctypes.pointer(unreachable), ctypes.pointer(finalizers)) g.move_finalizer_reachable(ctypes.pointer(finalizers)) if True: first_iteration_c = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(unreachable.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_c: first_iteration_c = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(unreachable), ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.postfixInc(m) if ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value: g.debug_cycle(ctypes.cast(intp._make_string('collectable'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))) helpers.augAssign(m, u'+=', ctypes_wrapped.c_int(int(g.handle_weakrefs(ctypes.pointer(unreachable), old))).value) g.delete_garbage(ctypes.pointer(unreachable), old) if True: first_iteration_d = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(finalizers.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_d: first_iteration_d = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(finalizers), ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.postfixInc(n) if ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(2L)).value))).value))).value: g.debug_cycle(ctypes.cast(intp._make_string('uncollectable'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_uint(int((g.debug.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value))).value: t2 = ctypes_wrapped.c_double(ctypes_wrapped.c_double(g.get_time()).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((m.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PySys_WriteStderr(ctypes.cast(intp._make_string('gc: done'), ctypes.POINTER(ctypes_wrapped.c_byte))) else: g.PySys_WriteStderr(ctypes.cast(intp._make_string('gc: done, %ld unreachable, %ld uncollectable'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int((n.value + m.value))), n) if ctypes_wrapped.c_int((t1.value and t2.value)).value: g.PySys_WriteStderr(ctypes.cast(intp._make_string(', %.4fs elapsed'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_double((t2.value - t1.value))) g.PySys_WriteStderr(ctypes.cast(intp._make_string('.\n'), ctypes.POINTER(ctypes_wrapped.c_byte))) del t2 (ctypes_wrapped.c_int(int(g.handle_finalizers(ctypes.pointer(finalizers), old))), None)[1] if ctypes_wrapped.c_int((generation.value == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(1L)).value))).value)).value: g.clear_freelists() if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int(((ctypes.cast(g.gc_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.gc_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('garbage collection'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyErr_WriteUnraisable(g.gc_str) g.Py_FatalError(ctypes.cast(intp._make_string('unexpected exception during garbage collection'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_long(int((n.value + m.value))).value del old del finalizers del generation del m del young del n del i del gc del unreachable del t1 return g.Py_ssize_t().value @staticmethod def collect_generations(): first_iteration = None i = ctypes_wrapped.c_int() n = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration: first_iteration = False else: helpers.postfixDec(i) if ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(g.generations, '+', i.value).contents.count.value > helpers.ptrArithmetic(g.generations, '+', i.value).contents.threshold.value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int((g.long_lived_pending.value < ctypes_wrapped.c_ulong(int((g.long_lived_total.value / ctypes_wrapped.c_int(int(4L)).value))).value)).value)).value: continue helpers.assign(n, g.Py_ssize_t(int(g.collect(i))).value) break return n.value del i del n return g.Py_ssize_t().value gc_enable__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_enable__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_enable(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) helpers.assign(g.enabled, ctypes_wrapped.c_int(int(1L)).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_disable__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_disable__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_disable(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) helpers.assign(g.enabled, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_isenabled__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_isenabled__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_isenabled(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(g.enabled.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_collect__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_collect__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_collect(self, args, kws): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kws = ctypes.cast(kws, ctypes.POINTER(g.PyObject)) keywords = (ctypes.POINTER(ctypes_wrapped.c_byte) * 2)(ctypes.cast(intp._make_string('generation'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) genarg = ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(1L)).value))).value)) n = g.Py_ssize_t() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kws, ctypes.cast(intp._make_string('|i'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(keywords, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(genarg)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((genarg.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((genarg.value >= ctypes_wrapped.c_int(int(3L)).value)).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('invalid generation'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if g.collecting.value: helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assign(g.collecting, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(n, g.Py_ssize_t(int(g.collect(genarg))).value) helpers.assign(g.collecting, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del genarg del self del args del n del kws del keywords return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_set_debug__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_set_debug__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_set_debug(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('i:set_debug'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(g.debug)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_get_debug__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_get_debug__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_get_debug(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('i'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.debug), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_set_thresh__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_set_thresh__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_set_thresh(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('i|ii:set_threshold'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.threshold), ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(1L)).value).contents.threshold), ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(2L)).value).contents.threshold)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(2L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(3L)).value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(g.generations, '+', i.value).contents.threshold, helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(2L)).value).contents.threshold.value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del i del self del args return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_get_thresh__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_get_thresh__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_get_thresh(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(iii)'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.threshold, helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(1L)).value).contents.threshold, helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(2L)).value).contents.threshold), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_get_count__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_get_count__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_get_count(self, noargs): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_BuildValue(ctypes.cast(intp._make_string('(iii)'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.count, helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(1L)).value).contents.count, helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(2L)).value).contents.count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del noargs del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def referrersvisit(obj, objs): first_iteration = None obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) objs = ctypes.cast(objs, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(objs, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ctypes.cast(objs, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del i del objs del obj return ctypes_wrapped.c_int().value @staticmethod def gc_referrers_for(objs, list_a, resultlist): first_iteration = None objs = ctypes.cast(objs, ctypes.POINTER(g.PyObject)) list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyGC_Head)) resultlist = ctypes.cast(resultlist, ctypes.POINTER(g.PyObject)) gc = ctypes.POINTER(g.PyGC_Head)() obj = ctypes.POINTER(g.PyObject)() traverse = g.traverseproc() if True: first_iteration = True helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(list_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(gc, (ctypes.cast(intp._storePtr(gc.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(gc, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(list_a, ctypes_wrapped.c_void_p).value or 0))).value: pass else: break helpers.assignPtr(obj, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(gc, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(traverse, (ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(objs, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(resultlist, ctypes_wrapped.c_void_p).value or 0))).value)).value: continue if helpers.checkedFuncPtrCall(traverse, obj, helpers.makeFuncPtr(g.visitproc, g.referrersvisit), ctypes.cast(objs, ctypes_wrapped.c_void_p)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Append(resultlist, obj))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(1L)).value del objs del obj del traverse del resultlist del list_a del gc return ctypes_wrapped.c_int().value gc_get_referrers__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_get_referrers__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_get_referrers(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = ctypes_wrapped.c_int() result = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(3L)).value)).value: pass else: break if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.gc_referrers_for(args, ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', i.value).contents.head), result))).value))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del i del self del args del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def referentsvisit(obj, list_a): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) list_a = ctypes.cast(list_a, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyList_Append(list_a, obj))).value < ctypes_wrapped.c_int(int(0L)).value)).value del list_a del obj return ctypes_wrapped.c_int().value gc_get_referents__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_get_referents__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_get_referents(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() result = ctypes.cast(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break traverse = g.traverseproc() obj = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, obj).value)).value)).value)).value: continue helpers.assignPtr(traverse, (ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_traverse, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(traverse, ctypes_wrapped.c_void_p).value or 0))).value: continue if helpers.checkedFuncPtrCall(traverse, obj, helpers.makeFuncPtr(g.visitproc, g.referentsvisit), ctypes.cast(result, ctypes_wrapped.c_void_p)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del traverse del obj return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del i del self del args del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_get_objects__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_get_objects__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_get_objects(self, noargs): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) noargs = ctypes.cast(noargs, ctypes.POINTER(g.PyObject)) i = ctypes_wrapped.c_int() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(3L)).value)).value: pass else: break if ctypes_wrapped.c_int(int(g.append_objects(result, ctypes.pointer(helpers.ptrArithmetic(g.generations, '+', i.value).contents.head)))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del noargs del i del self del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc_is_tracked__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc_is_tracked__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def gc_is_tracked(self, obj): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or helpers.checkedFuncPtrCall(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_is_gc, obj).value)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(obj, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del self del obj del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) gc__doc__ = (ctypes_wrapped.c_byte * 1)() # TODO init gc__doc__ with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) GcMethods = (PyMethodDef * 14)() # TODO init GcMethods with (PyMethodDef * 14)(structs.PyMethodDef(ctypes.cast(intp._make_string('enable'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_enable), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_enable__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('disable'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_disable), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_disable__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('isenabled'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_isenabled), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_isenabled__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('set_debug'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_set_debug), ctypes_wrapped.c_int(int(1L)), ctypes.cast(gc_set_debug__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get_debug'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_get_debug), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_get_debug__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get_count'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_get_count), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_get_count__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('set_threshold'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_set_thresh), ctypes_wrapped.c_int(int(1L)), ctypes.cast(gc_set_thresh__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get_threshold'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_get_thresh), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_get_thresh__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('collect'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, gc_collect), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(gc_collect__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get_objects'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_get_objects), ctypes_wrapped.c_int(int(4L)), ctypes.cast(gc_get_objects__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('is_tracked'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_is_tracked), ctypes_wrapped.c_int(int(8L)), ctypes.cast(gc_is_tracked__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get_referrers'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_get_referrers), ctypes_wrapped.c_int(int(1L)), ctypes.cast(gc_get_referrers__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get_referents'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), gc_get_referents), ctypes_wrapped.c_int(int(1L)), ctypes.cast(gc_get_referents__doc__, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) @staticmethod def initgc(): m = ctypes.POINTER(g.PyObject)() helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_InitModule4_64(ctypes.cast(intp._make_string('gc'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(g.GcMethods, ctypes.POINTER(g.PyMethodDef)), ctypes.cast(g.gc__doc__, ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_int(int(1013L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int(((ctypes.cast(g.garbage, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.garbage, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.garbage, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.postfixInc(ctypes.cast(g.garbage, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddObject(m, ctypes.cast(intp._make_string('garbage'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.garbage))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int(((ctypes.cast(g.tmod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.tmod, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_ImportModuleNoBlock(ctypes.cast(intp._make_string('time'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.tmod, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 0 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 1 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 2 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(2L)).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 3 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 4 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 5 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddIntConstant(m, ctypes.cast(intp._make_string('( 1 << 1 ) | ( 1 << 2 ) | ( 1 << 3 ) | ( 1 << 4 ) | ( 1 << 5 )'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(2L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return del m return @staticmethod def PyGC_Collect(): n = g.Py_ssize_t() if g.collecting.value: helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assign(g.collecting, ctypes_wrapped.c_int(int(1L)).value) helpers.assign(n, g.Py_ssize_t(int(g.collect(ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(3L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))))).value) helpers.assign(g.collecting, ctypes_wrapped.c_int(int(0L)).value) return n.value del n return g.Py_ssize_t().value @staticmethod def _PyGC_Dump(g_a): g_a = ctypes.cast(g_a, ctypes.POINTER(g.PyGC_Head)) g._PyObject_Dump(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(g_a, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))) del g_a return @staticmethod def PyObject_GC_Track(op): op = ctypes.cast(op, ctypes_wrapped.c_void_p) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break del op return @staticmethod def _PyObject_GC_Track(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) g.PyObject_GC_Track(ctypes.cast(op, ctypes_wrapped.c_void_p)) del op return @staticmethod def PyObject_GC_UnTrack(op): op = ctypes.cast(op, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break del op return @staticmethod def _PyObject_GC_UnTrack(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) g.PyObject_GC_UnTrack(ctypes.cast(op, ctypes_wrapped.c_void_p)) del op return @staticmethod def _PyObject_GC_Malloc(basicsize): basicsize = ctypes_wrapped.c_ulong(int(basicsize.value)) op = ctypes.POINTER(g.PyObject)() g_a = ctypes.POINTER(g.PyGC_Head)() if ctypes_wrapped.c_int((basicsize.value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_size_t(32).value))).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(g_a, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value + basicsize.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value + basicsize.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value + basicsize.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyGC_Head))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.postfixInc(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.count) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.count.value > helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.threshold.value)).value and g.enabled.value)).value and helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.threshold.value)).value and ctypes_wrapped.c_int(int((not g.collecting.value))).value)).value and ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assign(g.collecting, ctypes_wrapped.c_int(int(1L)).value) g.Py_ssize_t(int(g.collect_generations())) helpers.assign(g.collecting, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(g_a, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del g_a del basicsize del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_GC_New(tp): tp = ctypes.cast(tp, ctypes.POINTER(g.PyTypeObject)) op = ctypes.cast(intp._getPtr(g._PyObject_GC_Malloc(ctypes_wrapped.c_ulong(int(tp.contents.tp_basicsize.value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(op, (ctypes.cast(intp._storePtr(((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(tp), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1]), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del tp del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_GC_NewVar(tp, nitems): tp = ctypes.cast(tp, ctypes.POINTER(g.PyTypeObject)) nitems = g.Py_ssize_t(int(nitems.value)) size = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((tp.contents.tp_basicsize.value + ctypes_wrapped.c_long(int((nitems.value * tp.contents.tp_itemsize.value))).value))).value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value)).value)) op = ctypes.cast(ctypes.cast(intp._getPtr(g._PyObject_GC_Malloc(size), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyVarObject)), ctypes.POINTER(g.PyVarObject)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(op, (ctypes.cast(intp._storePtr((helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, nitems.value), ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(tp), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1])[1]), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del op del nitems del tp del size return (ctypes.cast(ctypes.POINTER(g.PyVarObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_GC_Resize(op, nitems): op = ctypes.cast(op, ctypes.POINTER(g.PyVarObject)) nitems = g.Py_ssize_t(int(nitems.value)) basicsize = ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_basicsize.value + ctypes_wrapped.c_long(int((nitems.value * ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_itemsize.value))).value))).value + ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value))).value)).value)) g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((basicsize.value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value - ctypes_wrapped.c_size_t(32).value))).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyVarObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(g_a, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value + basicsize.value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.realloc.value(g_a, (ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value + basicsize.value))).value)) if ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(32).value + basicsize.value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(g.PyGC_Head))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyVarObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(ctypes.cast(g_a, ctypes.POINTER(g.PyGC_Head)), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyVarObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, nitems.value) return (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0) del basicsize del g_a del nitems del op return (ctypes.cast(ctypes.POINTER(g.PyVarObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_GC_Del(op): op = ctypes.cast(op, ctypes_wrapped.c_void_p) g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value).contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.gc_list_remove(g_a) if ctypes_wrapped.c_int((helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.count.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixDec(helpers.ptrArithmetic(g.generations, '+', ctypes_wrapped.c_int(int(0L)).value).contents.count) values.free.value(g_a) del g_a del op return @staticmethod def _PyObject_GC_Del(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) g.PyObject_GC_Del(ctypes.cast(op, ctypes_wrapped.c_void_p)) del op return @staticmethod def descr_dealloc(descr): descr = ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(descr, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_type, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr.contents.d_name, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr.contents.d_name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr.contents.d_name, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(descr, ctypes_wrapped.c_void_p)) del descr return @staticmethod def descr_name(descr): descr = ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(descr.contents.d_name, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(descr.contents.d_name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._make_string('?')), ctypes_wrapped.c_void_p).value or 0) del descr return (ctypes.cast(ctypes.POINTER(ctypes_wrapped.c_byte)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def descr_repr(descr, format_a): descr = ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(format_a, intp._getPtr(g.descr_name(descr), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del format_a del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def method_repr(descr): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMethodDescrObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.descr_repr(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), ctypes.cast(intp._make_string(""), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def member_repr(descr): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMemberDescrObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.descr_repr(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), ctypes.cast(intp._make_string(""), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def getset_repr(descr): descr = ctypes.cast(descr, ctypes.POINTER(g.PyGetSetDescrObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.descr_repr(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), ctypes.cast(intp._make_string(""), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrapperdescr_repr(descr): descr = ctypes.cast(descr, ctypes.POINTER(g.PyWrapperDescrObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.descr_repr(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), ctypes.cast(intp._make_string(""), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def descr_check(descr, obj, pres): descr = ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) pres = ctypes.cast(pres, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(pres.contents, (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(descr.contents.d_type, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, descr.contents.d_type))).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' for '%s' objects doesn't apply to '%s' object"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, obj.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) helpers.assignPtr(pres.contents, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del obj del pres del descr return ctypes_wrapped.c_int().value @staticmethod def classmethod_get(descr, obj, type_a): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMethodDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(ctypes.cast(obj.contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' for type '%s' needs either an object or a type"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' for type '%s' needs a type, not a '%s' as arg 2"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, type_a.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)), descr.contents.d_type))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' for type '%s' doesn't apply to type '%s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)).contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(descr.contents.d_method, type_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del obj del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def method_get(descr, obj, type_a): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMethodDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.descr_check(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), obj, ctypes.pointer(res)))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(descr.contents.d_method, obj, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del type_a del obj del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def member_get(descr, obj, type_a): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMemberDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.descr_check(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), obj, ctypes.pointer(res)))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyMember_GetOne(ctypes.cast(obj, ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_member), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del type_a del obj del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def getset_get(descr, obj, type_a): descr = ctypes.cast(descr, ctypes.POINTER(g.PyGetSetDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.descr_check(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), obj, ctypes.pointer(res)))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_getset.contents.get, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(descr.contents.d_getset.contents.get, obj, descr.contents.d_getset.contents.closure), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("attribute '%.300s' of '%.100s' objects is not readable"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del res del type_a del obj del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrapperdescr_get(descr, obj, type_a): descr = ctypes.cast(descr, ctypes.POINTER(g.PyWrapperDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.descr_check(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), obj, ctypes.pointer(res)))).value: return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyWrapper_New(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del type_a del obj del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def descr_setcheck(descr, obj, value, pres): descr = ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) pres = ctypes.cast(pres, ctypes.POINTER(ctypes_wrapped.c_int)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(descr.contents.d_type, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type, descr.contents.d_type))).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%.200s' for '%.100s' objects doesn't apply to '%.100s' object"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(descr), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, obj.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) helpers.assign(pres.contents, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) return ctypes_wrapped.c_int(int(1L)).value return ctypes_wrapped.c_int(int(0L)).value del pres del obj del value del descr return ctypes_wrapped.c_int().value @staticmethod def member_set(descr, obj, value): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMemberDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int(g.descr_setcheck(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), obj, value, ctypes.pointer(res)))).value: return res.value return ctypes_wrapped.c_int(int(g.PyMember_SetOne(ctypes.cast(obj, ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_member, value))).value del res del obj del value del descr return ctypes_wrapped.c_int().value @staticmethod def getset_set(descr, obj, value): descr = ctypes.cast(descr, ctypes.POINTER(g.PyGetSetDescrObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int(g.descr_setcheck(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject)), obj, value, ctypes.pointer(res)))).value: return res.value if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_getset.contents.set, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return helpers.checkedFuncPtrCall(descr.contents.d_getset.contents.set, obj, value, descr.contents.d_getset.contents.closure).value intp._getPtr(g.PyErr_Format(g.PyExc_AttributeError, ctypes.cast(intp._make_string("attribute '%.300s' of '%.100s' objects is not writable"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del res del obj del value del descr return ctypes_wrapped.c_int().value @staticmethod def methoddescr_call(descr, args, kwds): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMethodDescrObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) argc = g.Py_ssize_t() self = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(argc, ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((argc.value < ctypes_wrapped.c_int(int(1L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%.300s' of '%.100s' object needs an argument"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(self, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyObject_RealIsSubclass(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)), ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject))))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%.200s' requires a '%.100s' object but received a '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, self.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(descr.contents.d_method, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetSlice(args, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), argc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(func, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del kwds del descr del self del args del result del func del argc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def classmethoddescr_call(descr, args, kwds): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMethodDescrObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) argc = g.Py_ssize_t() self = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(argc, ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((argc.value < ctypes_wrapped.c_int(int(1L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' of '%.100s' object needs an argument"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(self, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' requires a type but received a '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), self.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(self, ctypes.POINTER(g.PyTypeObject)), descr.contents.d_type))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%s' requires a subtype of '%.100s' but received '%.100s"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, self.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(descr.contents.d_method, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetSlice(args, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), argc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(func, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del kwds del descr del self del args del result del func del argc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrapperdescr_call(descr, args, kwds): descr = ctypes.cast(descr, ctypes.POINTER(g.PyWrapperDescrObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) argc = g.Py_ssize_t() self = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(argc, ctypes.cast(args, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((argc.value < ctypes_wrapped.c_int(int(1L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%.300s' of '%.100s' object needs an argument"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(self, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g._PyObject_RealIsSubclass(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)), ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject))))).value))).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("descriptor '%.200s' requires a '%.100s' object but received a '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.descr_name(ctypes.cast(descr, ctypes.POINTER(g.PyDescrObject))), ctypes.POINTER(ctypes_wrapped.c_byte)), descr.contents.d_type.contents.tp_name, self.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyWrapper_New(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_GetSlice(args, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), argc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(func, args, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del kwds del descr del self del args del result del func del argc return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def method_get_doc(descr, closure): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMethodDescrObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_method.contents.ml_doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(descr.contents.d_method.contents.ml_doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del closure del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) descr_members = (PyMemberDef * 3)() # TODO init descr_members with (PyMemberDef * 3)(structs.PyMemberDef(ctypes.cast(intp._make_string('__objclass__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__name__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(24)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) method_getset = (PyGetSetDef * 2)() # TODO init method_getset with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, method_get_doc)), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def member_get_doc(descr, closure): descr = ctypes.cast(descr, ctypes.POINTER(g.PyMemberDescrObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_member.contents.doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(descr.contents.d_member.contents.doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del closure del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) member_getset = (PyGetSetDef * 2)() # TODO init member_getset with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, member_get_doc)), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def getset_get_doc(descr, closure): descr = ctypes.cast(descr, ctypes.POINTER(g.PyGetSetDescrObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_getset.contents.doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(descr.contents.d_getset.contents.doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del closure del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getset_getset = (PyGetSetDef * 2)() # TODO init getset_getset with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, getset_get_doc)), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def wrapperdescr_get_doc(descr, closure): descr = ctypes.cast(descr, ctypes.POINTER(g.PyWrapperDescrObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_base.contents.doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(descr.contents.d_base.contents.doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del closure del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) wrapperdescr_getset = (PyGetSetDef * 2)() # TODO init wrapperdescr_getset with (PyGetSetDef * 2)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, wrapperdescr_get_doc)), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def descr_traverse(self, visit, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) descr = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyDescrObject)), ctypes.POINTER(g.PyDescrObject)) while True: if (ctypes.cast(descr.contents.d_type, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del self del visit del descr del arg return ctypes_wrapped.c_int().value PyMethodDescr_Type = PyTypeObject() # TODO init PyMethodDescr_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('method_descriptor'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, descr_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, method_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ternaryfunc, methoddescr_call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), descr_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(descr_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(method_getset, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(descrgetfunc, method_get), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) PyClassMethodDescr_Type = PyTypeObject() # TODO init PyClassMethodDescr_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('classmethod_descriptor'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, descr_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, method_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ternaryfunc, classmethoddescr_call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), descr_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(descr_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(method_getset, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(descrgetfunc, classmethod_get), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) PyMemberDescr_Type = PyTypeObject() # TODO init PyMemberDescr_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('member_descriptor'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, descr_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, member_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), descr_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(descr_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(member_getset, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(descrgetfunc, member_get), helpers.makeFuncPtr(descrsetfunc, member_set)) PyGetSetDescr_Type = PyTypeObject() # TODO init PyGetSetDescr_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('getset_descriptor'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, descr_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, getset_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), descr_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(descr_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(getset_getset, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(descrgetfunc, getset_get), helpers.makeFuncPtr(descrsetfunc, getset_set)) PyWrapperDescr_Type = PyTypeObject() # TODO init PyWrapperDescr_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('wrapper_descriptor'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(48).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, descr_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, wrapperdescr_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ternaryfunc, wrapperdescr_call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), descr_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(descr_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(wrapperdescr_getset, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(descrgetfunc, wrapperdescr_get), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) @staticmethod def descr_new(descrtype, type_a, name): descrtype = ctypes.cast(descrtype, ctypes.POINTER(g.PyTypeObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) descr = ctypes.POINTER(g.PyDescrObject)() helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyType_GenericAlloc(descrtype, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(descr.contents.d_type, (ctypes.cast(intp._storePtr(type_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(descr.contents.d_name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr.contents.d_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(descr, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(descr), ctypes_wrapped.c_void_p).value or 0) del descrtype del type_a del descr del name return (ctypes.cast(ctypes.POINTER(g.PyDescrObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDescr_NewMethod(type_a, method): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) method = ctypes.cast(method, ctypes.POINTER(g.PyMethodDef)) descr = ctypes.POINTER(g.PyMethodDescrObject)() helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.descr_new(ctypes.pointer(g.PyMethodDescr_Type), type_a, method.contents.ml_name), ctypes.POINTER(g.PyDescrObject)), ctypes.POINTER(g.PyMethodDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(descr.contents.d_method, (ctypes.cast(intp._storePtr(method), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del method del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDescr_NewClassMethod(type_a, method): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) method = ctypes.cast(method, ctypes.POINTER(g.PyMethodDef)) descr = ctypes.POINTER(g.PyMethodDescrObject)() helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.descr_new(ctypes.pointer(g.PyClassMethodDescr_Type), type_a, method.contents.ml_name), ctypes.POINTER(g.PyDescrObject)), ctypes.POINTER(g.PyMethodDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(descr.contents.d_method, (ctypes.cast(intp._storePtr(method), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del method del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDescr_NewMember(type_a, member): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) member = ctypes.cast(member, ctypes.POINTER(g.PyMemberDef)) descr = ctypes.POINTER(g.PyMemberDescrObject)() helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.descr_new(ctypes.pointer(g.PyMemberDescr_Type), type_a, member.contents.name), ctypes.POINTER(g.PyDescrObject)), ctypes.POINTER(g.PyMemberDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(descr.contents.d_member, (ctypes.cast(intp._storePtr(member), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del member del type_a del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDescr_NewGetSet(type_a, getset): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) getset = ctypes.cast(getset, ctypes.POINTER(g.PyGetSetDef)) descr = ctypes.POINTER(g.PyGetSetDescrObject)() helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.descr_new(ctypes.pointer(g.PyGetSetDescr_Type), type_a, getset.contents.name), ctypes.POINTER(g.PyDescrObject)), ctypes.POINTER(g.PyGetSetDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(descr.contents.d_getset, (ctypes.cast(intp._storePtr(getset), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del type_a del getset del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyDescr_NewWrapper(type_a, base, wrapped): type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyTypeObject)) base = ctypes.cast(base, ctypes.POINTER(structs.wrapperbase)) wrapped = ctypes.cast(wrapped, ctypes_wrapped.c_void_p) descr = ctypes.POINTER(g.PyWrapperDescrObject)() helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.descr_new(ctypes.pointer(g.PyWrapperDescr_Type), type_a, base.contents.name), ctypes.POINTER(g.PyDescrObject)), ctypes.POINTER(g.PyWrapperDescrObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(descr, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(descr.contents.d_base, (ctypes.cast(intp._storePtr(base), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(descr.contents.d_wrapped, (ctypes.cast(intp._storePtr(wrapped), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(descr, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wrapped del type_a del base del descr return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) proxyobject = structs._anonymous_proxyobject @staticmethod def proxy_len(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return g.Py_ssize_t(int(g.PyObject_Size(pp.contents.dict))).value del pp return g.Py_ssize_t().value @staticmethod def proxy_getitem(pp, key): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(pp.contents.dict, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp del key return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) proxy_as_mapping = PyMappingMethods() # TODO init proxy_as_mapping with PyMappingMethods(helpers.makeFuncPtr(lenfunc, proxy_len), helpers.makeFuncPtr(binaryfunc, proxy_getitem), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) @staticmethod def proxy_contains(pp, key): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.PyDict_Contains(pp.contents.dict, key))).value del pp del key return ctypes_wrapped.c_int().value proxy_as_sequence = PySequenceMethods() # TODO init proxy_as_sequence with PySequenceMethods(ctypes.CFUNCTYPE(helpers.fixReturnType(Py_ssize_t), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), Py_ssize_t, Py_ssize_t, ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(objobjproc, proxy_contains), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), Py_ssize_t)(ctypes_wrapped.c_int(int(0L)).value)) @staticmethod def proxy_has_key(pp, key): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) res = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyDict_Contains(pp.contents.dict, key))).value)) if ctypes_wrapped.c_int((res.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBool_FromLong(ctypes_wrapped.c_long(int(res.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del pp del key return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_get(pp, args): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) key = ctypes.POINTER(g.PyObject)() def_a = ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string('get'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(key), ctypes.pointer(def_a)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('get'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('(OO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), key, def_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp del args del def_a del key return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_keys(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_values(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('values'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_items(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('items'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_iterkeys(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('iterkeys'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_itervalues(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('itervalues'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_iteritems(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('iteritems'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_copy(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallMethod(pp.contents.dict, ctypes.cast(intp._make_string('copy'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) proxy_methods = (PyMethodDef * 10)() # TODO init proxy_methods with (PyMethodDef * 10)(structs.PyMethodDef(ctypes.cast(intp._make_string('has_key'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_has_key), ctypes_wrapped.c_int(int(8L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('get'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_get), ctypes_wrapped.c_int(int(1L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('keys'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_keys), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('values'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_values), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('items'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_items), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('iterkeys'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_iterkeys), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('itervalues'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_itervalues), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('iteritems'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_iteritems), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('copy'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, proxy_copy), ctypes_wrapped.c_int(int(4L)), ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def proxy_dealloc(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(pp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pp.contents.dict, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pp.contents.dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pp.contents.dict, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(pp, ctypes_wrapped.c_void_p)) del pp return @staticmethod def proxy_getiter(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(pp.contents.dict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_str(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(pp.contents.dict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_repr(pp): pp = ctypes.cast(pp, ctypes.POINTER(g.proxyobject)) dictrepr = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(dictrepr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(pp.contents.dict), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dictrepr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string('dict_proxy(%s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(dictrepr, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(dictrepr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(dictrepr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(dictrepr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del dictrepr del pp del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def proxy_traverse(self, visit, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) pp = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.proxyobject)), ctypes.POINTER(g.proxyobject)) while True: if (ctypes.cast(pp.contents.dict, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pp.contents.dict, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del self del visit del pp del arg return ctypes_wrapped.c_int().value @staticmethod def proxy_compare(v, w): v = ctypes.cast(v, ctypes.POINTER(g.proxyobject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.PyObject_Compare(v.contents.dict, w))).value del w del v return ctypes_wrapped.c_int().value @staticmethod def proxy_richcompare(v, w, op): v = ctypes.cast(v, ctypes.POINTER(g.proxyobject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_RichCompare(v.contents.dict, w, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) PyDictProxy_Type = PyTypeObject() # TODO init PyDictProxy_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('dictproxy'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(24).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, proxy_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(cmpfunc, proxy_compare), helpers.makeFuncPtr(reprfunc, proxy_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), ctypes.pointer(proxy_as_sequence), ctypes.pointer(proxy_as_mapping), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, proxy_str), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), proxy_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(richcmpfunc, proxy_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(getiterfunc, proxy_getiter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(proxy_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) @staticmethod def PyDictProxy_New(dict_a): dict_a = ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)) pp = ctypes.POINTER(g.proxyobject)() helpers.assignPtr(pp, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyDictProxy_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.proxyobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(pp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(dict_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(pp.contents.dict, (ctypes.cast(intp._storePtr(dict_a), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(pp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(pp, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del dict_a del pp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) wrapperobject = structs._anonymous_wrapperobject @staticmethod def wrapper_dealloc(wp): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) g.PyObject_GC_UnTrack(ctypes.cast(wp, ctypes_wrapped.c_void_p)) while True: _tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value < ctypes_wrapped.c_int(int(50L)).value)).value)).value: if (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0): helpers.prefixInc(_tstate.contents.trash_delete_nesting) while True: if ctypes_wrapped.c_int(((ctypes.cast(wp.contents.descr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(wp.contents.descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(wp.contents.descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(wp.contents.descr, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(wp.contents.self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(wp.contents.self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(wp.contents.self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(wp.contents.self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(wp, ctypes_wrapped.c_void_p)) if (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0): helpers.prefixDec(_tstate.contents.trash_delete_nesting) if ctypes_wrapped.c_int(((ctypes.cast(_tstate.contents.trash_delete_later, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value <= ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyTrash_thread_destroy_chain() else: g._PyTrash_thread_deposit_object(ctypes.cast(wp, ctypes.POINTER(g.PyObject))) del _tstate if ctypes_wrapped.c_int(int(0L)).value: continue else: break del wp return @staticmethod def wrapper_compare(a, b): a = ctypes.cast(a, ctypes.POINTER(g.wrapperobject)) b = ctypes.cast(b, ctypes.POINTER(g.wrapperobject)) if ctypes_wrapped.c_int(((ctypes.cast(a.contents.descr, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b.contents.descr, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(g.PyObject_Compare(a.contents.self, b.contents.self))).value else: return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(((ctypes.cast(a.contents.descr, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(b.contents.descr, ctypes_wrapped.c_void_p).value or 0))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value))).value del a del b return ctypes_wrapped.c_int().value @staticmethod def wrapper_hash(wp): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) x = ctypes_wrapped.c_int() y = ctypes_wrapped.c_int() helpers.assign(x, ctypes_wrapped.c_long(int(g._Py_HashPointer(ctypes.cast(wp.contents.descr, ctypes_wrapped.c_void_p)))).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(y, ctypes_wrapped.c_long(int(g.PyObject_Hash(wp.contents.self))).value) if ctypes_wrapped.c_int((y.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(x, ctypes_wrapped.c_int(int((x.value ^ y.value))).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return x.value del y del x del wp return ctypes_wrapped.c_long().value @staticmethod def wrapper_repr(wp): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string(""), ctypes.POINTER(ctypes_wrapped.c_byte)), wp.contents.descr.contents.d_base.contents.name, wp.contents.self.contents.ob_type.contents.tp_name, wp.contents.self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) wrapper_members = (PyMemberDef * 2)() # TODO init wrapper_members with (PyMemberDef * 2)(structs.PyMemberDef(ctypes.cast(intp._make_string('__self__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(24)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def wrapper_objclass(wp): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) c = ctypes.cast(ctypes.cast(wp.contents.descr.contents.d_type, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(c, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(c), ctypes_wrapped.c_void_p).value or 0) del c del wp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrapper_name(wp): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) s = ctypes.cast(wp.contents.descr.contents.d_base.contents.name, ctypes.POINTER(ctypes_wrapped.c_byte)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del s del wp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrapper_doc(wp): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) s = ctypes.cast(wp.contents.descr.contents.d_base.contents.doc, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del s del wp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) wrapper_getsets = (PyGetSetDef * 4)() # TODO init wrapper_getsets with (PyGetSetDef * 4)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__objclass__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, wrapper_objclass)), structs.PyGetSetDef(ctypes.cast(intp._make_string('__name__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, wrapper_name)), structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, wrapper_doc)), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def wrapper_call(wp, args, kwds): wp = ctypes.cast(wp, ctypes.POINTER(g.wrapperobject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) wrapper = ctypes.cast(wp.contents.descr.contents.d_base.contents.wrapper, g.wrapperfunc) self = ctypes.cast(wp.contents.self, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_uint(int((wp.contents.descr.contents.d_base.contents.flags.value & ctypes_wrapped.c_int(int(1L)).value))).value: wk = ctypes.cast(ctypes.cast(wrapper, g.wrapperfunc_kwds), g.wrapperfunc_kwds) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(wk, self, args, wp.contents.descr.contents.d_wrapped, kwds), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del wk if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kwds, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(kwds, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kwds))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("wrapper %s doesn't take keyword arguments"), ctypes.POINTER(ctypes_wrapped.c_byte)), wp.contents.descr.contents.d_base.contents.name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(wrapper, self, args, wp.contents.descr.contents.d_wrapped), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del args del kwds del wrapper del wp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def wrapper_traverse(self, visit, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) wp = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.wrapperobject)), ctypes.POINTER(g.wrapperobject)) while True: if (ctypes.cast(wp.contents.descr, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(wp.contents.descr, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(wp.contents.self, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(wp.contents.self, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del self del wp del visit del arg return ctypes_wrapped.c_int().value wrappertype = PyTypeObject() # TODO init wrappertype with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('method-wrapper'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(32).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, wrapper_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(cmpfunc, wrapper_compare), helpers.makeFuncPtr(reprfunc, wrapper_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), helpers.makeFuncPtr(hashfunc, wrapper_hash), helpers.makeFuncPtr(ternaryfunc, wrapper_call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), wrapper_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(wrapper_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(wrapper_getsets, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value)) @staticmethod def PyWrapper_New(d, self): d = ctypes.cast(d, ctypes.POINTER(g.PyObject)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) wp = ctypes.POINTER(g.wrapperobject)() descr = ctypes.POINTER(g.PyWrapperDescrObject)() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyWrapperDescr_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyWrapperDescr_Type)))).value))) helpers.assignPtr(descr, (ctypes.cast(intp._storePtr(ctypes.cast(d, ctypes.POINTER(g.PyWrapperDescrObject))), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(int(g._PyObject_RealIsSubclass(ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.POINTER(g.PyObject)), ctypes.cast(descr.contents.d_type, ctypes.POINTER(g.PyObject)))))) helpers.assignPtr(wp, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.wrappertype)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.wrapperobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(wp, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(descr, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(wp.contents.descr, (ctypes.cast(intp._storePtr(descr), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(wp.contents.self, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(wp, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(wp, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del d del descr del wp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) propertyobject = structs._anonymous_propertyobject property_members = (PyMemberDef * 5)() # TODO init property_members with (PyMemberDef * 5)(structs.PyMemberDef(ctypes.cast(intp._make_string('fget'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('fset'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(24)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('fdel'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(32)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(40)).value)).value)), ctypes_wrapped.c_int(int(1L))), structs.PyMemberDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) getter_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getter_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def property_getter(self, getter_a): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) getter_a = ctypes.cast(getter_a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.property_copy(self, getter_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del getter_a del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) setter_doc = (ctypes_wrapped.c_byte * 1)() # TODO init setter_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def property_setter(self, setter_a): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) setter_a = ctypes.cast(setter_a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.property_copy(self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), setter_a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del setter_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) deleter_doc = (ctypes_wrapped.c_byte * 1)() # TODO init deleter_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def property_deleter(self, deleter): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) deleter = ctypes.cast(deleter, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.property_copy(self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), deleter), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del deleter return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) property_methods = (PyMethodDef * 4)() # TODO init property_methods with (PyMethodDef * 4)(structs.PyMethodDef(ctypes.cast(intp._make_string('getter'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), property_getter), ctypes_wrapped.c_int(int(8L)), ctypes.cast(getter_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('setter'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), property_setter), ctypes_wrapped.c_int(int(8L)), ctypes.cast(setter_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('deleter'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), property_deleter), ctypes_wrapped.c_int(int(8L)), ctypes.cast(deleter_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def property_dealloc(self): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) gs = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.propertyobject)), ctypes.POINTER(g.propertyobject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(gs.contents.prop_get, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(gs.contents.prop_get, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(gs.contents.prop_get, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(gs.contents.prop_get, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(gs.contents.prop_set, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(gs.contents.prop_set, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(gs.contents.prop_set, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(gs.contents.prop_set, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(gs.contents.prop_del, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(gs.contents.prop_del, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(gs.contents.prop_del, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(gs.contents.prop_del, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(gs.contents.prop_doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(gs.contents.prop_doc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(gs.contents.prop_doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(gs.contents.prop_doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.checkedFuncPtrCall(self.contents.ob_type.contents.tp_free, ctypes.cast(self, ctypes_wrapped.c_void_p)) del self del gs return @staticmethod def property_descr_get(self, obj, type_a): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) type_a = ctypes.cast(type_a, ctypes.POINTER(g.PyObject)) gs = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.propertyobject)), ctypes.POINTER(g.propertyobject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(gs.contents.prop_get, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_AttributeError, ctypes.cast(intp._make_string('unreadable attribute'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunction(gs.contents.prop_get, ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del gs del self del obj del type_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def property_descr_set(self, obj, value): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) gs = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.propertyobject)), ctypes.POINTER(g.propertyobject)) func = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(func, (ctypes.cast(intp._storePtr(gs.contents.prop_del), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(func, (ctypes.cast(intp._storePtr(gs.contents.prop_set), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_AttributeError, (ctypes.cast(intp._make_string("can't delete attribute"), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(intp._make_string("can't set attribute"), ctypes.POINTER(ctypes_wrapped.c_byte)))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunction(func, ctypes.cast(intp._make_string('(O)'), ctypes.POINTER(ctypes_wrapped.c_byte)), obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunction(func, ctypes.cast(intp._make_string('(OO)'), ctypes.POINTER(ctypes_wrapped.c_byte)), obj, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del gs del res del self del value del func del obj return ctypes_wrapped.c_int().value @staticmethod def property_copy(old, get, set_a, del_a): old = ctypes.cast(old, ctypes.POINTER(g.PyObject)) get = ctypes.cast(get, ctypes.POINTER(g.PyObject)) set_a = ctypes.cast(set_a, ctypes.POINTER(g.PyObject)) del_a = ctypes.cast(del_a, ctypes.POINTER(g.PyObject)) pold = ctypes.cast(ctypes.cast(old, ctypes.POINTER(g.propertyobject)), ctypes.POINTER(g.propertyobject)) new = ctypes.POINTER(g.PyObject)() type_a = ctypes.POINTER(g.PyObject)() doc = ctypes.POINTER(g.PyObject)() helpers.assignPtr(type_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Type(old), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(type_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(get, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(get, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(get, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(get, (ctypes.cast(intp._storePtr((ctypes.cast(pold.contents.prop_get, ctypes.POINTER(g.PyObject)) if (ctypes.cast(pold.contents.prop_get, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(set_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(set_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(set_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(set_a, (ctypes.cast(intp._storePtr((ctypes.cast(pold.contents.prop_set, ctypes.POINTER(g.PyObject)) if (ctypes.cast(pold.contents.prop_set, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(del_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(del_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(del_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(del_a, (ctypes.cast(intp._storePtr((ctypes.cast(pold.contents.prop_del, ctypes.POINTER(g.PyObject)) if (ctypes.cast(pold.contents.prop_del, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((pold.contents.getter_doc.value and ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(doc, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(doc, (ctypes.cast(intp._storePtr((ctypes.cast(pold.contents.prop_doc, ctypes.POINTER(g.PyObject)) if (ctypes.cast(pold.contents.prop_doc, ctypes_wrapped.c_void_p).value or 0) else ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(new, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunction(type_a, ctypes.cast(intp._make_string('OOOO'), ctypes.POINTER(ctypes_wrapped.c_byte)), get, set_a, del_a, doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(type_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(new, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(new), ctypes_wrapped.c_void_p).value or 0) del type_a del old del get del doc del del_a del pold del new del set_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def property_init(self, args, kwds): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) get = ctypes.POINTER(g.PyObject)() set_a = ctypes.POINTER(g.PyObject)() del_a = ctypes.POINTER(g.PyObject)() doc = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 5)(ctypes.cast(intp._make_string('fget'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('fset'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('fdel'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('doc'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) prop = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.propertyobject)), ctypes.POINTER(g.propertyobject)) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwds, ctypes.cast(intp._make_string('|OOOO:property'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(get), ctypes.pointer(set_a), ctypes.pointer(del_a), ctypes.pointer(doc)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(get, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(set_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(set_a, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(del_a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(del_a, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(get, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(set_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(set_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(del_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(del_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(doc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(prop.contents.prop_get, (ctypes.cast(intp._storePtr(get), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(prop.contents.prop_set, (ctypes.cast(intp._storePtr(set_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(prop.contents.prop_del, (ctypes.cast(intp._storePtr(del_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(prop.contents.prop_doc, (ctypes.cast(intp._storePtr(doc), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(prop.contents.getter_doc, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value)).value and ctypes_wrapped.c_int(((ctypes.cast(get, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: get_doc = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(get, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (ctypes.cast(get_doc, ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyProperty_Type), ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(prop.contents.prop_doc, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(prop.contents.prop_doc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(prop.contents.prop_doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(prop.contents.prop_doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(prop.contents.prop_doc, (ctypes.cast(intp._storePtr(get_doc), ctypes_wrapped.c_void_p).value or 0)) else: err = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_SetAttrString(self, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), get_doc))).value)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(get_doc, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(get_doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(get_doc, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((err.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del err helpers.assign(prop.contents.getter_doc, ctypes_wrapped.c_int(int(1L)).value) elif ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_Exception))).value: g.PyErr_Clear() else: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del get_doc return ctypes_wrapped.c_int(int(0L)).value del kwds del get del doc del self del args del prop del set_a del kwlist del del_a return ctypes_wrapped.c_int().value property_doc = (ctypes_wrapped.c_byte * 1)() # TODO init property_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def property_traverse(self, visit, arg): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) pp = ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.propertyobject)), ctypes.POINTER(g.propertyobject)) while True: if (ctypes.cast(pp.contents.prop_get, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pp.contents.prop_get, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(pp.contents.prop_set, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pp.contents.prop_set, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(pp.contents.prop_del, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pp.contents.prop_del, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(pp.contents.prop_doc, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(pp.contents.prop_doc, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del self del visit del pp del arg return ctypes_wrapped.c_int().value PyProperty_Type = PyTypeObject() # TODO init PyProperty_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('property'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(56).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes.POINTER(PyObject)), property_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value)), ctypes.cast(property_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p), property_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(property_methods, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(property_members, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), property_descr_get), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), property_descr_set), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), property_init), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t), PyType_GenericAlloc), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyType_GenericNew), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_GC_Del)) free_list__methodobj = ctypes.POINTER(PyCFunctionObject)() numfree__methodobj = ctypes_wrapped.c_int() @staticmethod def PyCFunction_NewEx(ml, self, module): ml = ctypes.cast(ml, ctypes.POINTER(g.PyMethodDef)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) module = ctypes.cast(module, ctypes.POINTER(g.PyObject)) op = ctypes.POINTER(g.PyCFunctionObject)() helpers.assignPtr(op, (ctypes.cast(intp._storePtr(g.free_list__methodobj), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.free_list__methodobj, (ctypes.cast(intp._storePtr(ctypes.cast(op.contents.m_self, ctypes.POINTER(g.PyCFunctionObject))), ctypes_wrapped.c_void_p).value or 0)) ((helpers.assignPtr(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, (ctypes.cast(intp._storePtr(ctypes.pointer(g.PyCFunction_Type)), ctypes_wrapped.c_void_p).value or 0)), helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value))[1], op)[1] helpers.postfixDec(g.numfree__methodobj) else: helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyCFunction_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyCFunctionObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(op.contents.m_ml, (ctypes.cast(intp._storePtr(ml), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(op.contents.m_self, (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.postfixInc(ctypes.cast(module, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(op.contents.m_module, (ctypes.cast(intp._storePtr(module), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del ml del self del module del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCFunction_GetFunction(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/methodobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(44))) return ctypes_wrapped.c_int(int(0L)).value return ctypes.cast(op, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_meth del op return g.PyCFunction() @staticmethod def PyCFunction_GetSelf(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/methodobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(54))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyCFunctionObject)).contents.m_self), ctypes_wrapped.c_void_p).value or 0) del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCFunction_GetFlags(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/methodobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(64))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes.cast(op, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_flags.value del op return ctypes_wrapped.c_int().value @staticmethod def PyCFunction_Call(func, arg, kw): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) kw = ctypes.cast(kw, ctypes.POINTER(g.PyObject)) f = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)), ctypes.POINTER(g.PyCFunctionObject)) meth = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_meth, g.PyCFunction) self = ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_self, ctypes.POINTER(g.PyObject)) size = g.Py_ssize_t() if True: _switchvalue = None _switchvalue = ctypes_wrapped.c_uint(int((ctypes.cast(func, ctypes.POINTER(g.PyCFunctionObject)).contents.m_ml.contents.ml_flags.value & ctypes_wrapped.c_uint(int((~ ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(16L)).value | ctypes_wrapped.c_int(int(32L)).value))).value | ctypes_wrapped.c_int(int(64L)).value))).value))).value))).value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kw, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kw))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(0L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(ctypes.cast(meth, g.PyCFunctionWithKeywords), self, arg, kw), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kw, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kw))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(size, ctypes.cast(arg, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes no arguments (%zd given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), f.contents.m_ml.contents.ml_name, size), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(8L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kw, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kw))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(size, ctypes.cast(arg, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, helpers.ptrArithmetic(ctypes.cast(arg, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes exactly one argument (%zd given)'), ctypes.POINTER(ctypes_wrapped.c_byte)), f.contents.m_ml.contents.ml_name, size), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(kw, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((g.Py_ssize_t(int(g.PyDict_Size(kw))).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(size, ctypes.cast(arg, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assignPtr(arg, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(arg, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(arg, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(meth, self, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) break if (not _switchfallthrough): g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/methodobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(120))) return ctypes_wrapped.c_int(int(0L)).value break del _switchfallthrough del _switchvalue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.200s() takes no keyword arguments'), ctypes.POINTER(ctypes_wrapped.c_byte)), f.contents.m_ml.contents.ml_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del f del self del kw del func del arg del meth del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def meth_dealloc(m): m = ctypes.cast(m, ctypes.POINTER(g.PyCFunctionObject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(m, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(m.contents.m_self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(m.contents.m_self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(m.contents.m_self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(m.contents.m_self, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(m.contents.m_module, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(m.contents.m_module, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(m.contents.m_module, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(m.contents.m_module, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((g.numfree__methodobj.value < ctypes_wrapped.c_int(int(256L)).value)).value: helpers.assignPtr(m.contents.m_self, (ctypes.cast(intp._storePtr(ctypes.cast(g.free_list__methodobj, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g.free_list__methodobj, (ctypes.cast(intp._storePtr(m), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(g.numfree__methodobj) else: g.PyObject_GC_Del(ctypes.cast(m, ctypes_wrapped.c_void_p)) del m return @staticmethod def meth_get__doc__(m, closure): m = ctypes.cast(m, ctypes.POINTER(g.PyCFunctionObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) doc = ctypes.cast(m.contents.m_ml.contents.ml_doc, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) del closure del doc del m return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def meth_get__name__(m, closure): m = ctypes.cast(m, ctypes.POINTER(g.PyCFunctionObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(m.contents.m_ml.contents.ml_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del closure del m return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def meth_traverse(m, visit, arg): m = ctypes.cast(m, ctypes.POINTER(g.PyCFunctionObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) while True: if (ctypes.cast(m.contents.m_self, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(m.contents.m_self, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if (ctypes.cast(m.contents.m_module, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(m.contents.m_module, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del visit del m del arg return ctypes_wrapped.c_int().value @staticmethod def meth_get__self__(m, closure): m = ctypes.cast(m, ctypes.POINTER(g.PyCFunctionObject)) closure = ctypes.cast(closure, ctypes_wrapped.c_void_p) self = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int(g.PyEval_GetRestricted())).value: g.PyErr_SetString(g.PyExc_RuntimeError, ctypes.cast(intp._make_string('method.__self__ not accessible in restricted mode'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(self, (ctypes.cast(intp._storePtr(m.contents.m_self), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(self, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(self), ctypes_wrapped.c_void_p).value or 0) del closure del self del m return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) meth_getsets = (PyGetSetDef * 4)() # TODO init meth_getsets with (PyGetSetDef * 4)(structs.PyGetSetDef(ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, meth_get__doc__), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__name__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, meth_get__name__), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(ctypes.cast(intp._make_string('__self__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(getter, meth_get__self__), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyGetSetDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) meth_members = (PyMemberDef * 2)() # TODO init meth_members with (PyMemberDef * 2)(structs.PyMemberDef(ctypes.cast(intp._make_string('__module__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(6L)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(32)).value)).value)), ctypes_wrapped.c_int(int(4L))), structs.PyMemberDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)))) @staticmethod def meth_repr(m): m = ctypes.cast(m, ctypes.POINTER(g.PyCFunctionObject)) if ctypes_wrapped.c_int(((ctypes.cast(m.contents.m_self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), m.contents.m_ml.contents.ml_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromFormat(ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), m.contents.m_ml.contents.ml_name, m.contents.m_self.contents.ob_type.contents.tp_name, m.contents.m_self), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def meth_compare(a, b): a = ctypes.cast(a, ctypes.POINTER(g.PyCFunctionObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyCFunctionObject)) if ctypes_wrapped.c_int(((ctypes.cast(a.contents.m_self, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(b.contents.m_self, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int(((ctypes.cast(a.contents.m_self, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(b.contents.m_self, ctypes_wrapped.c_void_p).value or 0))).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(a.contents.m_ml.contents.ml_meth, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b.contents.m_ml.contents.ml_meth, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((values.strcmp.value(a.contents.m_ml.contents.ml_name, b.contents.m_ml.contents.ml_name).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: return ctypes_wrapped.c_int(int(1L)).value del a del b return ctypes_wrapped.c_int().value @staticmethod def meth_richcompare(self, other, op): self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) a = ctypes.POINTER(g.PyCFunctionObject)() b = ctypes.POINTER(g.PyCFunctionObject)() res = ctypes.POINTER(g.PyObject)() eq = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((op.value != ctypes_wrapped.c_int(int(2L)).value)).value and ctypes_wrapped.c_int((op.value != ctypes_wrapped.c_int(int(3L)).value)).value)).value: if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('builtin_function_or_method order comparisons not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(other, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyCFunction_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(a, (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyCFunctionObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(b, (ctypes.cast(intp._storePtr(ctypes.cast(other, ctypes.POINTER(g.PyCFunctionObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(eq, ctypes_wrapped.c_int(((ctypes.cast(a.contents.m_self, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b.contents.m_self, ctypes_wrapped.c_void_p).value or 0))).value) if eq.value: helpers.assign(eq, ctypes_wrapped.c_int(((ctypes.cast(a.contents.m_ml.contents.ml_meth, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b.contents.m_ml.contents.ml_meth, ctypes_wrapped.c_void_p).value or 0))).value) if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if eq.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if eq.value else ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del a del b del res del self del other del eq del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def meth_hash(a): a = ctypes.cast(a, ctypes.POINTER(g.PyCFunctionObject)) x = ctypes_wrapped.c_long() y = ctypes_wrapped.c_long() if ctypes_wrapped.c_int(((ctypes.cast(a.contents.m_self, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assign(x, ctypes_wrapped.c_long(int(g.PyObject_Hash(a.contents.m_self))).value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(y, ctypes_wrapped.c_long(int(g._Py_HashPointer(ctypes.cast(a.contents.m_ml.contents.ml_meth, ctypes_wrapped.c_void_p)))).value) if ctypes_wrapped.c_int((y.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.augAssign(x, u'^=', y.value) if ctypes_wrapped.c_int((x.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(x, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) return x.value del a del x del y return ctypes_wrapped.c_long().value PyCFunction_Type = PyTypeObject() # TODO init PyCFunction_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('builtin_function_or_method'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, meth_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(cmpfunc, meth_compare), helpers.makeFuncPtr(reprfunc, meth_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), helpers.makeFuncPtr(hashfunc, meth_hash), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyCFunction_Call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, meth_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), meth_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMethodDef)), ctypes.cast(meth_members, ctypes.POINTER(structs.PyMemberDef)), ctypes.cast(meth_getsets, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject))) @staticmethod def listmethodchain(chain): first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None chain = ctypes.cast(chain, ctypes.POINTER(g.PyMethodChain)) c = ctypes.POINTER(g.PyMethodChain)() ml = ctypes.POINTER(g.PyMethodDef)() i = ctypes_wrapped.c_int() n = ctypes_wrapped.c_int() v = ctypes.POINTER(g.PyObject)() helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assignPtr(c, (ctypes.cast(intp._storePtr(chain), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.assignPtr(c, (ctypes.cast(intp._storePtr(c.contents.link), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(c, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if True: first_iteration_a = True helpers.assignPtr(ml, (ctypes.cast(intp._storePtr(c.contents.methods), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixIncPtr(ml) if ctypes_wrapped.c_int(((ctypes.cast(ml.contents.ml_name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.postfixInc(n) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration_b = True helpers.assignPtr(c, (ctypes.cast(intp._storePtr(chain), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_b: first_iteration_b = False else: helpers.assignPtr(c, (ctypes.cast(intp._storePtr(c.contents.link), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(c, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if True: first_iteration_c = True helpers.assignPtr(ml, (ctypes.cast(intp._storePtr(c.contents.methods), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration_c: first_iteration_c = False else: helpers.postfixIncPtr(ml) if ctypes_wrapped.c_int(((ctypes.cast(ml.contents.ml_name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break ctypes_wrapped.c_int(int(g.PyList_SetItem(v, g.Py_ssize_t(int(i.value)), intp._getPtr(g.PyString_FromString(ml.contents.ml_name), ctypes.POINTER(g.PyObject))))) helpers.postfixInc(i) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value ctypes_wrapped.c_int(int(g.PyList_Sort(v))) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del c del chain del i del ml del n del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_FindMethodInChain(chain, self, name): first_iteration = None chain = ctypes.cast(chain, ctypes.POINTER(g.PyMethodChain)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(name, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes.c_byte(95).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(name, '+', ctypes_wrapped.c_int(int(1L)).value).contents.value == ctypes.c_byte(95).value)).value)).value: if ctypes_wrapped.c_int((values.strcmp.value(name, ctypes.cast(intp._make_string('__methods__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('__methods__ not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.listmethodchain(chain), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((values.strcmp.value(name, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte))).value == ctypes_wrapped.c_int(int(0L)).value)).value: doc = ctypes.cast(self.contents.ob_type.contents.tp_doc, ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del doc while ctypes_wrapped.c_int(((ctypes.cast(chain, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: ml = ctypes.cast(chain.contents.methods, ctypes.POINTER(g.PyMethodDef)) if True: first_iteration = True while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(ml) if ctypes_wrapped.c_int(((ctypes.cast(ml.contents.ml_name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(name, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == helpers.ptrArithmetic(ml.contents.ml_name, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value and ctypes_wrapped.c_int((values.strcmp.value(helpers.ptrArithmetic(name, u'+', ctypes_wrapped.c_int(int(1L)).value), helpers.ptrArithmetic(ml.contents.ml_name, u'+', ctypes_wrapped.c_int(int(1L)).value)).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(ml, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(chain, (ctypes.cast(intp._storePtr(chain.contents.link), ctypes_wrapped.c_void_p).value or 0)) del ml g.PyErr_SetString(g.PyExc_AttributeError, name) return ctypes_wrapped.c_int(int(0L)).value del self del name del chain return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_FindMethod(methods, self, name): methods = ctypes.cast(methods, ctypes.POINTER(g.PyMethodDef)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) chain = g.PyMethodChain() helpers.assignPtr(chain.methods, (ctypes.cast(intp._storePtr(methods), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(chain.link, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_FindMethodInChain(ctypes.pointer(chain), self, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del methods del chain del name return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyCFunction_ClearFreeList(): freelist_size = ctypes_wrapped.c_int(int(g.numfree__methodobj.value)) while (ctypes.cast(g.free_list__methodobj, ctypes_wrapped.c_void_p).value or 0): v = ctypes.cast(g.free_list__methodobj, ctypes.POINTER(g.PyCFunctionObject)) helpers.assignPtr(g.free_list__methodobj, (ctypes.cast(intp._storePtr(ctypes.cast(v.contents.m_self, ctypes.POINTER(g.PyCFunctionObject))), ctypes_wrapped.c_void_p).value or 0)) g.PyObject_GC_Del(ctypes.cast(v, ctypes_wrapped.c_void_p)) helpers.postfixDec(g.numfree__methodobj) del v values.assert_a.value(ctypes_wrapped.c_int((g.numfree__methodobj.value == ctypes_wrapped.c_int(int(0L)).value))) return freelist_size.value del freelist_size return ctypes_wrapped.c_int().value @staticmethod def PyCFunction_Fini(): (ctypes_wrapped.c_int(int(g.PyCFunction_ClearFreeList())), None)[1] return @staticmethod def PyCFunction_New(ml, self): ml = ctypes.cast(ml, ctypes.POINTER(g.PyMethodDef)) self = ctypes.cast(self, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(ml, self, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del ml del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_resize(self, newsize): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) newsize = g.Py_ssize_t(int(newsize.value)) items = ctypes.POINTER(ctypes.POINTER(g.PyObject))() new_allocated = ctypes_wrapped.c_ulong() allocated = g.Py_ssize_t(int(self.contents.allocated.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((allocated.value >= newsize.value)).value and ctypes_wrapped.c_int((newsize.value >= g.Py_ssize_t(int((allocated.value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(self.contents.ob_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((newsize.value == ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.assign(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, newsize.value) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(new_allocated, ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int((newsize.value >> ctypes_wrapped.c_int(int(3L)).value))).value + (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(3L)).value)) if ctypes_wrapped.c_int((newsize.value < ctypes_wrapped.c_int(int(9L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(6L)).value))).value))).value) if ctypes_wrapped.c_int((new_allocated.value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value - newsize.value))).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: helpers.augAssign(new_allocated, u'+=', newsize.value) if ctypes_wrapped.c_int((newsize.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(new_allocated, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(items, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((new_allocated.value <= ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value / ctypes_wrapped.c_size_t(8).value))).value)).value: helpers.assignPtr(items, (ctypes.cast(intp._storePtr((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(new_allocated.value)).value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value / ctypes_wrapped.c_size_t(8).value))).value)).value else ctypes.cast(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((new_allocated.value * ctypes_wrapped.c_size_t(8).value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.realloc.value(items, (ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((new_allocated.value * ctypes_wrapped.c_size_t(8).value))).value)) if ctypes_wrapped.c_ulong(int((new_allocated.value * ctypes_wrapped.c_size_t(8).value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes.POINTER(g.PyObject))), ctypes.POINTER(ctypes.POINTER(g.PyObject))))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(items, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int(((ctypes.cast(items, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(self.contents.ob_item, (ctypes.cast(intp._storePtr(items), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, newsize.value) helpers.assign(self.contents.allocated, new_allocated.value) return ctypes_wrapped.c_int(int(0L)).value del items del self del allocated del newsize del new_allocated return ctypes_wrapped.c_int().value free_list__list = (ctypes.POINTER(PyListObject) * 80L)() numfree__list = ctypes_wrapped.c_int() @staticmethod def PyList_Fini(): op = ctypes.POINTER(g.PyListObject)() while g.numfree__list.value: helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list__list, '+', helpers.prefixDec(g.numfree__list).value).contents), ctypes_wrapped.c_void_p).value or 0)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyList_Type), ctypes_wrapped.c_void_p).value or 0)))) g.PyObject_GC_Del(ctypes.cast(op, ctypes_wrapped.c_void_p)) del op return @staticmethod def PyList_New(size): size = g.Py_ssize_t(int(size.value)) op = ctypes.POINTER(g.PyListObject)() nbytes = ctypes_wrapped.c_ulong() if ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(0L)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(126))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(size.value)).value > ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value / ctypes_wrapped.c_size_t(8).value))).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(nbytes, ctypes_wrapped.c_ulong(int((size.value * ctypes_wrapped.c_size_t(8).value))).value) if g.numfree__list.value: helpers.postfixDec(g.numfree__list) helpers.assignPtr(op, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(g.free_list__list, '+', g.numfree__list.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt, ctypes_wrapped.c_int(int(1L)).value) else: helpers.assignPtr(op, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyList_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((size.value <= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(op.contents.ob_item, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assignPtr(op.contents.ob_item, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(nbytes.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(nbytes.value)) if nbytes.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(op.contents.ob_item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) values.memset.value(ctypes.cast(op.contents.ob_item, ctypes_wrapped.c_void_p), ctypes_wrapped.c_int(int(0L)), nbytes) helpers.assign(ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size, size.value) helpers.assign(op.contents.allocated, size.value) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(op, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del op del nbytes del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyList_Size(op): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(169))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: return ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del op return g.Py_ssize_t().value indexerr = ctypes.POINTER(PyObject)() @staticmethod def PyList_GetItem(op, i): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(182))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(g.indexerr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.indexerr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('list index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.indexerr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value g.PyErr_SetObject(g.PyExc_IndexError, g.indexerr) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0) del i del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyList_SetItem(op, i, newitem): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) newitem = ctypes.cast(newitem, ctypes.POINTER(g.PyObject)) olditem = ctypes.POINTER(g.PyObject)() p = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(newitem, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(206))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(newitem, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(newitem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('list assignment index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(op, ctypes.POINTER(g.PyListObject)).contents.ob_item, u'+', i.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(olditem, (ctypes.cast(intp._storePtr(p.contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(newitem), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int(((ctypes.cast(olditem, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(olditem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(olditem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(olditem, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del i del newitem del olditem del p del op return ctypes_wrapped.c_int().value @staticmethod def ins1(self, where, v): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) where = g.Py_ssize_t(int(where.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) items = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(228))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((n.value == g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('cannot add more objects to list'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_resize(self, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value))))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((where.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(where, u'+=', n.value) if ctypes_wrapped.c_int((where.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(where, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((where.value > n.value)).value: helpers.assign(where, n.value) helpers.assignPtr(items, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, n.value) while True: if first_iteration: first_iteration = False if ctypes_wrapped.c_int((helpers.prefixDec(i).value >= where.value)).value: pass else: break helpers.assignPtr(helpers.ptrArithmetic(items, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(items, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(items, '+', where.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del i del items del self del n del v del where return ctypes_wrapped.c_int().value @staticmethod def PyList_Insert(op, where, newitem): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) where = g.Py_ssize_t(int(where.value)) newitem = ctypes.cast(newitem, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(259))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.ins1(ctypes.cast(op, ctypes.POINTER(g.PyListObject)), where, newitem))).value del newitem del where del op return ctypes_wrapped.c_int().value @staticmethod def app1(self, v): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) n = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((n.value == g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('cannot add more objects to list'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_resize(self, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value))))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', n.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del self del n del v return ctypes_wrapped.c_int().value @staticmethod def PyList_Append(op, newitem): op = ctypes.cast(op, ctypes.POINTER(g.PyObject)) newitem = ctypes.cast(newitem, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(newitem, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(g.app1(ctypes.cast(op, ctypes.POINTER(g.PyListObject)), newitem))).value g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(290))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del newitem del op return ctypes_wrapped.c_int().value @staticmethod def list_dealloc(op): op = ctypes.cast(op, ctypes.POINTER(g.PyListObject)) i = g.Py_ssize_t() g.PyObject_GC_UnTrack(ctypes.cast(op, ctypes_wrapped.c_void_p)) while True: _tstate = ctypes.cast(g._PyThreadState_Current, ctypes.POINTER(g.PyThreadState)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value < ctypes_wrapped.c_int(int(50L)).value)).value)).value: if (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0): helpers.prefixInc(_tstate.contents.trash_delete_nesting) if ctypes_wrapped.c_int(((ctypes.cast(op.contents.ob_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(i, ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.free.value(op.contents.ob_item) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((g.numfree__list.value < ctypes_wrapped.c_int(int(80L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyList_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.assignPtr(helpers.ptrArithmetic(g.free_list__list, '+', helpers.postfixInc(g.numfree__list).value).contents, (ctypes.cast(intp._storePtr(op), ctypes_wrapped.c_void_p).value or 0)) else: helpers.checkedFuncPtrCall(ctypes.cast(op, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_free, ctypes.cast(ctypes.cast(op, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p)) if (ctypes.cast(_tstate, ctypes_wrapped.c_void_p).value or 0): helpers.prefixDec(_tstate.contents.trash_delete_nesting) if ctypes_wrapped.c_int(((ctypes.cast(_tstate.contents.trash_delete_later, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((_tstate.contents.trash_delete_nesting.value <= ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyTrash_thread_destroy_chain() else: g._PyTrash_thread_deposit_object(ctypes.cast(op, ctypes.POINTER(g.PyObject))) del _tstate if ctypes_wrapped.c_int(int(0L)).value: continue else: break del i del op return @staticmethod def list_print(op, fp, flags): first_iteration = None op = ctypes.cast(op, ctypes.POINTER(g.PyListObject)) fp = ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)) flags = ctypes_wrapped.c_int(int(flags.value)) rc = ctypes_wrapped.c_int() i = g.Py_ssize_t() item = ctypes.POINTER(g.PyObject)() helpers.assign(rc, ctypes_wrapped.c_int(int(g.Py_ReprEnter(ctypes.cast(op, ctypes.POINTER(g.PyObject))))).value) if ctypes_wrapped.c_int((rc.value != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((rc.value < ctypes_wrapped.c_int(int(0L)).value)).value: return rc.value values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('[...]'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string('['), ctypes.POINTER(ctypes_wrapped.c_byte))) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(op, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break helpers.assignPtr(item, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(op.contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value: values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_Print(item, fp, ctypes_wrapped.c_int(int(0L))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.Py_ReprLeave(ctypes.cast(op, ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.fprintf.value(ctypes.cast(fp, ctypes.POINTER(ctypes_wrapped.c_int)), ctypes.cast(intp._make_string(']'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.Py_ReprLeave(ctypes.cast(op, ctypes.POINTER(g.PyObject))) return ctypes_wrapped.c_int(int(0L)).value del fp del i del item del flags del rc del op return ctypes_wrapped.c_int().value @staticmethod def list_repr(v): goto = None while True: if (goto is None): first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyListObject)) i = g.Py_ssize_t() s = ctypes.POINTER(g.PyObject)() temp = ctypes.POINTER(g.PyObject)() pieces = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assign(i, ctypes_wrapped.c_int(int(g.Py_ReprEnter(ctypes.cast(v, ctypes.POINTER(g.PyObject))))).value) if (not ctypes_wrapped.c_int((i.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return (ctypes.cast(intp._storePtr((ctypes.cast(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('[...]'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((i.value > ctypes_wrapped.c_int(int(0L)).value)).value else intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('[]'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = u'Done' continue if (goto == 2): goto = None if (goto is None): helpers.assignPtr(pieces, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(pieces, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue goto = u'Done' continue if (goto == 3): goto = None if (goto is None): if (not True): goto = 4 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 8 continue first_iteration = False goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.prefixInc(i) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): status = ctypes_wrapped.c_int() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' while getting the repr of a list'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value): goto = 11 continue goto = u'Done' continue if (goto == 11): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Repr(helpers.ptrArithmetic(v.contents.ob_item, '+', i.value).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'Done' continue if (goto == 12): goto = None if (goto is None): helpers.assign(status, ctypes_wrapped.c_int(int(g.PyList_Append(pieces, s))).value) if (goto == 13): goto = None if (goto is None): if (not True): goto = 14 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue pass goto = 15 continue if (goto == 16): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 18 continue continue goto = 17 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 17): goto = None if (goto is None): goto = 13 continue if (goto == 14): goto = None if (goto is None): if (not ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue goto = u'Done' continue if (goto == 19): goto = None if (goto is None): del status goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes.cast(pieces, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('['), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue goto = u'Done' continue if (goto == 20): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyString_ConcatAndDel(ctypes.pointer(s), temp) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(s), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue goto = u'Done' continue if (goto == 21): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(']'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue goto = u'Done' continue if (goto == 22): goto = None if (goto is None): helpers.assignPtr(temp, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((ctypes.cast(pieces, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents), ctypes_wrapped.c_void_p).value or 0)) g.PyString_ConcatAndDel(ctypes.pointer(temp), s) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(pieces, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes_wrapped.c_ulong(int((ctypes.cast(pieces, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents, (ctypes.cast(intp._storePtr(temp), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(temp, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue goto = u'Done' continue if (goto == 23): goto = None if (goto is None): helpers.assignPtr(s, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string(', '), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue goto = u'Done' continue if (goto == 24): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyString_Join(s, pieces), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 25): goto = None if (goto is None): if (not True): goto = 26 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue pass goto = 27 continue if (goto == 28): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(s, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 30 continue continue goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 26 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 26): goto = None if (goto == u'Done'): goto = None if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int(((ctypes.cast(pieces, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto == 35): goto = None if (goto is None): if (not True): goto = 36 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 38 continue pass goto = 37 continue if (goto == 38): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(pieces, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 37): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 40 continue continue goto = 39 continue if (goto == 40): goto = None if (goto is None): goto = 36 continue if (goto == 39): goto = None if (goto is None): goto = 35 continue if (goto == 36): goto = None if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 42 continue continue goto = 41 continue if (goto == 42): goto = None if (goto is None): goto = 32 continue if (goto == 41): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto is None): g.Py_ReprLeave(ctypes.cast(v, ctypes.POINTER(g.PyObject))) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del temp del i del pieces del s del result del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def list_length(a): a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) return ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value del a return g.Py_ssize_t().value @staticmethod def list_contains(a, el): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) el = ctypes.cast(el, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() cmp_a = ctypes_wrapped.c_int() if True: first_iteration = True (helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value), helpers.assign(cmp_a, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((cmp_a.value == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((i.value < ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: pass else: break helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(el, helpers.ptrArithmetic(ctypes.cast(a, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_int(int(2L))))).value) return cmp_a.value del a del el del i del cmp_a return ctypes_wrapped.c_int().value @staticmethod def list_item(a, i): a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) i = g.Py_ssize_t(int(i.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: if ctypes_wrapped.c_int(((ctypes.cast(g.indexerr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(g.indexerr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('list index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(g.indexerr, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value g.PyErr_SetObject(g.PyExc_IndexError, g.indexerr) return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(helpers.ptrArithmetic(a.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0) del a del i return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_slice(a, ilow, ihigh): first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) ilow = g.Py_ssize_t(int(ilow.value)) ihigh = g.Py_ssize_t(int(ihigh.value)) np = ctypes.POINTER(g.PyListObject)() src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() i = g.Py_ssize_t() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int((ilow.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(ilow, ctypes_wrapped.c_int(int(0L)).value) elif ctypes_wrapped.c_int((ilow.value > ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assign(ilow, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((ihigh.value < ilow.value)).value: helpers.assign(ihigh, ilow.value) elif ctypes_wrapped.c_int((ihigh.value > ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assign(ihigh, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(len_a, ctypes_wrapped.c_long(int((ihigh.value - ilow.value))).value) helpers.assignPtr(np, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyList_New(len_a), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(np, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(src, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ob_item, u'+', ilow.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < len_a.value)).value: pass else: break v = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del src del i del ihigh del len_a del ilow del dest del np return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyList_GetSlice(a, ilow, ihigh): a = ctypes.cast(a, ctypes.POINTER(g.PyObject)) ilow = g.Py_ssize_t(int(ilow.value)) ihigh = g.Py_ssize_t(int(ihigh.value)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(499))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.list_slice(ctypes.cast(a, ctypes.POINTER(g.PyListObject)), ilow, ihigh), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del ihigh del ilow return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_concat(a, bb): first_iteration_a = None first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) bb = ctypes.cast(bb, ctypes.POINTER(g.PyObject)) size = g.Py_ssize_t() i = g.Py_ssize_t() src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() np = ctypes.POINTER(g.PyListObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bb, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('can only concatenate list (not "%.200s") to list'), ctypes.POINTER(ctypes_wrapped.c_byte)), bb.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(size, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyListObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) if ctypes_wrapped.c_int((size.value < ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(np, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyList_New(size), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(np, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(src, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break v = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v helpers.assignPtr(src, (ctypes.cast(intp._storePtr(ctypes.cast(bb, ctypes.POINTER(g.PyListObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(np.contents.ob_item, u'+', ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(ctypes.cast(bb, ctypes.POINTER(g.PyListObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break v = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) del v return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del src del bb del i del dest del np del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_repeat(a, n): first_iteration_b = None first_iteration_a = None first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) n = g.Py_ssize_t(int(n.value)) i = g.Py_ssize_t() j = g.Py_ssize_t() size = g.Py_ssize_t() np = ctypes.POINTER(g.PyListObject)() p = ctypes.POINTER(ctypes.POINTER(g.PyObject))() items = ctypes.POINTER(ctypes.POINTER(g.PyObject))() elem = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value / n.value))).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assign(size, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value * n.value))).value) if ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(np, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyList_New(size), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(np, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(items, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assignPtr(elem, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(helpers.ptrArithmetic(items, '+', i.value).contents, (ctypes.cast(intp._storePtr(elem), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(elem, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(p, (ctypes.cast(intp._storePtr(np.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(items, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if True: first_iteration_b = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_b: first_iteration_b = False else: helpers.postfixInc(j) if ctypes_wrapped.c_int((j.value < ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(items, '+', j.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(p.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixIncPtr(p) return (ctypes.cast(intp._storePtr(ctypes.cast(np, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del i del items del j del elem del n del p del np del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_clear(a): a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) i = g.Py_ssize_t() item = ctypes.cast(a.contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(i, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(a.contents.ob_item, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(a.contents.allocated, ctypes_wrapped.c_int(int(0L)).value) while ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.free.value(item) return ctypes_wrapped.c_int(int(0L)).value del a del i del item return ctypes_wrapped.c_int().value @staticmethod def list_ass_slice(a, ilow, ihigh, v): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) ilow = g.Py_ssize_t(int(ilow.value)) ihigh = g.Py_ssize_t(int(ihigh.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) recycle_on_stack = (ctypes.POINTER(g.PyObject) * 8L)() recycle = ctypes.cast(recycle_on_stack, ctypes.POINTER(ctypes.POINTER(g.PyObject))) item = ctypes.POINTER(ctypes.POINTER(g.PyObject))() vitem = ctypes.POINTER(ctypes.POINTER(g.PyObject))() v_as_SF = ctypes.POINTER(g.PyObject)() n = g.Py_ssize_t() norig = g.Py_ssize_t() d = g.Py_ssize_t() k = g.Py_ssize_t() s = ctypes_wrapped.c_ulong() result = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue helpers.assign(n, ctypes_wrapped.c_int(int(0L)).value) goto = 1 continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyListObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 3 continue helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.list_slice(ctypes.cast(v, ctypes.POINTER(g.PyListObject)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyListObject)), ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue return result.value if (goto == 4): goto = None if (goto is None): helpers.assign(result, ctypes_wrapped.c_int(int(g.list_ass_slice(a, ilow, ihigh, v))).value) if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): return result.value if (goto == 3): goto = None if (goto is None): helpers.assignPtr(v_as_SF, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Fast(v, ctypes.cast(intp._make_string('can only assign an iterable'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(v_as_SF, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue goto = u'Error' continue if (goto == 11): goto = None if (goto is None): helpers.assign(n, (ctypes_wrapped.c_long(int(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_long(int(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) helpers.assignPtr(vitem, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyListObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ilow.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue helpers.assign(ilow, ctypes_wrapped.c_int(int(0L)).value) goto = 12 continue if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ilow.value > ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 14 continue helpers.assign(ilow, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (goto == 14): goto = None if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ihigh.value < ilow.value)).value): goto = 16 continue helpers.assign(ihigh, ilow.value) goto = 15 continue if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ihigh.value > ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value): goto = 17 continue helpers.assign(ihigh, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (goto == 17): goto = None if (goto == 15): goto = None if (goto is None): helpers.assign(norig, ctypes_wrapped.c_long(int((ihigh.value - ilow.value))).value) values.assert_a.value(ctypes_wrapped.c_int((norig.value >= ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(d, ctypes_wrapped.c_long(int((n.value - norig.value))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + d.value))).value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 18 continue if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v_as_SF, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto == 21): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 30 continue continue goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 20 continue if (goto == 29): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto is None): return ctypes_wrapped.c_int(int(g.list_clear(a))).value if (goto == 18): goto = None if (goto is None): helpers.assignPtr(item, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(s, ctypes_wrapped.c_ulong(int((norig.value * ctypes_wrapped.c_size_t(8).value))).value) if (not ctypes_wrapped.c_int((s.value > ctypes_wrapped.c_size_t(ctypes.sizeof(recycle_on_stack)).value)).value): goto = 31 continue helpers.assignPtr(recycle, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(s.value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(s.value)) if s.value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(recycle, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) goto = u'Error' continue if (goto == 32): goto = None if (goto == 31): goto = None if (goto is None): values.memcpy.value(ctypes.cast(recycle, ctypes_wrapped.c_void_p), ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(item, '+', ilow.value).contents), ctypes_wrapped.c_void_p), s) if (not ctypes_wrapped.c_int((d.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue values.memmove.value(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(item, '+', ctypes_wrapped.c_long(int((ihigh.value + d.value))).value).contents), ctypes_wrapped.c_void_p), ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(item, '+', ihigh.value).contents), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ihigh.value))).value * ctypes_wrapped.c_size_t(8).value)))) ctypes_wrapped.c_int(int(g.list_resize(a, ctypes_wrapped.c_long(int((ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value + d.value)))))) helpers.assignPtr(item, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) goto = 33 continue if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int((d.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue helpers.assign(k, ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_resize(a, ctypes_wrapped.c_long(int((k.value + d.value)))))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 36 continue goto = u'Error' continue if (goto == 36): goto = None if (goto is None): helpers.assignPtr(item, (ctypes.cast(intp._storePtr(a.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) values.memmove.value(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(item, '+', ctypes_wrapped.c_long(int((ihigh.value + d.value))).value).contents), ctypes_wrapped.c_void_p), ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(item, '+', ihigh.value).contents), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_long(int((k.value - ihigh.value))).value * ctypes_wrapped.c_size_t(8).value)))) if (goto == 35): goto = None if (goto == 33): goto = None if (goto is None): if (not True): goto = 37 continue first_iteration = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) if (goto == 38): goto = None if (goto is None): if (not True): goto = 39 continue if (not first_iteration): goto = 41 continue first_iteration = False goto = 40 continue if (goto == 41): goto = None if (goto is None): (helpers.postfixInc(k), helpers.postfixInc(ilow))[1] if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int((k.value < n.value)).value): goto = 43 continue pass goto = 42 continue if (goto == 43): goto = None if (goto is None): goto = 39 continue if (goto == 42): goto = None if (goto is None): w = ctypes.cast(helpers.ptrArithmetic(vitem, '+', k.value).contents, ctypes.POINTER(g.PyObject)) if (goto == 44): goto = None if (goto is None): if (not True): goto = 45 continue if (not ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue pass goto = 46 continue if (goto == 47): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 49 continue continue goto = 48 continue if (goto == 49): goto = None if (goto is None): goto = 45 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 45): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(item, '+', ilow.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) del w goto = 38 continue if (goto == 39): goto = None if (goto == 37): goto = None if (goto is None): if (not True): goto = 50 continue first_iteration_a = True helpers.assign(k, ctypes_wrapped.c_ulong(int((norig.value - ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 51): goto = None if (goto is None): if (not True): goto = 52 continue if (not first_iteration_a): goto = 54 continue first_iteration_a = False goto = 53 continue if (goto == 54): goto = None if (goto is None): helpers.prefixDec(k) if (goto == 53): goto = None if (goto is None): if (not ctypes_wrapped.c_int((k.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue pass goto = 55 continue if (goto == 56): goto = None if (goto is None): goto = 52 continue if (goto == 55): goto = None if (goto == 57): goto = None if (goto is None): if (not True): goto = 58 continue if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(recycle, '+', k.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 60 continue pass goto = 59 continue if (goto == 60): goto = None if (goto == 61): goto = None if (goto is None): if (not True): goto = 62 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(recycle, '+', k.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 64 continue pass goto = 63 continue if (goto == 64): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(recycle, '+', k.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(recycle, '+', k.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 63): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 66 continue continue goto = 65 continue if (goto == 66): goto = None if (goto is None): goto = 62 continue if (goto == 65): goto = None if (goto is None): goto = 61 continue if (goto == 62): goto = None if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 68 continue continue goto = 67 continue if (goto == 68): goto = None if (goto is None): goto = 58 continue if (goto == 67): goto = None if (goto is None): goto = 57 continue if (goto == 58): goto = None if (goto is None): goto = 51 continue if (goto == 52): goto = None if (goto == 50): goto = None if (goto is None): helpers.assign(result, ctypes_wrapped.c_int(int(0L)).value) if (goto == u'Error'): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(recycle, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(recycle_on_stack, ctypes_wrapped.c_void_p).value or 0))).value): goto = 69 continue values.free.value(recycle) if (goto == 69): goto = None if (goto == 70): goto = None if (goto is None): if (not True): goto = 71 continue if (not ctypes_wrapped.c_int(((ctypes.cast(v_as_SF, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 73 continue pass goto = 72 continue if (goto == 73): goto = None if (goto == 74): goto = None if (goto is None): if (not True): goto = 75 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 77 continue pass goto = 76 continue if (goto == 77): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v_as_SF, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 76): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 79 continue continue goto = 78 continue if (goto == 79): goto = None if (goto is None): goto = 75 continue if (goto == 78): goto = None if (goto is None): goto = 74 continue if (goto == 75): goto = None if (goto == 72): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 81 continue continue goto = 80 continue if (goto == 81): goto = None if (goto is None): goto = 71 continue if (goto == 80): goto = None if (goto is None): goto = 70 continue if (goto == 71): goto = None if (goto is None): return result.value del a del v_as_SF del d del vitem del item del ihigh del k del ilow del n del recycle_on_stack del s del norig del v del recycle del result return ctypes_wrapped.c_int().value break @staticmethod def PyList_SetSlice(a, ilow, ihigh, v): a = ctypes.cast(a, ctypes.POINTER(g.PyObject)) ilow = g.Py_ssize_t(int(ilow.value)) ihigh = g.Py_ssize_t(int(ihigh.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(a, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(715))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.list_ass_slice(ctypes.cast(a, ctypes.POINTER(g.PyListObject)), ilow, ihigh, v))).value del a del ihigh del ilow del v return ctypes_wrapped.c_int().value @staticmethod def list_inplace_repeat(self, n): first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) n = g.Py_ssize_t(int(n.value)) items = ctypes.POINTER(ctypes.POINTER(g.PyObject))() size = g.Py_ssize_t() i = g.Py_ssize_t() j = g.Py_ssize_t() p = g.Py_ssize_t() helpers.assign(size, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((size.value == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value: helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(1L)).value)).value: (ctypes_wrapped.c_int(int(g.list_clear(self))), None)[1] helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((size.value > ctypes_wrapped.c_long(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value / n.value))).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_resize(self, ctypes_wrapped.c_long(int((size.value * n.value)))))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(p, size.value) helpers.assignPtr(items, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(1L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break if True: first_iteration_a = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(j) if ctypes_wrapped.c_int((j.value < size.value)).value: pass else: break o = ctypes.cast(helpers.ptrArithmetic(items, '+', j.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(items, '+', helpers.postfixInc(p).value).contents, (ctypes.cast(intp._storePtr(o), ctypes_wrapped.c_void_p).value or 0)) del o helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del items del self del j del n del p del size return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_ass_item(a, i, v): a = ctypes.cast(a, ctypes.POINTER(g.PyListObject)) i = g.Py_ssize_t(int(i.value)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) old_value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(a, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('list assignment index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(g.list_ass_slice(a, i, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value)), v))).value helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(old_value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(a.contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(a.contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(old_value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del a del i del old_value del v return ctypes_wrapped.c_int().value @staticmethod def listinsert(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('nO:insert'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(i), ctypes.pointer(v)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.ins1(self, i, v))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return ctypes_wrapped.c_int(int(0L)).value del i del self del args del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listappend(self, v): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.app1(self, v))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return ctypes_wrapped.c_int(int(0L)).value del self del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listextend(self, b): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyObject)) it = ctypes.POINTER(g.PyObject)() m = g.Py_ssize_t() n = g.Py_ssize_t() mn = g.Py_ssize_t() i = g.Py_ssize_t() iternext = ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyList_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(self, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 1 continue src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() helpers.assignPtr(b, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Fast(b, ctypes.cast(intp._make_string('argument must be iterable'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((not (ctypes.cast(b, ctypes_wrapped.c_void_p).value or 0))).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): helpers.assign(n, (ctypes_wrapped.c_long(int(ctypes.cast(b, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_long(int(ctypes.cast(b, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value) if (not ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue pass goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 6): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 9 continue continue goto = 8 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 8): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) if (goto == 3): goto = None if (goto is None): helpers.assign(m, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_resize(self, ctypes_wrapped.c_long(int((m.value + n.value)))))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 10 continue if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 10): goto = None if (goto is None): helpers.assignPtr(src, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyListObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self.contents.ob_item, u'+', m.value)), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 17 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not first_iteration): goto = 21 continue first_iteration = False goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < n.value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto is None): goto = 19 continue if (goto == 22): goto = None if (goto is None): o = ctypes.cast(helpers.ptrArithmetic(src, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.postfixInc(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(o), ctypes_wrapped.c_void_p).value or 0)) del o goto = 18 continue if (goto == 19): goto = None if (goto == 17): goto = None if (goto == 24): goto = None if (goto is None): if (not True): goto = 25 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue pass goto = 26 continue if (goto == 27): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 26): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 29 continue continue goto = 28 continue if (goto == 29): goto = None if (goto is None): goto = 25 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 25): goto = None if (goto is None): return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) del dest del src if (goto == 1): goto = None if (goto is None): helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(b), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 30): goto = None if (goto is None): helpers.assignPtr(iternext, (ctypes.cast(it.contents.ob_type.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0)) helpers.assign(n, g.Py_ssize_t(int(g._PyObject_LengthHint(b, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(8L)).value))))).value) if (not ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 31 continue if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value if (goto == 31): goto = None if (goto is None): helpers.assign(m, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(mn, ctypes_wrapped.c_long(int((m.value + n.value))).value) if (not ctypes_wrapped.c_int((mn.value >= m.value)).value): goto = 38 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_resize(self, mn))).value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 39 continue goto = u'error' continue if (goto == 39): goto = None if (goto is None): helpers.assign(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, m.value) if (goto == 38): goto = None if (goto is None): if (not True): goto = 40 continue first_iteration_a = True if (goto == 41): goto = None if (goto is None): if (not True): goto = 42 continue if (not first_iteration_a): goto = 43 continue first_iteration_a = False if (goto == 43): goto = None if (goto is None): item = ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(iternext, it), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 44 continue if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 45 continue if (not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_StopIteration))).value): goto = 47 continue g.PyErr_Clear() goto = 46 continue if (goto == 47): goto = None if (goto is None): goto = u'error' continue if (goto == 46): goto = None if (goto == 45): goto = None if (goto is None): goto = 42 continue if (goto == 44): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value < self.contents.allocated.value)).value): goto = 49 continue helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value).contents, (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixInc(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size) goto = 48 continue if (goto == 49): goto = None if (goto is None): status = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.app1(self, item))).value)) if (goto == 50): goto = None if (goto is None): if (not True): goto = 51 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 53 continue pass goto = 52 continue if (goto == 53): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 52): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 55 continue continue goto = 54 continue if (goto == 55): goto = None if (goto is None): goto = 51 continue if (goto == 54): goto = None if (goto is None): goto = 50 continue if (goto == 51): goto = None if (goto is None): if (not ctypes_wrapped.c_int((status.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 56 continue goto = u'error' continue if (goto == 56): goto = None if (goto is None): del status if (goto == 48): goto = None if (goto is None): del item goto = 41 continue if (goto == 42): goto = None if (goto == 40): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value < self.contents.allocated.value)).value): goto = 57 continue ctypes_wrapped.c_int(int(g.list_resize(self, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size))) if (goto == 57): goto = None if (goto == 58): goto = None if (goto is None): if (not True): goto = 59 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 61 continue pass goto = 60 continue if (goto == 61): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 60): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 63 continue continue goto = 62 continue if (goto == 63): goto = None if (goto is None): goto = 59 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 59): goto = None if (goto is None): return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) if (goto == u'error'): goto = None if (goto == 64): goto = None if (goto is None): if (not True): goto = 65 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 67 continue pass goto = 66 continue if (goto == 67): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 66): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 69 continue continue goto = 68 continue if (goto == 69): goto = None if (goto is None): goto = 65 continue if (goto == 68): goto = None if (goto is None): goto = 64 continue if (goto == 65): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del b del i del iternext del self del mn del m del it del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _PyList_Extend(self, b): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) b = ctypes.cast(b, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.listextend(self, b), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del b return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_inplace_concat(self, other): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) other = ctypes.cast(other, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.listextend(self, other), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.postfixInc(ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(self, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del self del other del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listpop(self, args): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) v = ctypes.POINTER(g.PyObject)() status = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('|n:pop'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(i)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('pop from empty list'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: g.PyErr_SetString(g.PyExc_IndexError, ctypes.cast(intp._make_string('pop index out of range'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(self.contents.ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.assign(status, ctypes_wrapped.c_int(int(g.list_resize(self, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value))))).value) values.assert_a.value(ctypes_wrapped.c_int((status.value >= ctypes_wrapped.c_int(int(0L)).value))) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assign(status, ctypes_wrapped.c_int(int(g.list_ass_slice(self, i, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value) values.assert_a.value(ctypes_wrapped.c_int((status.value >= ctypes_wrapped.c_int(int(0L)).value))) (status, None)[1] return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del i del status del self del args del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def reverse_slice(lo, hi): lo = ctypes.cast(lo, ctypes.POINTER(ctypes.POINTER(g.PyObject))) hi = ctypes.cast(hi, ctypes.POINTER(ctypes.POINTER(g.PyObject))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0)))) helpers.prefixDecPtr(hi) while ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0))).value: t = ctypes.cast(lo.contents, ctypes.POINTER(g.PyObject)) helpers.assignPtr(lo.contents, (ctypes.cast(intp._storePtr(hi.contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(hi.contents, (ctypes.cast(intp._storePtr(t), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixIncPtr(lo) helpers.prefixDecPtr(hi) del t del lo del hi return @staticmethod def islt(x, y, compare): x = ctypes.cast(x, ctypes.POINTER(g.PyObject)) y = ctypes.cast(y, ctypes.POINTER(g.PyObject)) compare = ctypes.cast(compare, ctypes.POINTER(g.PyObject)) res = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.postfixInc(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.postfixInc(ctypes.cast(y, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(args, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(1L)).value).contents, (ctypes.cast(intp._storePtr(y), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(compare, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((res.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('comparison function must return int, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), res.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(i, ctypes_wrapped.c_long(int(g.PyInt_AsLong(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value del compare del i del res del args del y del x return ctypes_wrapped.c_int().value binarysort = 'Compile exception ' '' @staticmethod def count_run(lo, hi, compare, descending): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None lo = ctypes.cast(lo, ctypes.POINTER(ctypes.POINTER(g.PyObject))) hi = ctypes.cast(hi, ctypes.POINTER(ctypes.POINTER(g.PyObject))) compare = ctypes.cast(compare, ctypes.POINTER(g.PyObject)) descending = ctypes.cast(descending, ctypes.POINTER(ctypes_wrapped.c_int)) k = g.Py_ssize_t() n = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(descending.contents, ctypes_wrapped.c_int(int(0L)).value) helpers.prefixIncPtr(lo) if (not ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0))).value): goto = 1 continue return ctypes_wrapped.c_int(int(1L)).value if (goto == 1): goto = None if (goto is None): helpers.assign(n, ctypes_wrapped.c_int(int(2L)).value) if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(lo.contents, helpers.ptrArithmetic(lo, u'-', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(lo.contents, helpers.ptrArithmetic(lo, u'-', ctypes_wrapped.c_int(int(1L)).value).contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue goto = u'fail' continue if (goto == 2): goto = None if (goto is None): if (not k.value): goto = 4 continue helpers.assign(descending.contents, ctypes_wrapped.c_int(int(1L)).value) if (not True): goto = 5 continue first_iteration = True helpers.assignPtr(lo, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(lo, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not first_iteration): goto = 9 continue first_iteration = False goto = 8 continue if (goto == 9): goto = None if (goto is None): (helpers.prefixIncPtr(lo), helpers.prefixInc(n))[1] if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0))).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(lo.contents, helpers.ptrArithmetic(lo, u'-', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(lo.contents, helpers.ptrArithmetic(lo, u'-', ctypes_wrapped.c_int(int(1L)).value).contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue goto = u'fail' continue if (goto == 12): goto = None if (goto is None): if (not k.value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = 7 continue if (goto == 13): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto == 5): goto = None if (goto is None): goto = 3 continue if (goto == 4): goto = None if (goto is None): if (not True): goto = 15 continue first_iteration_a = True helpers.assignPtr(lo, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(lo, u'+', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) if (goto == 16): goto = None if (goto is None): if (not True): goto = 17 continue if (not first_iteration_a): goto = 19 continue first_iteration_a = False goto = 18 continue if (goto == 19): goto = None if (goto is None): (helpers.prefixIncPtr(lo), helpers.prefixInc(n))[1] if (goto == 18): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) < (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0))).value): goto = 21 continue pass goto = 20 continue if (goto == 21): goto = None if (goto is None): goto = 17 continue if (goto == 20): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(lo.contents, helpers.ptrArithmetic(lo, u'-', ctypes_wrapped.c_int(int(1L)).value).contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(lo.contents, helpers.ptrArithmetic(lo, u'-', ctypes_wrapped.c_int(int(1L)).value).contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue goto = u'fail' continue if (goto == 22): goto = None if (goto is None): if (not k.value): goto = 23 continue goto = 17 continue if (goto == 23): goto = None if (goto is None): goto = 16 continue if (goto == 17): goto = None if (goto == 15): goto = None if (goto == 3): goto = None if (goto is None): return n.value if (goto == u'fail'): goto = None if (goto is None): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del compare del lo del k del n del hi del descending return g.Py_ssize_t().value break @staticmethod def gallop_left(key, a, n, hint, compare): goto = None while True: if (goto is None): key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) a = ctypes.cast(a, ctypes.POINTER(ctypes.POINTER(g.PyObject))) n = g.Py_ssize_t(int(n.value)) hint = g.Py_ssize_t(int(hint.value)) compare = ctypes.cast(compare, ctypes.POINTER(g.PyObject)) ofs = g.Py_ssize_t() lastofs = g.Py_ssize_t() k = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((hint.value >= ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((hint.value < n.value)).value))) helpers.augAssignPtr(a, u'+=', hint.value) helpers.assign(lastofs, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(ofs, ctypes_wrapped.c_int(int(1L)).value) if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(a.contents, key, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(a.contents, key, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue goto = u'fail' continue if (goto == 1): goto = None if (goto is None): if (not k.value): goto = 3 continue maxofs = g.Py_ssize_t(int(ctypes_wrapped.c_long(int((n.value - hint.value))).value)) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value < maxofs.value)).value): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(a, '+', ofs.value).contents, key, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(helpers.ptrArithmetic(a, '+', ofs.value).contents, key, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = u'fail' continue if (goto == 6): goto = None if (goto is None): if (not k.value): goto = 8 continue helpers.assign(lastofs, ofs.value) helpers.assign(ofs, ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int((ofs.value << ctypes_wrapped.c_int(int(1L)).value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int((ofs.value <= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue helpers.assign(ofs, maxofs.value) if (goto == 9): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 5 continue if (goto == 7): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value > maxofs.value)).value): goto = 10 continue helpers.assign(ofs, maxofs.value) if (goto == 10): goto = None if (goto is None): helpers.augAssign(lastofs, u'+=', hint.value) helpers.augAssign(ofs, u'+=', hint.value) del maxofs goto = 2 continue if (goto == 3): goto = None if (goto is None): maxofs = g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((hint.value + ctypes_wrapped.c_int(int(1L)).value))).value)) if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value < maxofs.value)).value): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(a, u'-', ofs.value).contents, key, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(helpers.ptrArithmetic(a, u'-', ofs.value).contents, key, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'fail' continue if (goto == 13): goto = None if (goto is None): if (not k.value): goto = 14 continue goto = 12 continue if (goto == 14): goto = None if (goto is None): helpers.assign(lastofs, ofs.value) helpers.assign(ofs, ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int((ofs.value << ctypes_wrapped.c_int(int(1L)).value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int((ofs.value <= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue helpers.assign(ofs, maxofs.value) if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value > maxofs.value)).value): goto = 16 continue helpers.assign(ofs, maxofs.value) if (goto == 16): goto = None if (goto is None): helpers.assign(k, lastofs.value) helpers.assign(lastofs, ctypes_wrapped.c_long(int((hint.value - ofs.value))).value) helpers.assign(ofs, ctypes_wrapped.c_long(int((hint.value - k.value))).value) del maxofs if (goto == 2): goto = None if (goto is None): helpers.augAssignPtr(a, u'-=', hint.value) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value <= lastofs.value)).value and ctypes_wrapped.c_int((lastofs.value < ofs.value)).value)).value and ctypes_wrapped.c_int((ofs.value <= n.value)).value))) helpers.prefixInc(lastofs) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((lastofs.value < ofs.value)).value): goto = 18 continue m = g.Py_ssize_t(int(ctypes_wrapped.c_long(int((lastofs.value + ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((ofs.value - lastofs.value))).value >> ctypes_wrapped.c_int(int(1L)).value))).value))).value)) if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(a, '+', m.value).contents, key, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(helpers.ptrArithmetic(a, '+', m.value).contents, key, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue goto = u'fail' continue if (goto == 19): goto = None if (goto is None): if (not k.value): goto = 21 continue helpers.assign(lastofs, ctypes_wrapped.c_ulong(int((m.value + ctypes_wrapped.c_int(int(1L)).value))).value) goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.assign(ofs, m.value) if (goto == 20): goto = None if (goto is None): del m goto = 17 continue if (goto == 18): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((lastofs.value == ofs.value))) return ofs.value if (goto == u'fail'): goto = None if (goto is None): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del a del compare del hint del k del n del ofs del lastofs del key return g.Py_ssize_t().value break @staticmethod def gallop_right(key, a, n, hint, compare): goto = None while True: if (goto is None): key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) a = ctypes.cast(a, ctypes.POINTER(ctypes.POINTER(g.PyObject))) n = g.Py_ssize_t(int(n.value)) hint = g.Py_ssize_t(int(hint.value)) compare = ctypes.cast(compare, ctypes.POINTER(g.PyObject)) ofs = g.Py_ssize_t() lastofs = g.Py_ssize_t() k = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((hint.value >= ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((hint.value < n.value)).value))) helpers.augAssignPtr(a, u'+=', hint.value) helpers.assign(lastofs, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(ofs, ctypes_wrapped.c_int(int(1L)).value) if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(key, a.contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(key, a.contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue goto = u'fail' continue if (goto == 1): goto = None if (goto is None): if (not k.value): goto = 3 continue maxofs = g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((hint.value + ctypes_wrapped.c_int(int(1L)).value))).value)) if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value < maxofs.value)).value): goto = 5 continue if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(key, helpers.ptrArithmetic(a, u'-', ofs.value).contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(key, helpers.ptrArithmetic(a, u'-', ofs.value).contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = u'fail' continue if (goto == 6): goto = None if (goto is None): if (not k.value): goto = 8 continue helpers.assign(lastofs, ofs.value) helpers.assign(ofs, ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int((ofs.value << ctypes_wrapped.c_int(int(1L)).value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int((ofs.value <= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue helpers.assign(ofs, maxofs.value) if (goto == 9): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 5 continue if (goto == 7): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value > maxofs.value)).value): goto = 10 continue helpers.assign(ofs, maxofs.value) if (goto == 10): goto = None if (goto is None): helpers.assign(k, lastofs.value) helpers.assign(lastofs, ctypes_wrapped.c_long(int((hint.value - ofs.value))).value) helpers.assign(ofs, ctypes_wrapped.c_long(int((hint.value - k.value))).value) del maxofs goto = 2 continue if (goto == 3): goto = None if (goto is None): maxofs = g.Py_ssize_t(int(ctypes_wrapped.c_long(int((n.value - hint.value))).value)) if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value < maxofs.value)).value): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(key, helpers.ptrArithmetic(a, '+', ofs.value).contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(key, helpers.ptrArithmetic(a, '+', ofs.value).contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'fail' continue if (goto == 13): goto = None if (goto is None): if (not k.value): goto = 14 continue goto = 12 continue if (goto == 14): goto = None if (goto is None): helpers.assign(lastofs, ofs.value) helpers.assign(ofs, ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int((ofs.value << ctypes_wrapped.c_int(int(1L)).value))).value + ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int((ofs.value <= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue helpers.assign(ofs, maxofs.value) if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ofs.value > maxofs.value)).value): goto = 16 continue helpers.assign(ofs, maxofs.value) if (goto == 16): goto = None if (goto is None): helpers.augAssign(lastofs, u'+=', hint.value) helpers.augAssign(ofs, u'+=', hint.value) del maxofs if (goto == 2): goto = None if (goto is None): helpers.augAssignPtr(a, u'-=', hint.value) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value <= lastofs.value)).value and ctypes_wrapped.c_int((lastofs.value < ofs.value)).value)).value and ctypes_wrapped.c_int((ofs.value <= n.value)).value))) helpers.prefixInc(lastofs) if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((lastofs.value < ofs.value)).value): goto = 18 continue m = g.Py_ssize_t(int(ctypes_wrapped.c_long(int((lastofs.value + ctypes_wrapped.c_long(int((ctypes_wrapped.c_long(int((ofs.value - lastofs.value))).value >> ctypes_wrapped.c_int(int(1L)).value))).value))).value)) if (not ctypes_wrapped.c_int((helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(key, helpers.ptrArithmetic(a, '+', m.value).contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(key, helpers.ptrArithmetic(a, '+', m.value).contents, compare))).value))).value).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue goto = u'fail' continue if (goto == 19): goto = None if (goto is None): if (not k.value): goto = 21 continue helpers.assign(ofs, m.value) goto = 20 continue if (goto == 21): goto = None if (goto is None): helpers.assign(lastofs, ctypes_wrapped.c_ulong(int((m.value + ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 20): goto = None if (goto is None): del m goto = 17 continue if (goto == 18): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((lastofs.value == ofs.value))) return ofs.value if (goto == u'fail'): goto = None if (goto is None): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del a del compare del hint del k del n del ofs del lastofs del key return g.Py_ssize_t().value break MergeState = structs.s_MergeState @staticmethod def merge_init(ms, compare): ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) compare = ctypes.cast(compare, ctypes.POINTER(g.PyObject)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ms, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(ms.contents.compare, (ctypes.cast(intp._storePtr(compare), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ms.contents.a, (ctypes.cast(intp._storePtr(ms.contents.temparray), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ms.contents.alloced, ctypes_wrapped.c_int(int(256L)).value) helpers.assign(ms.contents.n, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(ms.contents.min_gallop, ctypes_wrapped.c_int(int(7L)).value) del compare del ms return @staticmethod def merge_freemem(ms): ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ms, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int(((ctypes.cast(ms.contents.a, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ms.contents.temparray, ctypes_wrapped.c_void_p).value or 0))).value: g.PyMem_Free(ctypes.cast(ms.contents.a, ctypes_wrapped.c_void_p)) helpers.assignPtr(ms.contents.a, (ctypes.cast(intp._storePtr(ms.contents.temparray), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(ms.contents.alloced, ctypes_wrapped.c_int(int(256L)).value) del ms return @staticmethod def merge_getmem(ms, need): ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) need = g.Py_ssize_t(int(need.value)) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ms, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((need.value <= ms.contents.alloced.value)).value: return ctypes_wrapped.c_int(int(0L)).value g.merge_freemem(ms) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(need.value)).value > ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value / ctypes_wrapped.c_size_t(8).value))).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(ms.contents.a, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyMem_Malloc(ctypes_wrapped.c_ulong(int((need.value * ctypes_wrapped.c_size_t(8).value)))), ctypes_wrapped.c_void_p), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(ms.contents.a, ctypes_wrapped.c_void_p).value or 0): helpers.assign(ms.contents.alloced, need.value) return ctypes_wrapped.c_int(int(0L)).value intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) g.merge_freemem(ms) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del need del ms return ctypes_wrapped.c_int().value @staticmethod def merge_lo(ms, pa, na, pb, nb): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) pa = ctypes.cast(pa, ctypes.POINTER(ctypes.POINTER(g.PyObject))) na = g.Py_ssize_t(int(na.value)) pb = ctypes.cast(pb, ctypes.POINTER(ctypes.POINTER(g.PyObject))) nb = g.Py_ssize_t(int(nb.value)) k = g.Py_ssize_t() compare = ctypes.POINTER(g.PyObject)() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() result = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) min_gallop = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ms, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(pa, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(pa, u'+', na.value), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0))).value))) if (not ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value)) if ctypes_wrapped.c_int((na.value <= ms.contents.alloced.value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.merge_getmem(ms, na))).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): values.memcpy.value(ctypes.cast(ms.contents.a, ctypes_wrapped.c_void_p), ctypes.cast(pa, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((na.value * ctypes_wrapped.c_size_t(8).value)))) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(pa), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(pa, (ctypes.cast(intp._storePtr(ms.contents.a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.postfixIncPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixIncPtr(pb).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixDec(nb) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue goto = u'Succeed' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 3 continue goto = u'CopyB' continue if (goto == 3): goto = None if (goto is None): helpers.assign(min_gallop, ms.contents.min_gallop.value) helpers.assignPtr(compare, (ctypes.cast(intp._storePtr(ms.contents.compare), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 4 continue first_iteration = True if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 7 continue first_iteration = False if (goto == 7): goto = None if (goto is None): acount = g.Py_ssize_t() bcount = g.Py_ssize_t() if (not True): goto = 8 continue first_iteration_a = True if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not first_iteration_a): goto = 11 continue first_iteration_a = False if (goto == 11): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(pb.contents, pa.contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(pb.contents, pa.contents, compare))).value))).value) if (not k.value): goto = 13 continue if (not ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue goto = u'Fail' continue if (goto == 14): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixIncPtr(pb).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixInc(bcount) helpers.assign(acount, ctypes_wrapped.c_int(int(0L)).value) helpers.prefixDec(nb) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue goto = u'Succeed' continue if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((bcount.value >= min_gallop.value)).value): goto = 16 continue goto = 10 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixIncPtr(pa).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixInc(acount) helpers.assign(bcount, ctypes_wrapped.c_int(int(0L)).value) helpers.prefixDec(na) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 17 continue goto = u'CopyB' continue if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((acount.value >= min_gallop.value)).value): goto = 18 continue goto = 10 continue if (goto == 18): goto = None if (goto == 12): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto == 8): goto = None if (goto is None): helpers.prefixInc(min_gallop) if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.augAssign(min_gallop, u'-=', ctypes_wrapped.c_int((min_gallop.value > ctypes_wrapped.c_int(int(1L)).value)).value) helpers.assign(ms.contents.min_gallop, min_gallop.value) helpers.assign(k, g.Py_ssize_t(int(g.gallop_right(pb.contents, pa, na, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), compare))).value) helpers.assign(acount, k.value) if (not k.value): goto = 21 continue if (not ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue goto = u'Fail' continue if (goto == 22): goto = None if (goto is None): values.memcpy.value(ctypes.cast(dest, ctypes_wrapped.c_void_p), ctypes.cast(pa, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((k.value * ctypes_wrapped.c_size_t(8).value)))) helpers.augAssignPtr(dest, u'+=', k.value) helpers.augAssignPtr(pa, u'+=', k.value) helpers.augAssign(na, u'-=', k.value) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 23 continue goto = u'CopyB' continue if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue goto = u'Succeed' continue if (goto == 24): goto = None if (goto == 21): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixIncPtr(pb).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixDec(nb) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue goto = u'Succeed' continue if (goto == 25): goto = None if (goto is None): helpers.assign(k, g.Py_ssize_t(int(g.gallop_left(pa.contents, pb, nb, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), compare))).value) helpers.assign(bcount, k.value) if (not k.value): goto = 26 continue if (not ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 27 continue goto = u'Fail' continue if (goto == 27): goto = None if (goto is None): values.memmove.value(ctypes.cast(dest, ctypes_wrapped.c_void_p), ctypes.cast(pb, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((k.value * ctypes_wrapped.c_size_t(8).value)))) helpers.augAssignPtr(dest, u'+=', k.value) helpers.augAssignPtr(pb, u'+=', k.value) helpers.augAssign(nb, u'-=', k.value) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue goto = u'Succeed' continue if (goto == 28): goto = None if (goto == 26): goto = None if (goto is None): helpers.assignPtr(helpers.postfixIncPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixIncPtr(pa).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixDec(na) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 29 continue goto = u'CopyB' continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((acount.value >= ctypes_wrapped.c_int(int(7L)).value)).value or ctypes_wrapped.c_int((bcount.value >= ctypes_wrapped.c_int(int(7L)).value)).value)).value): goto = 31 continue continue goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 20 continue if (goto == 30): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto is None): helpers.prefixInc(min_gallop) helpers.assign(ms.contents.min_gallop, min_gallop.value) del acount del bcount goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto == u'Succeed'): goto = None if (goto is None): helpers.assign(result, ctypes_wrapped.c_int(int(0L)).value) if (goto == u'Fail'): goto = None if (goto is None): if (not na.value): goto = 32 continue values.memcpy.value(ctypes.cast(dest, ctypes_wrapped.c_void_p), ctypes.cast(pa, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((na.value * ctypes_wrapped.c_size_t(8).value)))) if (goto == 32): goto = None if (goto is None): return result.value if (goto == u'CopyB'): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(0L)).value)).value))) values.memmove.value(ctypes.cast(dest, ctypes_wrapped.c_void_p), ctypes.cast(pb, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((nb.value * ctypes_wrapped.c_size_t(8).value)))) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', nb.value).contents, (ctypes.cast(intp._storePtr(pa.contents), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del min_gallop del compare del dest del na del nb del pb del pa del result del ms del k return g.Py_ssize_t().value break @staticmethod def merge_hi(ms, pa, na, pb, nb): goto = None while True: if (goto is None): first_iteration_a = None first_iteration = None ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) pa = ctypes.cast(pa, ctypes.POINTER(ctypes.POINTER(g.PyObject))) na = g.Py_ssize_t(int(na.value)) pb = ctypes.cast(pb, ctypes.POINTER(ctypes.POINTER(g.PyObject))) nb = g.Py_ssize_t(int(nb.value)) k = g.Py_ssize_t() compare = ctypes.POINTER(g.PyObject)() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() result = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) basea = ctypes.POINTER(ctypes.POINTER(g.PyObject))() baseb = ctypes.POINTER(ctypes.POINTER(g.PyObject))() min_gallop = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ms, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(pa, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(pa, u'+', na.value), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0))).value))) if (not ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value)) if ctypes_wrapped.c_int((nb.value <= ms.contents.alloced.value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.merge_getmem(ms, nb))).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(pb, u'+', nb.value), u'-', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(ms.contents.a, ctypes_wrapped.c_void_p), ctypes.cast(pb, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((nb.value * ctypes_wrapped.c_size_t(8).value)))) helpers.assignPtr(basea, (ctypes.cast(intp._storePtr(pa), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(baseb, (ctypes.cast(intp._storePtr(ms.contents.a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(pb, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(helpers.ptrArithmetic(ms.contents.a, u'+', nb.value), u'-', ctypes_wrapped.c_int(int(1L)).value)), ctypes_wrapped.c_void_p).value or 0)) helpers.augAssignPtr(pa, u'+=', ctypes_wrapped.c_ulong(int((na.value - ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assignPtr(helpers.postfixDecPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixDecPtr(pa).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixDec(na) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue goto = u'Succeed' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 3 continue goto = u'CopyA' continue if (goto == 3): goto = None if (goto is None): helpers.assign(min_gallop, ms.contents.min_gallop.value) helpers.assignPtr(compare, (ctypes.cast(intp._storePtr(ms.contents.compare), ctypes_wrapped.c_void_p).value or 0)) if (not True): goto = 4 continue first_iteration = True if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not first_iteration): goto = 7 continue first_iteration = False if (goto == 7): goto = None if (goto is None): acount = g.Py_ssize_t() bcount = g.Py_ssize_t() if (not True): goto = 8 continue first_iteration_a = True if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not first_iteration_a): goto = 11 continue first_iteration_a = False if (goto == 11): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(1L)).value)).value))) helpers.assign(k, (ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(pb.contents, pa.contents, ctypes_wrapped.c_int(int(0L))))).value)) if ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.islt(pb.contents, pa.contents, compare))).value))).value) if (not k.value): goto = 13 continue if (not ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue goto = u'Fail' continue if (goto == 14): goto = None if (goto is None): helpers.assignPtr(helpers.postfixDecPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixDecPtr(pa).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixInc(acount) helpers.assign(bcount, ctypes_wrapped.c_int(int(0L)).value) helpers.prefixDec(na) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue goto = u'Succeed' continue if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((acount.value >= min_gallop.value)).value): goto = 16 continue goto = 10 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.assignPtr(helpers.postfixDecPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixDecPtr(pb).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixInc(bcount) helpers.assign(acount, ctypes_wrapped.c_int(int(0L)).value) helpers.prefixDec(nb) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 17 continue goto = u'CopyA' continue if (goto == 17): goto = None if (goto is None): if (not ctypes_wrapped.c_int((bcount.value >= min_gallop.value)).value): goto = 18 continue goto = 10 continue if (goto == 18): goto = None if (goto == 12): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto == 8): goto = None if (goto is None): helpers.prefixInc(min_gallop) if (goto == 19): goto = None if (goto is None): if (not True): goto = 20 continue values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(1L)).value)).value))) helpers.augAssign(min_gallop, u'-=', ctypes_wrapped.c_int((min_gallop.value > ctypes_wrapped.c_int(int(1L)).value)).value) helpers.assign(ms.contents.min_gallop, min_gallop.value) helpers.assign(k, g.Py_ssize_t(int(g.gallop_right(pb.contents, basea, na, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((na.value - ctypes_wrapped.c_int(int(1L)).value))).value)), compare))).value) if (not ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 21 continue goto = u'Fail' continue if (goto == 21): goto = None if (goto is None): helpers.assign(k, ctypes_wrapped.c_long(int((na.value - k.value))).value) helpers.assign(acount, k.value) if (not k.value): goto = 22 continue helpers.augAssignPtr(dest, u'-=', k.value) helpers.augAssignPtr(pa, u'-=', k.value) values.memmove.value(ctypes.cast(helpers.ptrArithmetic(dest, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes.cast(helpers.ptrArithmetic(pa, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((k.value * ctypes_wrapped.c_size_t(8).value)))) helpers.augAssign(na, u'-=', k.value) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue goto = u'Succeed' continue if (goto == 23): goto = None if (goto == 22): goto = None if (goto is None): helpers.assignPtr(helpers.postfixDecPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixDecPtr(pb).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixDec(nb) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 24 continue goto = u'CopyA' continue if (goto == 24): goto = None if (goto is None): helpers.assign(k, g.Py_ssize_t(int(g.gallop_left(pa.contents, baseb, nb, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((nb.value - ctypes_wrapped.c_int(int(1L)).value))).value)), compare))).value) if (not ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue goto = u'Fail' continue if (goto == 25): goto = None if (goto is None): helpers.assign(k, ctypes_wrapped.c_long(int((nb.value - k.value))).value) helpers.assign(bcount, k.value) if (not k.value): goto = 26 continue helpers.augAssignPtr(dest, u'-=', k.value) helpers.augAssignPtr(pb, u'-=', k.value) values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(dest, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes.cast(helpers.ptrArithmetic(pb, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((k.value * ctypes_wrapped.c_size_t(8).value)))) helpers.augAssign(nb, u'-=', k.value) if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(1L)).value)).value): goto = 27 continue goto = u'CopyA' continue if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 28 continue goto = u'Succeed' continue if (goto == 28): goto = None if (goto == 26): goto = None if (goto is None): helpers.assignPtr(helpers.postfixDecPtr(dest), (ctypes.cast(intp._storePtr(helpers.postfixDecPtr(pa).contents), ctypes_wrapped.c_void_p).value or 0)).contents helpers.prefixDec(na) if (not ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 29 continue goto = u'Succeed' continue if (goto == 29): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((acount.value >= ctypes_wrapped.c_int(int(7L)).value)).value or ctypes_wrapped.c_int((bcount.value >= ctypes_wrapped.c_int(int(7L)).value)).value)).value): goto = 31 continue continue goto = 30 continue if (goto == 31): goto = None if (goto is None): goto = 20 continue if (goto == 30): goto = None if (goto is None): goto = 19 continue if (goto == 20): goto = None if (goto is None): helpers.prefixInc(min_gallop) helpers.assign(ms.contents.min_gallop, min_gallop.value) del acount del bcount goto = 5 continue if (goto == 6): goto = None if (goto == 4): goto = None if (goto == u'Succeed'): goto = None if (goto is None): helpers.assign(result, ctypes_wrapped.c_int(int(0L)).value) if (goto == u'Fail'): goto = None if (goto is None): if (not nb.value): goto = 32 continue values.memcpy.value(ctypes.cast(helpers.ptrArithmetic(dest, u'-', ctypes_wrapped.c_ulong(int((nb.value - ctypes_wrapped.c_int(int(1L)).value))).value), ctypes_wrapped.c_void_p), ctypes.cast(baseb, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((nb.value * ctypes_wrapped.c_size_t(8).value)))) if (goto == 32): goto = None if (goto is None): return result.value if (goto == u'CopyA'): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((nb.value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(0L)).value)).value))) helpers.augAssignPtr(dest, u'-=', na.value) helpers.augAssignPtr(pa, u'-=', na.value) values.memmove.value(ctypes.cast(helpers.ptrArithmetic(dest, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes.cast(helpers.ptrArithmetic(pa, u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((na.value * ctypes_wrapped.c_size_t(8).value)))) helpers.assignPtr(dest.contents, (ctypes.cast(intp._storePtr(pb.contents), ctypes_wrapped.c_void_p).value or 0)) return ctypes_wrapped.c_int(int(0L)).value del min_gallop del basea del compare del dest del na del nb del baseb del pb del pa del result del ms del k return g.Py_ssize_t().value break @staticmethod def merge_at(ms, i): ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) i = g.Py_ssize_t(int(i.value)) pa = ctypes.POINTER(ctypes.POINTER(g.PyObject))() pb = ctypes.POINTER(ctypes.POINTER(g.PyObject))() na = g.Py_ssize_t() nb = g.Py_ssize_t() k = g.Py_ssize_t() compare = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(ms, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ms.contents.n.value >= ctypes_wrapped.c_int(int(2L)).value))) values.assert_a.value(ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_uint(int((ms.contents.n.value - ctypes_wrapped.c_int(int(2L)).value))).value)).value or ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_uint(int((ms.contents.n.value - ctypes_wrapped.c_int(int(3L)).value))).value)).value))) helpers.assignPtr(pa, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ms.contents.pending, '+', i.value).contents.base), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(na, helpers.ptrArithmetic(ms.contents.pending, '+', i.value).contents.len.value) helpers.assignPtr(pb, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ms.contents.pending, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.base), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(nb, helpers.ptrArithmetic(ms.contents.pending, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((na.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((nb.value > ctypes_wrapped.c_int(int(0L)).value)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(pa, u'+', na.value), ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0)))) helpers.assign(helpers.ptrArithmetic(ms.contents.pending, '+', i.value).contents.len, ctypes_wrapped.c_long(int((na.value + nb.value))).value) if ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_uint(int((ms.contents.n.value - ctypes_wrapped.c_int(int(3L)).value))).value)).value: helpers.assign(helpers.ptrArithmetic(ms.contents.pending, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents, helpers.ptrArithmetic(ms.contents.pending, '+', ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(2L)).value))).value).contents) helpers.prefixDec(ms.contents.n) helpers.assignPtr(compare, (ctypes.cast(intp._storePtr(ms.contents.compare), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(k, g.Py_ssize_t(int(g.gallop_right(pb.contents, pa, na, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), compare))).value) if ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.augAssignPtr(pa, u'+=', k.value) helpers.augAssign(na, u'-=', k.value) if ctypes_wrapped.c_int((na.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(nb, g.Py_ssize_t(int(g.gallop_left(helpers.ptrArithmetic(pa, '+', ctypes_wrapped.c_ulong(int((na.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents, pb, nb, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((nb.value - ctypes_wrapped.c_int(int(1L)).value))).value)), compare))).value) if ctypes_wrapped.c_int((nb.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return nb.value if ctypes_wrapped.c_int((na.value <= nb.value)).value: return g.Py_ssize_t(int(g.merge_lo(ms, pa, na, pb, nb))).value else: return g.Py_ssize_t(int(g.merge_hi(ms, pa, na, pb, nb))).value del compare del i del na del nb del pb del pa del ms del k return g.Py_ssize_t().value @staticmethod def merge_collapse(ms): ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) p = ctypes.cast(ms.contents.pending, ctypes.POINTER(structs.s_slice)) values.assert_a.value(ms) while ctypes_wrapped.c_int((ms.contents.n.value > ctypes_wrapped.c_int(int(1L)).value)).value: n = g.Py_ssize_t(int(ctypes_wrapped.c_uint(int((ms.contents.n.value - ctypes_wrapped.c_int(int(2L)).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value <= ctypes_wrapped.c_long(int((helpers.ptrArithmetic(p, '+', n.value).contents.len.value + helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value))).value)).value)).value: if ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value < helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value)).value: helpers.prefixDec(n) if ctypes_wrapped.c_int((g.Py_ssize_t(int(g.merge_at(ms, n))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value elif ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', n.value).contents.len.value <= helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value)).value: if ctypes_wrapped.c_int((g.Py_ssize_t(int(g.merge_at(ms, n))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: break del n return ctypes_wrapped.c_int(int(0L)).value del p del ms return ctypes_wrapped.c_int().value @staticmethod def merge_force_collapse(ms): ms = ctypes.cast(ms, ctypes.POINTER(g.MergeState)) p = ctypes.cast(ms.contents.pending, ctypes.POINTER(structs.s_slice)) values.assert_a.value(ms) while ctypes_wrapped.c_int((ms.contents.n.value > ctypes_wrapped.c_int(int(1L)).value)).value: n = g.Py_ssize_t(int(ctypes_wrapped.c_uint(int((ms.contents.n.value - ctypes_wrapped.c_int(int(2L)).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value - ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value < helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_ulong(int((n.value + ctypes_wrapped.c_int(int(1L)).value))).value).contents.len.value)).value)).value: helpers.prefixDec(n) if ctypes_wrapped.c_int((g.Py_ssize_t(int(g.merge_at(ms, n))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del n return ctypes_wrapped.c_int(int(0L)).value del p del ms return ctypes_wrapped.c_int().value @staticmethod def merge_compute_minrun(n): n = g.Py_ssize_t(int(n.value)) r = g.Py_ssize_t() values.assert_a.value(ctypes_wrapped.c_int((n.value >= ctypes_wrapped.c_int(int(0L)).value))) while ctypes_wrapped.c_int((n.value >= ctypes_wrapped.c_int(int(64L)).value)).value: helpers.augAssign(r, u'|=', ctypes_wrapped.c_ulong(int((n.value & ctypes_wrapped.c_int(int(1L)).value))).value) helpers.augAssign(n, u'>>=', ctypes_wrapped.c_int(int(1L)).value) return ctypes_wrapped.c_long(int((n.value + r.value))).value del r del n return g.Py_ssize_t().value sortwrapperobject = structs._anonymous_sortwrapperobject sortwrapper_doc = (ctypes_wrapped.c_byte * 1)() # TODO init sortwrapper_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) sortwrapper_type = PyTypeObject() # TODO init sortwrapper_type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('sortwrapper'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(32).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, sortwrapper_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value)), ctypes.cast(sortwrapper_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), visitproc, ctypes_wrapped.c_void_p)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(richcmpfunc, sortwrapper_richcompare)) @staticmethod def sortwrapper_richcompare(a, b, op): a = ctypes.cast(a, ctypes.POINTER(g.sortwrapperobject)) b = ctypes.cast(b, ctypes.POINTER(g.sortwrapperobject)) op = ctypes_wrapped.c_int(int(op.value)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.sortwrapper_type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(b, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.sortwrapper_type)))).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a sortwrapperobject'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_RichCompare(a.contents.key, b.contents.key, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del b del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def sortwrapper_dealloc(so): so = ctypes.cast(so, ctypes.POINTER(g.sortwrapperobject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(so.contents.key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(so.contents.key, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(so.contents.key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(so.contents.key, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(so.contents.value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(so.contents.value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(so.contents.value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(so.contents.value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_Free(ctypes.cast(so, ctypes_wrapped.c_void_p)) del so return @staticmethod def build_sortwrapper(key, value): key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) so = ctypes.POINTER(g.sortwrapperobject)() helpers.assignPtr(so, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_New(ctypes.pointer(g.sortwrapper_type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.sortwrapperobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(so, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(so.contents.key, (ctypes.cast(intp._storePtr(key), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(so.contents.value, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(so, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del so del value del key return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def sortwrapper_getvalue(so): so = ctypes.cast(so, ctypes.POINTER(g.PyObject)) value = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(so, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.sortwrapper_type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(so, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.sortwrapper_type)))).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a sortwrapperobject'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(value, (ctypes.cast(intp._storePtr(ctypes.cast(so, ctypes.POINTER(g.sortwrapperobject)).contents.value), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0) del so del value return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) cmpwrapperobject = structs._anonymous_cmpwrapperobject @staticmethod def cmpwrapper_dealloc(co): co = ctypes.cast(co, ctypes.POINTER(g.cmpwrapperobject)) while True: if ctypes_wrapped.c_int(((ctypes.cast(co.contents.func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(co.contents.func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(co.contents.func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(co.contents.func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_Free(ctypes.cast(co, ctypes_wrapped.c_void_p)) del co return @staticmethod def cmpwrapper_call(co, args, kwds): co = ctypes.cast(co, ctypes.POINTER(g.cmpwrapperobject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) x = ctypes.POINTER(g.PyObject)() y = ctypes.POINTER(g.PyObject)() xx = ctypes.POINTER(g.PyObject)() yy = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_UnpackTuple(args, ctypes.cast(intp._make_string(''), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(2L)).value)), ctypes.pointer(x), ctypes.pointer(y)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.sortwrapper_type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.sortwrapper_type)))).value)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(y, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.sortwrapper_type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(y, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.sortwrapper_type)))).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a sortwrapperobject'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(xx, (ctypes.cast(intp._storePtr(ctypes.cast(x, ctypes.POINTER(g.sortwrapperobject)).contents.key), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(yy, (ctypes.cast(intp._storePtr(ctypes.cast(y, ctypes.POINTER(g.sortwrapperobject)).contents.key), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(co.contents.func, xx, yy, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del co del kwds del args del yy del xx del y del x return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) cmpwrapper_doc = (ctypes_wrapped.c_byte * 1)() # TODO init cmpwrapper_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) cmpwrapper_type = PyTypeObject() # TODO init cmpwrapper_type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('cmpwrapper'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(24).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, cmpwrapper_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ternaryfunc, cmpwrapper_call), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value)), ctypes.cast(cmpwrapper_doc, ctypes.POINTER(ctypes_wrapped.c_byte))) @staticmethod def build_cmpwrapper(cmpfunc_a): cmpfunc_a = ctypes.cast(cmpfunc_a, ctypes.POINTER(g.PyObject)) co = ctypes.POINTER(g.cmpwrapperobject)() helpers.assignPtr(co, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_New(ctypes.pointer(g.cmpwrapper_type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.cmpwrapperobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(co, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.postfixInc(ctypes.cast(cmpfunc_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(co.contents.func, (ctypes.cast(intp._storePtr(cmpfunc_a), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(co, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del co del cmpfunc_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listsort(self, args, kwds): goto = None while True: if (goto is None): first_iteration_b = None first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kwds = ctypes.cast(kwds, ctypes.POINTER(g.PyObject)) ms = g.MergeState() lo = ctypes.POINTER(ctypes.POINTER(g.PyObject))() hi = ctypes.POINTER(ctypes.POINTER(g.PyObject))() nremaining = g.Py_ssize_t() minrun = g.Py_ssize_t() saved_ob_size = g.Py_ssize_t() saved_allocated = g.Py_ssize_t() saved_ob_item = ctypes.POINTER(ctypes.POINTER(g.PyObject))() final_ob_item = ctypes.POINTER(ctypes.POINTER(g.PyObject))() compare = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() reverse = ctypes_wrapped.c_int() keyfunc = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() key = ctypes.POINTER(g.PyObject)() value = ctypes.POINTER(g.PyObject)() kvpair = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 4)(ctypes.cast(intp._make_string('cmp'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('key'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(intp._make_string('reverse'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if (not ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kwds, ctypes.cast(intp._make_string('|OOi:sort'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(compare), ctypes.pointer(keyfunc), ctypes.pointer(reverse)))).value))).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 3 continue helpers.assignPtr(compare, ctypes_wrapped.c_int(int(0L)).value) if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_DeprecationWarning, ctypes.cast(intp._make_string('the cmp argument is not supported in 3.x'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value)) if g.Py_Py3kWarningFlag.value else ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(0L)).value))).value < ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 4 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 4): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(keyfunc, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue helpers.assignPtr(keyfunc, ctypes_wrapped.c_int(int(0L)).value) if (goto == 5): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(keyfunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 7 continue helpers.assignPtr(compare, (ctypes.cast(intp._storePtr(intp._getPtr(g.build_cmpwrapper(compare), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 8): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue pass goto = 11 continue if (goto == 12): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(compare, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 14 continue continue goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto == 6): goto = None if (goto is None): helpers.assign(saved_ob_size, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(saved_ob_item, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(saved_allocated, self.contents.allocated.value) helpers.assign(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(self.contents.ob_item, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(self.contents.allocated, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (not ctypes_wrapped.c_int(((ctypes.cast(keyfunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue if (not True): goto = 16 continue first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 17): goto = None if (goto is None): if (not True): goto = 18 continue if (not first_iteration): goto = 20 continue first_iteration = False goto = 19 continue if (goto == 20): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < saved_ob_size.value)).value): goto = 22 continue pass goto = 21 continue if (goto == 22): goto = None if (goto is None): goto = 18 continue if (goto == 21): goto = None if (goto is None): helpers.assignPtr(value, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(saved_ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(key, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(keyfunc, value, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue if (not True): goto = 24 continue first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_ulong(int((i.value - ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 25): goto = None if (goto is None): if (not True): goto = 26 continue if (not first_iteration_a): goto = 28 continue first_iteration_a = False goto = 27 continue if (goto == 28): goto = None if (goto is None): helpers.postfixDec(i) if (goto == 27): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 30 continue pass goto = 29 continue if (goto == 30): goto = None if (goto is None): goto = 26 continue if (goto == 29): goto = None if (goto is None): helpers.assignPtr(kvpair, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(saved_ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._getPtr(g.sortwrapper_getvalue(kvpair), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(saved_ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) if (goto == 31): goto = None if (goto is None): if (not True): goto = 32 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kvpair, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 34 continue pass goto = 33 continue if (goto == 34): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kvpair, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kvpair, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 33): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 36 continue continue goto = 35 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 32): goto = None if (goto is None): goto = 25 continue if (goto == 26): goto = None if (goto == 24): goto = None if (goto is None): goto = u'dsu_fail' continue if (goto == 23): goto = None if (goto is None): helpers.assignPtr(kvpair, (ctypes.cast(intp._storePtr(intp._getPtr(g.build_sortwrapper(key, value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(kvpair, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 37 continue goto = u'dsu_fail' continue if (goto == 37): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(saved_ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(kvpair), ctypes_wrapped.c_void_p).value or 0)) goto = 17 continue if (goto == 18): goto = None if (goto == 16): goto = None if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((reverse.value and ctypes_wrapped.c_int((saved_ob_size.value > ctypes_wrapped.c_int(int(1L)).value)).value)).value): goto = 38 continue g.reverse_slice(saved_ob_item, helpers.ptrArithmetic(saved_ob_item, u'+', saved_ob_size.value)) if (goto == 38): goto = None if (goto is None): g.merge_init(ctypes.pointer(ms), compare) helpers.assign(nremaining, saved_ob_size.value) if (not ctypes_wrapped.c_int((nremaining.value < ctypes_wrapped.c_int(int(2L)).value)).value): goto = 39 continue goto = u'succeed' continue if (goto == 39): goto = None if (goto is None): helpers.assignPtr(lo, (ctypes.cast(intp._storePtr(saved_ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(hi, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(lo, u'+', nremaining.value)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(minrun, g.Py_ssize_t(int(g.merge_compute_minrun(nremaining))).value) if (goto == 40): goto = None if (goto is None): if (not True): goto = 41 continue descending = ctypes_wrapped.c_int() n = g.Py_ssize_t() helpers.assign(n, g.Py_ssize_t(int(g.count_run(lo, hi, compare, ctypes.pointer(descending)))).value) if (not ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue goto = u'fail' continue if (goto == 42): goto = None if (goto is None): if (not descending.value): goto = 43 continue g.reverse_slice(lo, helpers.ptrArithmetic(lo, u'+', n.value)) if (goto == 43): goto = None if (goto is None): if (not ctypes_wrapped.c_int((n.value < minrun.value)).value): goto = 44 continue force = g.Py_ssize_t(int((ctypes_wrapped.c_long(int(nremaining.value)) if ctypes_wrapped.c_int((nremaining.value <= minrun.value)).value else ctypes_wrapped.c_long(int(minrun.value))).value)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.binarysort(lo, helpers.ptrArithmetic(lo, u'+', force.value), helpers.ptrArithmetic(lo, u'+', n.value), compare))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue goto = u'fail' continue if (goto == 45): goto = None if (goto is None): helpers.assign(n, force.value) del force if (goto == 44): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ms.n.value < ctypes_wrapped.c_int(int(85L)).value))) helpers.assignPtr(helpers.ptrArithmetic(ms.pending, '+', ms.n.value).contents.base, (ctypes.cast(intp._storePtr(lo), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(helpers.ptrArithmetic(ms.pending, '+', ms.n.value).contents.len, n.value) helpers.prefixInc(ms.n) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.merge_collapse(ctypes.pointer(ms)))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue goto = u'fail' continue if (goto == 46): goto = None if (goto is None): helpers.augAssignPtr(lo, u'+=', n.value) helpers.augAssign(nremaining, u'-=', n.value) del descending del n if (not nremaining.value): goto = 48 continue continue goto = 47 continue if (goto == 48): goto = None if (goto is None): goto = 41 continue if (goto == 47): goto = None if (goto is None): goto = 40 continue if (goto == 41): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(lo, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(hi, ctypes_wrapped.c_void_p).value or 0)))) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.merge_force_collapse(ctypes.pointer(ms)))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 49 continue goto = u'fail' continue if (goto == 49): goto = None if (goto is None): values.assert_a.value(ctypes_wrapped.c_int((ms.n.value == ctypes_wrapped.c_int(int(1L)).value))) values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(ms.pending, '+', ctypes_wrapped.c_int(int(0L)).value).contents.base, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(saved_ob_item, ctypes_wrapped.c_void_p).value or 0)))) values.assert_a.value(ctypes_wrapped.c_int((helpers.ptrArithmetic(ms.pending, '+', ctypes_wrapped.c_int(int(0L)).value).contents.len.value == saved_ob_size.value))) if (goto == u'succeed'): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'fail'): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(keyfunc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue if (not True): goto = 51 continue first_iteration_b = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) if (goto == 52): goto = None if (goto is None): if (not True): goto = 53 continue if (not first_iteration_b): goto = 55 continue first_iteration_b = False goto = 54 continue if (goto == 55): goto = None if (goto is None): helpers.postfixInc(i) if (goto == 54): goto = None if (goto is None): if (not ctypes_wrapped.c_int((i.value < saved_ob_size.value)).value): goto = 57 continue pass goto = 56 continue if (goto == 57): goto = None if (goto is None): goto = 53 continue if (goto == 56): goto = None if (goto is None): helpers.assignPtr(kvpair, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(saved_ob_item, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(value, (ctypes.cast(intp._storePtr(intp._getPtr(g.sortwrapper_getvalue(kvpair), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(saved_ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(value), ctypes_wrapped.c_void_p).value or 0)) if (goto == 58): goto = None if (goto is None): if (not True): goto = 59 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(kvpair, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 61 continue pass goto = 60 continue if (goto == 61): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(kvpair, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(kvpair, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 60): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 63 continue continue goto = 62 continue if (goto == 63): goto = None if (goto is None): goto = 59 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 59): goto = None if (goto is None): goto = 52 continue if (goto == 53): goto = None if (goto == 51): goto = None if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((self.contents.allocated.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 64 continue g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('list modified during sort'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) if (goto == 64): goto = None if (goto is None): if (not ctypes_wrapped.c_int((reverse.value and ctypes_wrapped.c_int((saved_ob_size.value > ctypes_wrapped.c_int(int(1L)).value)).value)).value): goto = 65 continue g.reverse_slice(saved_ob_item, helpers.ptrArithmetic(saved_ob_item, u'+', saved_ob_size.value)) if (goto == 65): goto = None if (goto is None): g.merge_freemem(ctypes.pointer(ms)) if (goto == u'dsu_fail'): goto = None if (goto is None): helpers.assignPtr(final_ob_item, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(i, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assign(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, saved_ob_size.value) helpers.assignPtr(self.contents.ob_item, (ctypes.cast(intp._storePtr(saved_ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(self.contents.allocated, saved_allocated.value) if (not ctypes_wrapped.c_int(((ctypes.cast(final_ob_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 66 continue if (goto == 67): goto = None if (goto is None): if (not ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 68 continue if (goto == 69): goto = None if (goto is None): if (not True): goto = 70 continue if (not ctypes_wrapped.c_int(((ctypes.cast(helpers.ptrArithmetic(final_ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 72 continue pass goto = 71 continue if (goto == 72): goto = None if (goto == 73): goto = None if (goto is None): if (not True): goto = 74 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(final_ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 76 continue pass goto = 75 continue if (goto == 76): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(final_ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(final_ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 75): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 78 continue continue goto = 77 continue if (goto == 78): goto = None if (goto is None): goto = 74 continue if (goto == 77): goto = None if (goto is None): goto = 73 continue if (goto == 74): goto = None if (goto == 71): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 80 continue continue goto = 79 continue if (goto == 80): goto = None if (goto is None): goto = 70 continue if (goto == 79): goto = None if (goto is None): goto = 69 continue if (goto == 70): goto = None if (goto is None): goto = 67 continue if (goto == 68): goto = None if (goto is None): values.free.value(final_ob_item) if (goto == 66): goto = None if (goto == 81): goto = None if (goto is None): if (not True): goto = 82 continue if (not ctypes_wrapped.c_int(((ctypes.cast(compare, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 84 continue pass goto = 83 continue if (goto == 84): goto = None if (goto == 85): goto = None if (goto is None): if (not True): goto = 86 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(compare, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 88 continue pass goto = 87 continue if (goto == 88): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(compare, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(compare, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 87): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 90 continue continue goto = 89 continue if (goto == 90): goto = None if (goto is None): goto = 86 continue if (goto == 89): goto = None if (goto is None): goto = 85 continue if (goto == 86): goto = None if (goto == 83): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 92 continue continue goto = 91 continue if (goto == 92): goto = None if (goto is None): goto = 82 continue if (goto == 91): goto = None if (goto is None): goto = 81 continue if (goto == 82): goto = None if (goto == 93): goto = None if (goto is None): if (not True): goto = 94 continue if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 96 continue pass goto = 95 continue if (goto == 96): goto = None if (goto is None): helpers.postfixInc(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) if (goto == 95): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 98 continue continue goto = 97 continue if (goto == 98): goto = None if (goto is None): goto = 94 continue if (goto == 97): goto = None if (goto is None): goto = 93 continue if (goto == 94): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del saved_allocated del key del compare del final_ob_item del kwds del result del i del lo del self del args del kvpair del value del reverse del kwlist del hi del nremaining del saved_ob_item del ms del keyfunc del saved_ob_size del minrun return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyList_Sort(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2218))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.listsort(ctypes.cast(v, ctypes.POINTER(g.PyListObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del v return ctypes_wrapped.c_int().value @staticmethod def listreverse(self): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_int(int(1L)).value)).value: g.reverse_slice(self.contents.ob_item, helpers.ptrArithmetic(self.contents.ob_item, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyList_Reverse(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) self = ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyListObject)), ctypes.POINTER(g.PyListObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2242))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value > ctypes_wrapped.c_int(int(1L)).value)).value: g.reverse_slice(self.contents.ob_item, helpers.ptrArithmetic(self.contents.ob_item, u'+', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) return ctypes_wrapped.c_int(int(0L)).value del self del v return ctypes_wrapped.c_int().value @staticmethod def PyList_AsTuple(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.POINTER(g.PyObject)() p = ctypes.POINTER(ctypes.POINTER(g.PyObject))() q = ctypes.POINTER(ctypes.POINTER(g.PyObject))() n = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2257))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(n, ctypes.cast(v, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(p, (ctypes.cast(intp._storePtr(ctypes.cast(w, ctypes.POINTER(g.PyTupleObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(q, (ctypes.cast(intp._storePtr(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) while ctypes_wrapped.c_int((helpers.prefixDec(n).value >= ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(q.contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(p.contents, (ctypes.cast(intp._storePtr(q.contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixIncPtr(p) helpers.postfixIncPtr(q) return (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0) del q del p del n del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listindex(self, args): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() start = g.Py_ssize_t() stop = g.Py_ssize_t(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) v = ctypes.POINTER(g.PyObject)() format_tuple = ctypes.POINTER(g.PyObject)() err_string = ctypes.POINTER(g.PyObject)() err_format = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTuple(args, ctypes.cast(intp._make_string('O|O&O&:index'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(v), g._PyEval_SliceIndex, ctypes.pointer(start), g._PyEval_SliceIndex, ctypes.pointer(stop)))).value))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(start, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((start.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(start, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((stop.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(stop, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((stop.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(stop, ctypes_wrapped.c_int(int(0L)).value) if True: first_iteration = True helpers.assign(i, start.value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < stop.value)).value and ctypes_wrapped.c_int((i.value < ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: pass else: break cmp_a = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(self.contents.ob_item, '+', i.value).contents, v, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del cmp_a if ctypes_wrapped.c_int(((ctypes.cast(err_format, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(err_format, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(ctypes.cast(intp._make_string('%r is not in list'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(err_format, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(format_tuple, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_Pack(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value)), v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(format_tuple, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(err_string, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_Format(err_format, format_tuple), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(format_tuple, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(format_tuple, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(format_tuple, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(err_string, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value g.PyErr_SetObject(g.PyExc_ValueError, err_string) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(err_string, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(err_string, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(err_string, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del i del self del args del stop del start del v del err_string del err_format del format_tuple return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listcount(self, v): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) count = g.Py_ssize_t() i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break cmp_a = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(self.contents.ob_item, '+', i.value).contents, v, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(count) elif ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del cmp_a return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del count del i del self del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listremove(self, v): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: pass else: break cmp_a = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(self.contents.ob_item, '+', i.value).contents, v, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.list_ass_slice(self, i, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((i.value + ctypes_wrapped.c_int(int(1L)).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr((helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt), ctypes.pointer(g._Py_NoneStruct))[1]), ctypes_wrapped.c_void_p).value or 0) return ctypes_wrapped.c_int(int(0L)).value elif ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value del cmp_a g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('list.remove(x): x not in list'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value del i del self del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_traverse(o, visit, arg): first_iteration = None o = ctypes.cast(o, ctypes.POINTER(g.PyListObject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) i = g.Py_ssize_t() if True: first_iteration = True helpers.assign(i, ctypes.cast(o, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) while True: if first_iteration: first_iteration = False if ctypes_wrapped.c_int((helpers.prefixDec(i).value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break while True: if (ctypes.cast(helpers.ptrArithmetic(o.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(helpers.ptrArithmetic(o.contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del i del visit del o del arg return ctypes_wrapped.c_int().value @staticmethod def list_richcompare(v, w, op): first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op = ctypes_wrapped.c_int(int(op.value)) vl = ctypes.POINTER(g.PyListObject)() wl = ctypes.POINTER(g.PyListObject)() i = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(vl, (ctypes.cast(intp._storePtr(ctypes.cast(v, ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(wl, (ctypes.cast(intp._storePtr(ctypes.cast(w, ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(vl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value != ctypes.cast(wl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value or ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(3L)).value)).value)).value)).value: res = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value < ctypes.cast(vl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value and ctypes_wrapped.c_int((i.value < ctypes.cast(wl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: pass else: break k = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(helpers.ptrArithmetic(vl.contents.ob_item, '+', i.value).contents, helpers.ptrArithmetic(wl.contents.ob_item, '+', i.value).contents, ctypes_wrapped.c_int(int(2L))))).value)) if ctypes_wrapped.c_int((k.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(int((not k.value))).value: break del k if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value >= ctypes.cast(vl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value or ctypes_wrapped.c_int((i.value >= ctypes.cast(wl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: vs = g.Py_ssize_t(int(ctypes.cast(vl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) ws = g.Py_ssize_t(int(ctypes.cast(wl, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) cmp_a = ctypes_wrapped.c_int() res = ctypes.POINTER(g.PyObject)() if True: _switchvalue = None _switchvalue = op.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(0L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vs.value < ws.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vs.value <= ws.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vs.value == ws.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vs.value != ws.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(4L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vs.value > ws.value)).value) break if (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(5L)).value)): _switchfallthrough = True helpers.assign(cmp_a, ctypes_wrapped.c_int((vs.value >= ws.value)).value) break if (not _switchfallthrough): return ctypes_wrapped.c_int(int(0L)).value break del _switchfallthrough del _switchvalue if cmp_a.value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del vs del ws del cmp_a if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(2L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_ZeroStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((op.value == ctypes_wrapped.c_int(int(3L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.pointer(g._Py_TrueStruct), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_RichCompare(helpers.ptrArithmetic(vl.contents.ob_item, '+', i.value).contents, helpers.ptrArithmetic(wl.contents.ob_item, '+', i.value).contents, op), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del wl del vl del w del v del op return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_init(self, args, kw): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) kw = ctypes.cast(kw, ctypes.POINTER(g.PyObject)) arg = ctypes.POINTER(g.PyObject)() kwlist = (ctypes.POINTER(ctypes_wrapped.c_byte) * 2)(ctypes.cast(intp._make_string('sequence'), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyArg_ParseTupleAndKeywords(args, kw, ctypes.cast(intp._make_string('|O:list'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(kwlist, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.pointer(arg)))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(0L)).value <= ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value <= self.contents.allocated.value)).value or ctypes_wrapped.c_int((self.contents.allocated.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value))) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(self.contents.ob_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((self.contents.allocated.value == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((self.contents.allocated.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value))) if ctypes_wrapped.c_int(((ctypes.cast(self.contents.ob_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: (ctypes_wrapped.c_int(int(g.list_clear(self))), None)[1] if ctypes_wrapped.c_int(((ctypes.cast(arg, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: rv = ctypes.cast(intp._getPtr(g.listextend(self, arg), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(rv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(rv, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(rv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(rv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del rv return ctypes_wrapped.c_int(int(0L)).value del kwlist del self del args del kw del arg return ctypes_wrapped.c_int().value @staticmethod def list_sizeof(self): self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) res = g.Py_ssize_t() helpers.assign(res, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(40).value + ctypes_wrapped.c_ulong(int((self.contents.allocated.value * ctypes_wrapped.c_size_t(8).value))).value))).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(res), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del res del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) getitem_doc = (ctypes_wrapped.c_byte * 1)() # TODO init getitem_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) reversed_doc = (ctypes_wrapped.c_byte * 1)() # TODO init reversed_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) sizeof_doc__list = (ctypes_wrapped.c_byte * 1)() # TODO init sizeof_doc__list with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) append_doc = (ctypes_wrapped.c_byte * 1)() # TODO init append_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) extend_doc = (ctypes_wrapped.c_byte * 1)() # TODO init extend_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) insert_doc = (ctypes_wrapped.c_byte * 1)() # TODO init insert_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) pop_doc = (ctypes_wrapped.c_byte * 1)() # TODO init pop_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) remove_doc = (ctypes_wrapped.c_byte * 1)() # TODO init remove_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) index_doc__list = (ctypes_wrapped.c_byte * 1)() # TODO init index_doc__list with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) count__list = (ctypes_wrapped.c_byte * 1)() # TODO init count__list with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) reverse_doc = (ctypes_wrapped.c_byte * 1)() # TODO init reverse_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) sort_doc = (ctypes_wrapped.c_byte * 1)() # TODO init sort_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) list_methods = (PyMethodDef * 13)() # TODO init list_methods with (PyMethodDef * 13)(structs.PyMethodDef(ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, list_subscript), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(8L)).value | ctypes_wrapped.c_int(int(64L)).value))).value)), ctypes.cast(getitem_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__reversed__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, list_reversed), ctypes_wrapped.c_int(int(4L)), ctypes.cast(reversed_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('__sizeof__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, list_sizeof), ctypes_wrapped.c_int(int(4L)), ctypes.cast(sizeof_doc__list, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('append'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listappend), ctypes_wrapped.c_int(int(8L)), ctypes.cast(append_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('insert'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listinsert), ctypes_wrapped.c_int(int(1L)), ctypes.cast(insert_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('extend'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listextend), ctypes_wrapped.c_int(int(8L)), ctypes.cast(extend_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('pop'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listpop), ctypes_wrapped.c_int(int(1L)), ctypes.cast(pop_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('remove'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listremove), ctypes_wrapped.c_int(int(8L)), ctypes.cast(remove_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('index'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listindex), ctypes_wrapped.c_int(int(1L)), ctypes.cast(index_doc__list, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('count'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listcount), ctypes_wrapped.c_int(int(8L)), ctypes.cast(count__list, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('reverse'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listreverse), ctypes_wrapped.c_int(int(4L)), ctypes.cast(reverse_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(ctypes.cast(intp._make_string('sort'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listsort), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value | ctypes_wrapped.c_int(int(2L)).value))).value)), ctypes.cast(sort_doc, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) list_as_sequence = PySequenceMethods() # TODO init list_as_sequence with PySequenceMethods(helpers.makeFuncPtr(lenfunc, list_length), helpers.makeFuncPtr(binaryfunc, list_concat), helpers.makeFuncPtr(ssizeargfunc, list_repeat), helpers.makeFuncPtr(ssizeargfunc, list_item), helpers.makeFuncPtr(ssizessizeargfunc, list_slice), helpers.makeFuncPtr(ssizeobjargproc, list_ass_item), helpers.makeFuncPtr(ssizessizeobjargproc, list_ass_slice), helpers.makeFuncPtr(objobjproc, list_contains), helpers.makeFuncPtr(binaryfunc, list_inplace_concat), helpers.makeFuncPtr(ssizeargfunc, list_inplace_repeat)) list_doc = (ctypes_wrapped.c_byte * 1)() # TODO init list_doc with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) @staticmethod def list_subscript(self, item): first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((item.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: i = g.Py_ssize_t() helpers.assign(i, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(item, g.PyExc_IndexError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.list_item(self, i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PySlice_Type), ctypes_wrapped.c_void_p).value or 0))).value: start = g.Py_ssize_t() stop = g.Py_ssize_t() step = g.Py_ssize_t() slicelength = g.Py_ssize_t() cur = g.Py_ssize_t() i = g.Py_ssize_t() result = ctypes.POINTER(g.PyObject)() it = ctypes.POINTER(g.PyObject)() src = ctypes.POINTER(ctypes.POINTER(g.PyObject))() dest = ctypes.POINTER(ctypes.POINTER(g.PyObject))() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySlice_GetIndicesEx(ctypes.cast(item, ctypes.POINTER(g.PySliceObject)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes.pointer(start), ctypes.pointer(stop), ctypes.pointer(step), ctypes.pointer(slicelength)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((slicelength.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int((step.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.list_slice(self, start, stop), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(slicelength), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(src, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(ctypes.cast(result, ctypes.POINTER(g.PyListObject)).contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True (helpers.assign(cur, start.value), helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: (helpers.augAssign(cur, u'+=', step.value), helpers.postfixInc(i))[1] if ctypes_wrapped.c_int((i.value < slicelength.value)).value: pass else: break helpers.assignPtr(it, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(src, '+', cur.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(dest, '+', i.value).contents, (ctypes.cast(intp._storePtr(it), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del src del cur del i del slicelength del stop del it del dest del start del step del result else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('list indices must be integers, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), item.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del item del self return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def list_ass_subscript(self, item, value): first_iteration_c = None first_iteration_b = None first_iteration_a = None first_iteration = None self = ctypes.cast(self, ctypes.POINTER(g.PyListObject)) item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((item.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: i = g.Py_ssize_t(int(g.Py_ssize_t(int(g.PyNumber_AsSsize_t(item, g.PyExc_IndexError))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i, u'+=', ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) return ctypes_wrapped.c_int(int(g.list_ass_item(self, i, value))).value del i elif ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PySlice_Type), ctypes_wrapped.c_void_p).value or 0))).value: start = g.Py_ssize_t() stop = g.Py_ssize_t() step = g.Py_ssize_t() slicelength = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySlice_GetIndicesEx(ctypes.cast(item, ctypes.POINTER(g.PySliceObject)), ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, ctypes.pointer(start), ctypes.pointer(stop), ctypes.pointer(step), ctypes.pointer(slicelength)))).value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((step.value == ctypes_wrapped.c_int(int(1L)).value)).value: return ctypes_wrapped.c_int(int(g.list_ass_slice(self, start, stop, value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((step.value < ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((start.value < stop.value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((step.value > ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((start.value > stop.value)).value)).value)).value: helpers.assign(stop, start.value) if ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: garbage_a = ctypes.POINTER(ctypes.POINTER(g.PyObject))() cur = ctypes_wrapped.c_ulong() i = g.Py_ssize_t() if ctypes_wrapped.c_int((slicelength.value <= ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((step.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(stop, ctypes_wrapped.c_ulong(int((start.value + ctypes_wrapped.c_int(int(1L)).value))).value) helpers.assign(start, ctypes_wrapped.c_ulong(int((stop.value + ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((step.value * ctypes_wrapped.c_ulong(int((slicelength.value - ctypes_wrapped.c_int(int(1L)).value))).value))).value - ctypes_wrapped.c_int(int(1L)).value))).value))).value) helpers.assign(step, g.Py_ssize_t(int((- step.value))).value) values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(slicelength.value)).value <= ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value / ctypes_wrapped.c_size_t(8).value))).value))) helpers.assignPtr(garbage_a, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((slicelength.value * ctypes_wrapped.c_size_t(8).value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((slicelength.value * ctypes_wrapped.c_size_t(8).value))).value)) if ctypes_wrapped.c_ulong(int((slicelength.value * ctypes_wrapped.c_size_t(8).value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(garbage_a, ctypes_wrapped.c_void_p).value or 0))).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True (helpers.assign(cur, start.value), helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration: first_iteration = False else: (helpers.augAssign(cur, u'+=', step.value), helpers.postfixInc(i))[1] if ctypes_wrapped.c_int((cur.value < ctypes_wrapped.c_ulong(int(stop.value)).value)).value: pass else: break lim = g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((step.value - ctypes_wrapped.c_int(int(1L)).value))).value)) helpers.assignPtr(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(self, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', cur.value).contents), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((cur.value + step.value))).value >= ctypes_wrapped.c_ulong(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: helpers.assign(lim, ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - cur.value))).value - ctypes_wrapped.c_int(int(1L)).value))).value) values.memmove.value(ctypes.cast(helpers.ptrArithmetic(helpers.ptrArithmetic(self.contents.ob_item, u'+', cur.value), u'-', i.value), ctypes_wrapped.c_void_p), ctypes.cast(helpers.ptrArithmetic(helpers.ptrArithmetic(self.contents.ob_item, u'+', cur.value), u'+', ctypes_wrapped.c_int(int(1L)).value), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((lim.value * ctypes_wrapped.c_size_t(8).value)))) del lim helpers.assign(cur, ctypes_wrapped.c_long(int((start.value + ctypes_wrapped.c_long(int((slicelength.value * step.value))).value))).value) if ctypes_wrapped.c_int((cur.value < ctypes_wrapped.c_ulong(int(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: values.memmove.value(ctypes.cast(helpers.ptrArithmetic(helpers.ptrArithmetic(self.contents.ob_item, u'+', cur.value), u'-', slicelength.value), ctypes_wrapped.c_void_p), ctypes.cast(helpers.ptrArithmetic(self.contents.ob_item, u'+', cur.value), ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int((ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - cur.value))).value * ctypes_wrapped.c_size_t(8).value)))) helpers.augAssign(ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size, u'-=', slicelength.value) ctypes_wrapped.c_int(int(g.list_resize(self, ctypes.cast(self, ctypes.POINTER(g.PyVarObject)).contents.ob_size))) if True: first_iteration_a = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < slicelength.value)).value: pass else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.free.value(garbage_a) return ctypes_wrapped.c_int(int(0L)).value del i del garbage_a del cur else: ins = ctypes.POINTER(g.PyObject)() seq = ctypes.POINTER(g.PyObject)() garbage_a = ctypes.POINTER(ctypes.POINTER(g.PyObject))() seqitems = ctypes.POINTER(ctypes.POINTER(g.PyObject))() selfitems = ctypes.POINTER(ctypes.POINTER(g.PyObject))() cur = g.Py_ssize_t() i = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(self, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyListObject)), ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(intp._getPtr(g.list_slice(ctypes.cast(value, ctypes.POINTER(g.PyListObject)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(value, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_Fast(value, ctypes.cast(intp._make_string('must assign iterable to extended slice'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(((ctypes_wrapped.c_long(int(ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_long(int(ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))).value != slicelength.value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_ValueError, ctypes.cast(intp._make_string('attempt to assign sequence of size %zd to extended slice of size %zd'), ctypes.POINTER(ctypes_wrapped.c_byte)), (ctypes_wrapped.c_long(int(ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes_wrapped.c_long(int(ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value))), slicelength), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if g.Py_ssize_t(int((not slicelength.value))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(garbage_a, (ctypes.cast(intp._storePtr(ctypes.cast((intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes_wrapped.c_void_p) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((slicelength.value * ctypes_wrapped.c_size_t(8).value))).value)).value > ctypes_wrapped.c_ulong(int(g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value)).value else ctypes.cast(values.malloc.value((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_ulong(int((slicelength.value * ctypes_wrapped.c_size_t(8).value))).value)) if ctypes_wrapped.c_ulong(int((slicelength.value * ctypes_wrapped.c_size_t(8).value))).value else ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int(1L)).value)))), ctypes_wrapped.c_void_p)), ctypes.POINTER(ctypes.POINTER(g.PyObject)))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((not (ctypes.cast(garbage_a, ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(selfitems, (ctypes.cast(intp._storePtr(self.contents.ob_item), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(seqitems, (ctypes.cast(intp._storePtr((ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyListObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value else ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, ctypes.POINTER(ctypes.POINTER(g.PyObject))))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_b = True (helpers.assign(cur, start.value), helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value))[1] while True: if first_iteration_b: first_iteration_b = False else: (helpers.augAssign(cur, u'+=', step.value), helpers.postfixInc(i))[1] if ctypes_wrapped.c_int((i.value < slicelength.value)).value: pass else: break helpers.assignPtr(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(selfitems, '+', cur.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(ins, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(seqitems, '+', i.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(ins, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(helpers.ptrArithmetic(selfitems, '+', cur.value).contents, (ctypes.cast(intp._storePtr(ins), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration_c = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_c: first_iteration_c = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < slicelength.value)).value: pass else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(helpers.ptrArithmetic(garbage_a, '+', i.value).contents, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break values.free.value(garbage_a) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del seqitems del cur del seq del i del selfitems del ins del garbage_a del start del step del stop del slicelength else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('list indices must be integers, not %.200s'), ctypes.POINTER(ctypes_wrapped.c_byte)), item.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del item del self del value return ctypes_wrapped.c_int().value list_as_mapping = PyMappingMethods() # TODO init list_as_mapping with PyMappingMethods(helpers.makeFuncPtr(lenfunc, list_length), helpers.makeFuncPtr(binaryfunc, list_subscript), helpers.makeFuncPtr(objobjargproc, list_ass_subscript)) PyList_Type = PyTypeObject() # TODO init PyList_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('list'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(40).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, list_dealloc), helpers.makeFuncPtr(printfunc, list_print), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(reprfunc, list_repr), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), ctypes.pointer(list_as_sequence), ctypes.pointer(list_as_mapping), helpers.makeFuncPtr(hashfunc, PyObject_HashNotImplemented), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(10L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value)), ctypes.cast(list_doc, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, list_traverse), helpers.makeFuncPtr(inquiry, list_clear), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int), list_richcompare), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), list_iter), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.cast(list_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyGetSetDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs._typeobject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyObject)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(initproc, list_init), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), Py_ssize_t), PyType_GenericAlloc), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(structs._typeobject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyType_GenericNew), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_void_p), PyObject_GC_Del)) listiterobject = structs._anonymous_listiterobject length_hint_doc__list = (ctypes_wrapped.c_byte * 1)() # TODO init length_hint_doc__list with (ctypes_wrapped.c_byte * 1)(*intp._make_string('')) listiter_methods = (PyMethodDef * 2)() # TODO init listiter_methods with (PyMethodDef * 2)(structs.PyMethodDef(ctypes.cast(intp._make_string('__length_hint__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listiter_len), ctypes_wrapped.c_int(int(4L)), ctypes.cast(length_hint_doc__list, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyListIter_Type = PyTypeObject() # TODO init PyListIter_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('listiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(32).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, listiter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, listiter_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, listiter_next), ctypes.cast(listiter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def list_iter(seq): seq = ctypes.cast(seq, ctypes.POINTER(g.PyObject)) it = ctypes.POINTER(g.listiterobject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: g._PyErr_BadInternalCall(ctypes.cast(intp._make_string('./CPython/Objects/listobject.c'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_int(int(2870))) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(it, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyListIter_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.listiterobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assign(it.contents.it_index, ctypes_wrapped.c_int(int(0L)).value) helpers.postfixInc(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(it.contents.it_seq, (ctypes.cast(intp._storePtr(ctypes.cast(seq, ctypes.POINTER(g.PyListObject))), ctypes_wrapped.c_void_p).value or 0)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(it, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) if ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('GC object already tracked'), ctypes.POINTER(ctypes_wrapped.c_byte))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(3L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g._PyGC_generation0), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g._PyGC_generation0.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._PyGC_generation0.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a), ctypes_wrapped.c_void_p).value or 0)) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(ctypes.cast(it, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del it del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listiter_dealloc(it): it = ctypes.cast(it, ctypes.POINTER(g.listiterobject)) while True: g_a = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(it, ctypes.POINTER(g.PyGC_Head)), u'-', ctypes_wrapped.c_int(int(1L)).value), ctypes.POINTER(g.PyGC_Head)) values.assert_a.value(ctypes_wrapped.c_int((g_a.contents.gc.gc_refs.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value))) helpers.assign(g_a.contents.gc.gc_refs, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(2L)).value))).value) helpers.assignPtr(g_a.contents.gc.gc_prev.contents.gc.gc_next, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_next), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next.contents.gc.gc_prev, (ctypes.cast(intp._storePtr(g_a.contents.gc.gc_prev), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g_a.contents.gc.gc_next, ctypes_wrapped.c_int(int(0L)).value) del g_a if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int(((ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(it, ctypes_wrapped.c_void_p)) del it return @staticmethod def listiter_traverse(it, visit, arg): it = ctypes.cast(it, ctypes.POINTER(g.listiterobject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) while True: if (ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del visit del it del arg return ctypes_wrapped.c_int().value @staticmethod def listiter_next(it): it = ctypes.cast(it, ctypes.POINTER(g.listiterobject)) seq = ctypes.POINTER(g.PyListObject)() item = ctypes.POINTER(g.PyObject)() values.assert_a.value(ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value))) helpers.assignPtr(seq, (ctypes.cast(intp._storePtr(it.contents.it_seq), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if ctypes_wrapped.c_int((it.contents.it_index.value < ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value: helpers.assignPtr(item, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', it.contents.it_index.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixInc(it.contents.it_index) helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(it.contents.it_seq, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del item del it del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listiter_len(it): it = ctypes.cast(it, ctypes.POINTER(g.listiterobject)) len_a = g.Py_ssize_t() if (ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0): helpers.assign(len_a, ctypes_wrapped.c_long(int((ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - it.contents.it_index.value))).value) if ctypes_wrapped.c_int((len_a.value >= ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(len_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del len_a del it return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) listreviterobject = structs._anonymous_listreviterobject listreviter_methods = (PyMethodDef * 2)() # TODO init listreviter_methods with (PyMethodDef * 2)(structs.PyMethodDef(ctypes.cast(intp._make_string('__length_hint__'), ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(PyCFunction, listreviter_len), ctypes_wrapped.c_int(int(4L)), ctypes.cast(length_hint_doc__list, ctypes.POINTER(ctypes_wrapped.c_byte))), structs.PyMethodDef(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value))) PyListRevIter_Type = PyTypeObject() # TODO init PyListRevIter_Type with PyTypeObject(ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(1L)).value)), ctypes.pointer(PyType_Type), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.cast(intp._make_string('listreverseiterator'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_size_t(32).value)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(destructor, listreviter_dealloc), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_int), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(ctypes_wrapped.c_byte), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyNumberMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PySequenceMethods)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyMappingMethods)), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_long), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject)), PyObject_GenericGetAttr), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(PyBufferProcs)), ctypes_wrapped.c_long(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(5L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(6L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value | ctypes_wrapped.c_int(int(0L)).value))).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(14L)).value))).value))).value)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), helpers.makeFuncPtr(traverseproc, listreviter_traverse), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes_wrapped.c_int), ctypes.POINTER(PyObject))(ctypes_wrapped.c_int(int(0L)).value), ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject), ctypes.POINTER(PyObject), ctypes_wrapped.c_int)(ctypes_wrapped.c_int(int(0L)).value), ctypes_wrapped.c_long(int(ctypes_wrapped.c_int(int(0L)).value)), helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(PyObject)), ctypes.POINTER(PyObject)), PyObject_SelfIter), helpers.makeFuncPtr(iternextfunc, listreviter_next), ctypes.cast(listreviter_methods, ctypes.POINTER(structs.PyMethodDef)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(structs.PyMemberDef))) @staticmethod def list_reversed(seq, unused): seq = ctypes.cast(seq, ctypes.POINTER(g.PyListObject)) unused = ctypes.cast(unused, ctypes.POINTER(g.PyObject)) it = ctypes.POINTER(g.listreviterobject)() helpers.assignPtr(it, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g._PyObject_GC_New(ctypes.pointer(g.PyListRevIter_Type)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.listreviterobject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) helpers.assign(it.contents.it_index, ctypes_wrapped.c_ulong(int((ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value - ctypes_wrapped.c_int(int(1L)).value))).value) helpers.postfixInc(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(it.contents.it_seq, (ctypes.cast(intp._storePtr(seq), ctypes_wrapped.c_void_p).value or 0)) g.PyObject_GC_Track(ctypes.cast(it, ctypes_wrapped.c_void_p)) return (ctypes.cast(intp._storePtr(ctypes.cast(it, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del unused del it del seq return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listreviter_dealloc(it): it = ctypes.cast(it, ctypes.POINTER(g.listreviterobject)) g.PyObject_GC_UnTrack(ctypes.cast(it, ctypes_wrapped.c_void_p)) while True: if ctypes_wrapped.c_int(((ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyObject_GC_Del(ctypes.cast(it, ctypes_wrapped.c_void_p)) del it return @staticmethod def listreviter_traverse(it, visit, arg): it = ctypes.cast(it, ctypes.POINTER(g.listreviterobject)) visit = ctypes.cast(visit, g.visitproc) arg = ctypes.cast(arg, ctypes_wrapped.c_void_p) while True: if (ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0): vret = ctypes_wrapped.c_int(int(helpers.checkedFuncPtrCall(visit, ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyObject)), arg).value)) if vret.value: return vret.value del vret if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del visit del it del arg return ctypes_wrapped.c_int().value @staticmethod def listreviter_next(it): it = ctypes.cast(it, ctypes.POINTER(g.listreviterobject)) item = ctypes.POINTER(g.PyObject)() index = g.Py_ssize_t(int(it.contents.it_index.value)) seq = ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyListObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((index.value >= ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((index.value < ctypes.cast(seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value)).value)).value: helpers.assignPtr(item, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(seq, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', index.value).contents), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixDec(it.contents.it_index) helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0) helpers.assign(it.contents.it_index, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(it.contents.it_seq, ctypes_wrapped.c_int(int(0L)).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(seq, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(seq, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del item del it del seq del index return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def listreviter_len(it): it = ctypes.cast(it, ctypes.POINTER(g.listreviterobject)) len_a = g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((it.contents.it_index.value + ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(it.contents.it_seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes.cast(it.contents.it_seq, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value < len_a.value)).value)).value: helpers.assign(len_a, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromSsize_t(len_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del len_a del it return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) digit = ctypes_wrapped.c_ushort sdigit = ctypes_wrapped.c_short twodigits = ctypes_wrapped.c_ulong stwodigits = ctypes_wrapped.c_long @staticmethod def _PyLong_New(__dummy_a): __dummy_a = g.Py_ssize_t(int(__dummy_a.value)) raise Exception(u"Function '_PyLong_New' only predeclared. Body is missing. Missing C source code.") del __dummy_a return (ctypes.cast(ctypes.POINTER(g.PyLongObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyLong_Copy(src): src = ctypes.cast(src, ctypes.POINTER(g.PyLongObject)) raise Exception(u"Function '_PyLong_Copy' only predeclared. Body is missing. Missing C source code.") del src return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def type_error(msg, obj): msg = ctypes.cast(msg, ctypes.POINTER(ctypes_wrapped.c_byte)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, msg, obj.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del msg del obj return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def null_error(): if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('null argument to internal routine'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Cmp(o1, o2, result): o1 = ctypes.cast(o1, ctypes.POINTER(g.PyObject)) o2 = ctypes.cast(o2, ctypes.POINTER(g.PyObject)) result = ctypes.cast(result, ctypes.POINTER(ctypes_wrapped.c_int)) r = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o1, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(o2, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(r, ctypes_wrapped.c_int(int(g.PyObject_Compare(o1, o2))).value) if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(result.contents, r.value) return ctypes_wrapped.c_int(int(0L)).value del r del o2 del o1 del result return ctypes_wrapped.c_int().value @staticmethod def PyObject_Type(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) v = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(ctypes.cast(o.contents.ob_type, ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del o del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Size(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(m.contents.sq_length, o).value return g.Py_ssize_t(int(g.PyMapping_Size(o))).value del m del o return g.Py_ssize_t().value @staticmethod def PyObject_Length(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) return g.Py_ssize_t(int(g.PyObject_Size(o))).value del o return g.Py_ssize_t().value @staticmethod def _PyObject_LengthHint(o, defaultvalue): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) defaultvalue = g.Py_ssize_t(int(defaultvalue.value)) hintstrobj = ctypes.POINTER(g.PyObject)() ro = ctypes.POINTER(g.PyObject)() hintmeth = ctypes.POINTER(g.PyObject)() rv = g.Py_ssize_t() helpers.assign(rv, g.Py_ssize_t(int(g.PyObject_Size(o))).value) if ctypes_wrapped.c_int((rv.value >= ctypes_wrapped.c_int(int(0L)).value)).value: return rv.value if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value))).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value g.PyErr_Clear() if ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: return defaultvalue.value helpers.assignPtr(hintmeth, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_LookupSpecial(o, ctypes.cast(intp._make_string('__length_hint__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(hintstrobj)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(hintmeth, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value else: return defaultvalue.value helpers.assignPtr(ro, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(hintmeth, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(hintmeth, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(hintmeth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(hintmeth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(ro, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value))).value and ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value g.PyErr_Clear() return defaultvalue.value helpers.assign(rv, (ctypes_wrapped.c_long(int(g.Py_ssize_t(int(g.PyInt_AsSsize_t(ro))).value)) if ctypes_wrapped.c_int(int(g.PyNumber_Check(ro))).value else ctypes_wrapped.c_long(int(defaultvalue.value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(ro, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(ro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(ro, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return rv.value del rv del defaultvalue del hintmeth del o del hintstrobj del ro return g.Py_ssize_t().value @staticmethod def PyObject_GetItem(o, key): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyMappingMethods)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.mp_subscript, o, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(key.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((key.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(key.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: key_value = g.Py_ssize_t() helpers.assign(key_value, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(key, g.PyExc_IndexError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((key_value.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_GetItem(o, key_value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del key_value elif (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0): return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("sequence index must be integer, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object has no attribute '__getitem__'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m del key del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_SetItem(o, key, value): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyMappingMethods)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(m.contents.mp_ass_subscript, o, key, value).value if (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(key.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((key.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(key.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: key_value = g.Py_ssize_t() helpers.assign(key_value, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(key, g.PyExc_IndexError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((key_value.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.PySequence_SetItem(o, key_value, value))).value del key_value elif (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0): intp._getPtr(g.type_error(ctypes.cast(intp._make_string("sequence index must be integer, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), key), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object does not support item assignment"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del value del m del key del o return ctypes_wrapped.c_int().value @staticmethod def PyObject_DelItem(o, key): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyMappingMethods)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(m.contents.mp_ass_subscript, o, key, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value if (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(key.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((key.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(key.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: key_value = g.Py_ssize_t() helpers.assign(key_value, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(key, g.PyExc_IndexError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((key_value.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(g.PySequence_DelItem(o, key_value))).value del key_value elif (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0): intp._getPtr(g.type_error(ctypes.cast(intp._make_string("sequence index must be integer, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), key), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object does not support item deletion"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del m del key del o return ctypes_wrapped.c_int().value @staticmethod def PyObject_DelItemString(o, key): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) okey = ctypes.POINTER(g.PyObject)() ret = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(okey, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(okey, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(ret, ctypes_wrapped.c_int(int(g.PyObject_DelItem(o, okey))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(okey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(okey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(okey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ret.value del okey del key del o del ret return ctypes_wrapped.c_int().value @staticmethod def PyObject_AsCharBuffer(obj, buffer_a, buffer_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) buffer_len = ctypes.cast(buffer_len, ctypes.POINTER(g.Py_ssize_t)) pb = ctypes.POINTER(g.PyBufferProcs)() pp = ctypes.POINTER(ctypes_wrapped.c_byte)() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(buffer_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(buffer_len, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(pb, (ctypes.cast(intp._storePtr(obj.contents.ob_type.contents.tp_as_buffer), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getcharbuffer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a character buffer object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(pb.contents.bf_getsegcount, obj, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.Py_ssize_t))).value != ctypes_wrapped.c_int(int(1L)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a single-segment buffer object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(len_a, helpers.checkedFuncPtrCall(pb.contents.bf_getcharbuffer, obj, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.pointer(pp)).value) if ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(buffer_a.contents, (ctypes.cast(intp._storePtr(pp), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(buffer_len.contents, len_a.value) return ctypes_wrapped.c_int(int(0L)).value del pb del pp del obj del len_a del buffer_len del buffer_a return ctypes_wrapped.c_int().value @staticmethod def PyObject_CheckReadBuffer(obj): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) pb = ctypes.cast(obj.contents.ob_type.contents.tp_as_buffer, ctypes.POINTER(g.PyBufferProcs)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(pb.contents.bf_getsegcount, obj, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.Py_ssize_t))).value != ctypes_wrapped.c_int(int(1L)).value)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(int(1L)).value del pb del obj return ctypes_wrapped.c_int().value @staticmethod def PyObject_AsReadBuffer(obj, buffer_a, buffer_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_void_p)) buffer_len = ctypes.cast(buffer_len, ctypes.POINTER(g.Py_ssize_t)) pb = ctypes.POINTER(g.PyBufferProcs)() pp = ctypes_wrapped.c_void_p() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(buffer_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(buffer_len, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(pb, (ctypes.cast(intp._storePtr(obj.contents.ob_type.contents.tp_as_buffer), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getreadbuffer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a readable buffer object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(pb.contents.bf_getsegcount, obj, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.Py_ssize_t))).value != ctypes_wrapped.c_int(int(1L)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a single-segment buffer object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(len_a, helpers.checkedFuncPtrCall(pb.contents.bf_getreadbuffer, obj, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.pointer(pp)).value) if ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(buffer_a.contents, (ctypes.cast(intp._storePtr(pp), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(buffer_len.contents, len_a.value) return ctypes_wrapped.c_int(int(0L)).value del pb del pp del obj del len_a del buffer_len del buffer_a return ctypes_wrapped.c_int().value @staticmethod def PyObject_AsWriteBuffer(obj, buffer_a, buffer_len): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) buffer_a = ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_void_p)) buffer_len = ctypes.cast(buffer_len, ctypes.POINTER(g.Py_ssize_t)) pb = ctypes.POINTER(g.PyBufferProcs)() pp = ctypes_wrapped.c_void_p() len_a = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(buffer_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(buffer_len, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(pb, (ctypes.cast(intp._storePtr(obj.contents.ob_type.contents.tp_as_buffer), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(pb, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getwritebuffer, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(pb.contents.bf_getsegcount, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a writeable buffer object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((helpers.checkedFuncPtrCall(pb.contents.bf_getsegcount, obj, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.Py_ssize_t))).value != ctypes_wrapped.c_int(int(1L)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('expected a single-segment buffer object'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(len_a, helpers.checkedFuncPtrCall(pb.contents.bf_getwritebuffer, obj, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value)), ctypes.pointer(pp)).value) if ctypes_wrapped.c_int((len_a.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(buffer_a.contents, (ctypes.cast(intp._storePtr(pp), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(buffer_len.contents, len_a.value) return ctypes_wrapped.c_int(int(0L)).value del pb del pp del obj del len_a del buffer_len del buffer_a return ctypes_wrapped.c_int().value @staticmethod def PyObject_GetBuffer(obj, view, flags): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) flags = ctypes_wrapped.c_int(int(flags.value)) if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj.contents.ob_type.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((obj.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(obj.contents.ob_type.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%100s' does not have the buffer interface"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return helpers.checkedFuncPtrCall(obj.contents.ob_type.contents.tp_as_buffer.contents.bf_getbuffer, obj, view, flags).value del flags del obj del view return ctypes_wrapped.c_int().value @staticmethod def _IsFortranContiguous(view): first_iteration = None view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) sd = g.Py_ssize_t() dim = g.Py_ssize_t() i = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((view.contents.ndim.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int(((ctypes.cast(view.contents.strides, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int((view.contents.ndim.value == ctypes_wrapped.c_int(int(1L)).value)).value helpers.assign(sd, view.contents.itemsize.value) if ctypes_wrapped.c_int((view.contents.ndim.value == ctypes_wrapped.c_int(int(1L)).value)).value: return ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(view.contents.shape, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes_wrapped.c_int(int(1L)).value)).value or ctypes_wrapped.c_int((sd.value == helpers.ptrArithmetic(view.contents.strides, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < view.contents.ndim.value)).value: pass else: break helpers.assign(dim, helpers.ptrArithmetic(view.contents.shape, '+', i.value).contents.value) if ctypes_wrapped.c_int((dim.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int((helpers.ptrArithmetic(view.contents.strides, '+', i.value).contents.value != sd.value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.augAssign(sd, u'*=', dim.value) return ctypes_wrapped.c_int(int(1L)).value del i del dim del sd del view return ctypes_wrapped.c_int().value @staticmethod def _IsCContiguous(view): first_iteration = None view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) sd = g.Py_ssize_t() dim = g.Py_ssize_t() i = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((view.contents.ndim.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int(((ctypes.cast(view.contents.strides, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value helpers.assign(sd, view.contents.itemsize.value) if ctypes_wrapped.c_int((view.contents.ndim.value == ctypes_wrapped.c_int(int(1L)).value)).value: return ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.ptrArithmetic(view.contents.shape, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value == ctypes_wrapped.c_int(int(1L)).value)).value or ctypes_wrapped.c_int((sd.value == helpers.ptrArithmetic(view.contents.strides, '+', ctypes_wrapped.c_int(int(0L)).value).contents.value)).value)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_uint(int((view.contents.ndim.value - ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration: first_iteration = False else: helpers.postfixDec(i) if ctypes_wrapped.c_int((i.value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.assign(dim, helpers.ptrArithmetic(view.contents.shape, '+', i.value).contents.value) if ctypes_wrapped.c_int((dim.value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int((helpers.ptrArithmetic(view.contents.strides, '+', i.value).contents.value != sd.value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.augAssign(sd, u'*=', dim.value) return ctypes_wrapped.c_int(int(1L)).value del i del dim del sd del view return ctypes_wrapped.c_int().value @staticmethod def PyBuffer_IsContiguous(view, fort): view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) fort = ctypes_wrapped.c_byte(int(fort.value)) if ctypes_wrapped.c_int(((ctypes.cast(view.contents.suboffsets, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((fort.value == ctypes.c_byte(67).value)).value: return ctypes_wrapped.c_int(int(g._IsCContiguous(view))).value elif ctypes_wrapped.c_int((fort.value == ctypes.c_byte(70).value)).value: return ctypes_wrapped.c_int(int(g._IsFortranContiguous(view))).value elif ctypes_wrapped.c_int((fort.value == ctypes.c_byte(65).value)).value: return ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._IsCContiguous(view))).value or ctypes_wrapped.c_int(int(g._IsFortranContiguous(view))).value)).value return ctypes_wrapped.c_int(int(0L)).value del fort del view return ctypes_wrapped.c_int().value @staticmethod def PyBuffer_GetPointer(view, indices): first_iteration = None view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) indices = ctypes.cast(indices, ctypes.POINTER(g.Py_ssize_t)) pointer = ctypes.POINTER(ctypes_wrapped.c_byte)() i = ctypes_wrapped.c_int() helpers.assignPtr(pointer, (ctypes.cast(intp._storePtr(ctypes.cast(view.contents.buf, ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes_wrapped.c_void_p).value or 0)) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < view.contents.ndim.value)).value: pass else: break helpers.augAssignPtr(pointer, u'+=', ctypes_wrapped.c_long(int((helpers.ptrArithmetic(view.contents.strides, '+', i.value).contents.value * helpers.ptrArithmetic(indices, '+', i.value).contents.value))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(view.contents.suboffsets, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((helpers.ptrArithmetic(view.contents.suboffsets, '+', i.value).contents.value >= ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(pointer, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(pointer, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))).contents, u'+', helpers.ptrArithmetic(view.contents.suboffsets, '+', i.value).contents.value)), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(ctypes.cast(pointer, ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0) del indices del i del pointer del view return (ctypes.cast(ctypes_wrapped.c_void_p(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_add_one_to_index_F(nd, index, shape): first_iteration = None nd = ctypes_wrapped.c_int(int(nd.value)) index = ctypes.cast(index, ctypes.POINTER(g.Py_ssize_t)) shape = ctypes.cast(shape, ctypes.POINTER(g.Py_ssize_t)) k = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(k) if ctypes_wrapped.c_int((k.value < nd.value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(index, '+', k.value).contents.value < ctypes_wrapped.c_ulong(int((helpers.ptrArithmetic(shape, '+', k.value).contents.value - ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.postfixInc(helpers.ptrArithmetic(index, '+', k.value).contents) break else: helpers.assign(helpers.ptrArithmetic(index, '+', k.value).contents, ctypes_wrapped.c_int(int(0L)).value) del index del shape del nd del k return @staticmethod def _Py_add_one_to_index_C(nd, index, shape): first_iteration = None nd = ctypes_wrapped.c_int(int(nd.value)) index = ctypes.cast(index, ctypes.POINTER(g.Py_ssize_t)) shape = ctypes.cast(shape, ctypes.POINTER(g.Py_ssize_t)) k = ctypes_wrapped.c_int() if True: first_iteration = True helpers.assign(k, ctypes_wrapped.c_uint(int((nd.value - ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration: first_iteration = False else: helpers.postfixDec(k) if ctypes_wrapped.c_int((k.value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((helpers.ptrArithmetic(index, '+', k.value).contents.value < ctypes_wrapped.c_ulong(int((helpers.ptrArithmetic(shape, '+', k.value).contents.value - ctypes_wrapped.c_int(int(1L)).value))).value)).value: helpers.postfixInc(helpers.ptrArithmetic(index, '+', k.value).contents) break else: helpers.assign(helpers.ptrArithmetic(index, '+', k.value).contents, ctypes_wrapped.c_int(int(0L)).value) del index del shape del nd del k return @staticmethod def PyBuffer_ToContiguous(buf, view, len_a, fort): first_iteration = None buf = ctypes.cast(buf, ctypes_wrapped.c_void_p) view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) len_a = g.Py_ssize_t(int(len_a.value)) fort = ctypes_wrapped.c_byte(int(fort.value)) k = ctypes_wrapped.c_int() addone = ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_int, ctypes.POINTER(g.Py_ssize_t), ctypes.POINTER(g.Py_ssize_t))() indices = ctypes.POINTER(g.Py_ssize_t)() elements = g.Py_ssize_t() dest = ctypes.POINTER(ctypes_wrapped.c_byte)() ptr = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((len_a.value > view.contents.len.value)).value: helpers.assign(len_a, view.contents.len.value) if ctypes_wrapped.c_int(int(g.PyBuffer_IsContiguous(view, fort))).value: values.memcpy.value(buf, view.contents.buf, ctypes_wrapped.c_ulong(len_a.value)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(indices, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyMem_Malloc(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(8).value * view.contents.ndim.value)))), ctypes_wrapped.c_void_p), ctypes.POINTER(g.Py_ssize_t))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(indices, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(k) if ctypes_wrapped.c_int((k.value < view.contents.ndim.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(indices, '+', k.value).contents, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((fort.value == ctypes.c_byte(70).value)).value: helpers.assignPtr(addone, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_int, ctypes.POINTER(g.Py_ssize_t), ctypes.POINTER(g.Py_ssize_t)), g._Py_add_one_to_index_F), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(addone, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_int, ctypes.POINTER(g.Py_ssize_t), ctypes.POINTER(g.Py_ssize_t)), g._Py_add_one_to_index_C), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(dest, (ctypes.cast(intp._storePtr(buf), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(elements, ctypes_wrapped.c_long(int((len_a.value / view.contents.itemsize.value))).value) while helpers.postfixDec(elements).value: helpers.checkedFuncPtrCall(addone, view.contents.ndim, indices, view.contents.shape) helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBuffer_GetPointer(view, indices), ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(dest, ctypes_wrapped.c_void_p), ctypes.cast(ptr, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(view.contents.itemsize.value)) helpers.augAssignPtr(dest, u'+=', view.contents.itemsize.value) g.PyMem_Free(ctypes.cast(indices, ctypes_wrapped.c_void_p)) return ctypes_wrapped.c_int(int(0L)).value del elements del dest del k del len_a del addone del indices del view del buf del ptr del fort return ctypes_wrapped.c_int().value @staticmethod def PyBuffer_FromContiguous(view, buf, len_a, fort): first_iteration = None view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) buf = ctypes.cast(buf, ctypes_wrapped.c_void_p) len_a = g.Py_ssize_t(int(len_a.value)) fort = ctypes_wrapped.c_byte(int(fort.value)) k = ctypes_wrapped.c_int() addone = ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_int, ctypes.POINTER(g.Py_ssize_t), ctypes.POINTER(g.Py_ssize_t))() indices = ctypes.POINTER(g.Py_ssize_t)() elements = g.Py_ssize_t() src = ctypes.POINTER(ctypes_wrapped.c_byte)() ptr = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((len_a.value > view.contents.len.value)).value: helpers.assign(len_a, view.contents.len.value) if ctypes_wrapped.c_int(int(g.PyBuffer_IsContiguous(view, fort))).value: values.memcpy.value(view.contents.buf, buf, ctypes_wrapped.c_ulong(len_a.value)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(indices, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyMem_Malloc(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(8).value * view.contents.ndim.value)))), ctypes_wrapped.c_void_p), ctypes.POINTER(g.Py_ssize_t))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(indices, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(k) if ctypes_wrapped.c_int((k.value < view.contents.ndim.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(indices, '+', k.value).contents, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((fort.value == ctypes.c_byte(70).value)).value: helpers.assignPtr(addone, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_int, ctypes.POINTER(g.Py_ssize_t), ctypes.POINTER(g.Py_ssize_t)), g._Py_add_one_to_index_F), ctypes_wrapped.c_void_p).value or 0)) else: helpers.assignPtr(addone, (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(None), ctypes_wrapped.c_int, ctypes.POINTER(g.Py_ssize_t), ctypes.POINTER(g.Py_ssize_t)), g._Py_add_one_to_index_C), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(src, (ctypes.cast(intp._storePtr(buf), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(elements, ctypes_wrapped.c_long(int((len_a.value / view.contents.itemsize.value))).value) while helpers.postfixDec(elements).value: helpers.checkedFuncPtrCall(addone, view.contents.ndim, indices, view.contents.shape) helpers.assignPtr(ptr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBuffer_GetPointer(view, indices), ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(ptr, ctypes_wrapped.c_void_p), ctypes.cast(src, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(view.contents.itemsize.value)) helpers.augAssignPtr(src, u'+=', view.contents.itemsize.value) g.PyMem_Free(ctypes.cast(indices, ctypes_wrapped.c_void_p)) return ctypes_wrapped.c_int(int(0L)).value del src del elements del k del len_a del addone del indices del view del buf del ptr del fort return ctypes_wrapped.c_int().value @staticmethod def PyObject_CopyData(dest, src): first_iteration_a = None first_iteration = None dest = ctypes.cast(dest, ctypes.POINTER(g.PyObject)) src = ctypes.cast(src, ctypes.POINTER(g.PyObject)) view_dest = g.Py_buffer() view_src = g.Py_buffer() k = ctypes_wrapped.c_int() indices = ctypes.POINTER(g.Py_ssize_t)() elements = g.Py_ssize_t() dptr = ctypes.POINTER(ctypes_wrapped.c_byte)() sptr = ctypes.POINTER(ctypes_wrapped.c_byte)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(dest.contents.ob_type.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((dest.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(dest.contents.ob_type.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(src.contents.ob_type.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((src.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(21L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(src.contents.ob_type.contents.tp_as_buffer.contents.bf_getbuffer, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('both destination and source must have the buffer interface'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_GetBuffer(dest, ctypes.pointer(view_dest), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(256L)).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(16L)).value | ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(1L)).value))).value | ctypes_wrapped.c_int(int(4L)).value))).value))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyObject_GetBuffer(src, ctypes.pointer(view_src), ctypes_wrapped.c_int(int(ctypes_wrapped.c_uint(int((ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(256L)).value | ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(16L)).value | ctypes_wrapped.c_int(int(8L)).value))).value))).value | ctypes_wrapped.c_int(int(4L)).value))).value))))).value != ctypes_wrapped.c_int(int(0L)).value)).value: g.PyBuffer_Release(ctypes.pointer(view_dest)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((view_dest.len.value < view_src.len.value)).value: g.PyErr_SetString(g.PyExc_BufferError, ctypes.cast(intp._make_string('destination is too small to receive data from source'), ctypes.POINTER(ctypes_wrapped.c_byte))) g.PyBuffer_Release(ctypes.pointer(view_dest)) g.PyBuffer_Release(ctypes.pointer(view_src)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyBuffer_IsContiguous(ctypes.pointer(view_dest), ctypes.c_byte(67)))).value and ctypes_wrapped.c_int(int(g.PyBuffer_IsContiguous(ctypes.pointer(view_src), ctypes.c_byte(67)))).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyBuffer_IsContiguous(ctypes.pointer(view_dest), ctypes.c_byte(70)))).value and ctypes_wrapped.c_int(int(g.PyBuffer_IsContiguous(ctypes.pointer(view_src), ctypes.c_byte(70)))).value)).value)).value: values.memcpy.value(view_dest.buf, view_src.buf, ctypes_wrapped.c_ulong(view_src.len.value)) g.PyBuffer_Release(ctypes.pointer(view_dest)) g.PyBuffer_Release(ctypes.pointer(view_src)) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(indices, (ctypes.cast(intp._storePtr(ctypes.cast(intp._getPtr(g.PyMem_Malloc(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_size_t(8).value * view_src.ndim.value)))), ctypes_wrapped.c_void_p), ctypes.POINTER(g.Py_ssize_t))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(indices, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) g.PyBuffer_Release(ctypes.pointer(view_dest)) g.PyBuffer_Release(ctypes.pointer(view_src)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if True: first_iteration = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(k) if ctypes_wrapped.c_int((k.value < view_src.ndim.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(indices, '+', k.value).contents, ctypes_wrapped.c_int(int(0L)).value) helpers.assign(elements, ctypes_wrapped.c_int(int(1L)).value) if True: first_iteration_a = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixInc(k) if ctypes_wrapped.c_int((k.value < view_src.ndim.value)).value: pass else: break helpers.augAssign(elements, u'*=', helpers.ptrArithmetic(view_src.shape, '+', k.value).contents.value) while helpers.postfixDec(elements).value: g._Py_add_one_to_index_C(view_src.ndim, indices, view_src.shape) helpers.assignPtr(dptr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBuffer_GetPointer(ctypes.pointer(view_dest), indices), ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(sptr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyBuffer_GetPointer(ctypes.pointer(view_src), indices), ctypes_wrapped.c_void_p)), ctypes_wrapped.c_void_p).value or 0)) values.memcpy.value(ctypes.cast(dptr, ctypes_wrapped.c_void_p), ctypes.cast(sptr, ctypes_wrapped.c_void_p), ctypes_wrapped.c_ulong(view_src.itemsize.value)) g.PyMem_Free(ctypes.cast(indices, ctypes_wrapped.c_void_p)) g.PyBuffer_Release(ctypes.pointer(view_dest)) g.PyBuffer_Release(ctypes.pointer(view_src)) return ctypes_wrapped.c_int(int(0L)).value del view_src del src del elements del view_dest del dest del k del dptr del indices del sptr return ctypes_wrapped.c_int().value @staticmethod def PyBuffer_FillContiguousStrides(nd, shape, strides, itemsize, fort): first_iteration_a = None first_iteration = None nd = ctypes_wrapped.c_int(int(nd.value)) shape = ctypes.cast(shape, ctypes.POINTER(g.Py_ssize_t)) strides = ctypes.cast(strides, ctypes.POINTER(g.Py_ssize_t)) itemsize = ctypes_wrapped.c_int(int(itemsize.value)) fort = ctypes_wrapped.c_byte(int(fort.value)) k = ctypes_wrapped.c_int() sd = g.Py_ssize_t() helpers.assign(sd, itemsize.value) if ctypes_wrapped.c_int((fort.value == ctypes.c_byte(70).value)).value: if True: first_iteration = True helpers.assign(k, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(k) if ctypes_wrapped.c_int((k.value < nd.value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(strides, '+', k.value).contents, sd.value) helpers.augAssign(sd, u'*=', helpers.ptrArithmetic(shape, '+', k.value).contents.value) elif True: first_iteration_a = True helpers.assign(k, ctypes_wrapped.c_uint(int((nd.value - ctypes_wrapped.c_int(int(1L)).value))).value) while True: if first_iteration_a: first_iteration_a = False else: helpers.postfixDec(k) if ctypes_wrapped.c_int((k.value >= ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break helpers.assign(helpers.ptrArithmetic(strides, '+', k.value).contents, sd.value) helpers.augAssign(sd, u'*=', helpers.ptrArithmetic(shape, '+', k.value).contents.value) return del k del nd del strides del shape del itemsize del sd del fort return @staticmethod def PyBuffer_FillInfo(view, obj, buf, len_a, readonly, flags): view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) buf = ctypes.cast(buf, ctypes_wrapped.c_void_p) len_a = g.Py_ssize_t(int(len_a.value)) readonly = ctypes_wrapped.c_int(int(readonly.value)) flags = ctypes_wrapped.c_int(int(flags.value)) if ctypes_wrapped.c_int(((ctypes.cast(view, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(1L)).value))).value == ctypes_wrapped.c_int(int(1L)).value)).value and ctypes_wrapped.c_int((readonly.value == ctypes_wrapped.c_int(int(1L)).value)).value)).value: g.PyErr_SetString(g.PyExc_BufferError, ctypes.cast(intp._make_string('Object is not writable.'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(view.contents.obj, (ctypes.cast(intp._storePtr(obj), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0): helpers.postfixInc(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(view.contents.buf, (ctypes.cast(intp._storePtr(buf), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(view.contents.len, len_a.value) helpers.assign(view.contents.readonly, readonly.value) helpers.assign(view.contents.itemsize, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(view.contents.format, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(4L)).value))).value == ctypes_wrapped.c_int(int(4L)).value)).value: helpers.assignPtr(view.contents.format, (ctypes.cast(intp._storePtr(intp._make_string('B')), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(view.contents.ndim, ctypes_wrapped.c_int(int(1L)).value) helpers.assignPtr(view.contents.shape, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(8L)).value))).value == ctypes_wrapped.c_int(int(8L)).value)).value: helpers.assignPtr(view.contents.shape, (ctypes.cast(intp._storePtr(ctypes.pointer(view.contents.len)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(view.contents.strides, ctypes_wrapped.c_int(int(0L)).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(16L)).value | ctypes_wrapped.c_int(int(8L)).value))).value))).value == ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(16L)).value | ctypes_wrapped.c_int(int(8L)).value))).value)).value: helpers.assignPtr(view.contents.strides, (ctypes.cast(intp._storePtr(ctypes.pointer(view.contents.itemsize)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(view.contents.suboffsets, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(view.contents.internal, ctypes_wrapped.c_int(int(0L)).value) return ctypes_wrapped.c_int(int(0L)).value del obj del len_a del readonly del flags del buf del view return ctypes_wrapped.c_int().value @staticmethod def PyBuffer_Release(view): view = ctypes.cast(view, ctypes.POINTER(g.Py_buffer)) obj = ctypes.cast(view.contents.obj, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_buffer, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_buffer.contents.bf_releasebuffer, ctypes_wrapped.c_void_p).value or 0))).value: helpers.checkedFuncPtrCall(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_as_buffer.contents.bf_releasebuffer, obj, view) while True: if ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(obj, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(view.contents.obj, ctypes_wrapped.c_int(int(0L)).value) del obj del view return @staticmethod def PyObject_Format(obj, format_spec): goto = None while True: if (goto is None): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_spec = ctypes.cast(format_spec, ctypes.POINTER(g.PyObject)) empty = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(format_spec, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue helpers.assignPtr(empty, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(format_spec, (ctypes.cast(intp._storePtr(empty), ctypes_wrapped.c_void_p).value or 0)) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(format_spec, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('format expects arg 2 to be string or unicode, not %.100s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(format_spec, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = u'done' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(obj.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 4 continue bound_method = ctypes.cast(intp._getPtr(g.PyObject_GetAttrString(obj, ctypes.cast(intp._make_string('__format__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(bound_method, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(bound_method, format_spec, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bound_method, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bound_method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bound_method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 12 continue continue goto = 11 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): self_as_str = ctypes.POINTER(g.PyObject)() format_method = ctypes.POINTER(g.PyObject)() format_len = g.Py_ssize_t() g.PyErr_Clear() helpers.assign(format_len, ctypes.cast(format_spec, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) helpers.assignPtr(self_as_str, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Str(obj), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(self_as_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue goto = u'done1' continue if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int((format_len.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_PendingDeprecationWarning, ctypes.cast(intp._make_string('object.__format__ with a non-empty format string is deprecated'), ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue goto = u'done1' continue if (goto == 15): goto = None if (goto == 14): goto = None if (goto is None): helpers.assignPtr(format_method, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(self_as_str, ctypes.cast(intp._make_string('__format__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(format_method, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue goto = u'done1' continue if (goto == 16): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(format_method, format_spec, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == u'done1'): goto = None if (goto == 17): goto = None if (goto is None): if (not True): goto = 18 continue if (not ctypes_wrapped.c_int(((ctypes.cast(self_as_str, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 20 continue pass goto = 19 continue if (goto == 20): goto = None if (goto == 21): goto = None if (goto is None): if (not True): goto = 22 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(self_as_str, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 24 continue pass goto = 23 continue if (goto == 24): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(self_as_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(self_as_str, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 23): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 26 continue continue goto = 25 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 22): goto = None if (goto == 19): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 18 continue if (goto == 27): goto = None if (goto is None): goto = 17 continue if (goto == 18): goto = None if (goto == 29): goto = None if (goto is None): if (not True): goto = 30 continue if (not ctypes_wrapped.c_int(((ctypes.cast(format_method, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue pass goto = 31 continue if (goto == 32): goto = None if (goto == 33): goto = None if (goto is None): if (not True): goto = 34 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(format_method, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 36 continue pass goto = 35 continue if (goto == 36): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(format_method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(format_method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 35): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 38 continue continue goto = 37 continue if (goto == 38): goto = None if (goto is None): goto = 34 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 34): goto = None if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 40 continue continue goto = 39 continue if (goto == 40): goto = None if (goto is None): goto = 30 continue if (goto == 39): goto = None if (goto is None): goto = 29 continue if (goto == 30): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 41 continue goto = u'done' continue if (goto == 41): goto = None if (goto is None): del self_as_str del format_len del format_method if (goto == 5): goto = None if (goto is None): del bound_method goto = 3 continue if (goto == 4): goto = None if (goto is None): format_cache = ctypes.POINTER(g.PyObject)() method = ctypes.cast(intp._getPtr(g._PyObject_LookupSpecial(obj, ctypes.cast(intp._make_string('__format__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(format_cache)), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(method, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 42 continue if (not ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value): goto = 43 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("Type %.100s doesn't define __format__"), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 43): goto = None if (goto is None): goto = u'done' continue if (goto == 42): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(method, format_spec, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 44): goto = None if (goto is None): if (not True): goto = 45 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(method, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 47 continue pass goto = 46 continue if (goto == 47): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(method, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 49 continue continue goto = 48 continue if (goto == 49): goto = None if (goto is None): goto = 45 continue if (goto == 48): goto = None if (goto is None): goto = 44 continue if (goto == 45): goto = None if (goto is None): del method del format_cache if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 50 continue goto = u'done' continue if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 51 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('%.100s.__format__ must return string or unicode, not %.100s'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(obj, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name, ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 52): goto = None if (goto is None): if (not True): goto = 53 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 55 continue pass goto = 54 continue if (goto == 55): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 54): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 57 continue continue goto = 56 continue if (goto == 57): goto = None if (goto is None): goto = 53 continue if (goto == 56): goto = None if (goto is None): goto = 52 continue if (goto == 53): goto = None if (goto is None): helpers.assignPtr(result, ctypes_wrapped.c_int(int(0L)).value) goto = u'done' continue if (goto == 51): goto = None if (goto == u'done'): goto = None if (goto == 58): goto = None if (goto is None): if (not True): goto = 59 continue if (not ctypes_wrapped.c_int(((ctypes.cast(empty, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 61 continue pass goto = 60 continue if (goto == 61): goto = None if (goto == 62): goto = None if (goto is None): if (not True): goto = 63 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(empty, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 65 continue pass goto = 64 continue if (goto == 65): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(empty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(empty, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 64): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 67 continue continue goto = 66 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 66): goto = None if (goto is None): goto = 62 continue if (goto == 63): goto = None if (goto == 60): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 69 continue continue goto = 68 continue if (goto == 69): goto = None if (goto is None): goto = 59 continue if (goto == 68): goto = None if (goto is None): goto = 58 continue if (goto == 59): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del obj del empty del format_spec del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyNumber_Check(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(o.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type.contents.tp_as_number.contents.nb_int, ctypes_wrapped.c_void_p).value or 0) or (ctypes.cast(o.contents.ob_type.contents.tp_as_number.contents.nb_float, ctypes_wrapped.c_void_p).value or 0))).value)).value del o return ctypes_wrapped.c_int().value @staticmethod def binary_op1(v, w, op_slot): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op_slot = ctypes_wrapped.c_int(int(op_slot.value)) x = ctypes.POINTER(g.PyObject)() slotv = g.binaryfunc() slotw = g.binaryfunc() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(slotv, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.binaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(slotw, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(w.contents.ob_type.contents.tp_as_number, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.binaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(slotv, ctypes_wrapped.c_void_p).value or 0))).value: helpers.assignPtr(slotw, ctypes_wrapped.c_int(int(0L)).value) if (ctypes.cast(slotv, ctypes_wrapped.c_void_p).value or 0): if ctypes_wrapped.c_int(((ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(w.contents.ob_type, v.contents.ob_type))).value)).value: helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotw, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(slotw, ctypes_wrapped.c_int(int(0L)).value) helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotv, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if (ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotw, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value: err = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.PyNumber_CoerceEx(ctypes.pointer(v), ctypes.pointer(w)))).value)) if ctypes_wrapped.c_int((err.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((err.value == ctypes_wrapped.c_int(int(0L)).value)).value: mv = ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes.POINTER(g.PyNumberMethods)) if (ctypes.cast(mv, ctypes_wrapped.c_void_p).value or 0): slot = g.binaryfunc() helpers.assignPtr(slot, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(mv, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.binaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(slot, ctypes_wrapped.c_void_p).value or 0): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slot, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) del slot while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del mv del err helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NotImplementedStruct)), ctypes_wrapped.c_void_p).value or 0) del op_slot del w del v del x del slotw del slotv return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def binop_type_error(v, w, op_name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op_name = ctypes.cast(op_name, ctypes.POINTER(ctypes_wrapped.c_byte)) intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("unsupported operand type(s) for %.100s: '%.100s' and '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), op_name, v.contents.ob_type.contents.tp_name, w.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del op_name del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def binary_op(v, w, op_slot, op_name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) op_slot = ctypes_wrapped.c_int(int(op_slot.value)) op_name = ctypes.cast(op_name, ctypes.POINTER(ctypes_wrapped.c_byte)) result = ctypes.cast(intp._getPtr(g.binary_op1(v, w, op_slot), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.binop_type_error(v, w, op_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result del op_slot del op_name del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def ternary_op(v, w, z, op_slot, op_name): goto = None while True: if (goto is None): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) z = ctypes.cast(z, ctypes.POINTER(g.PyObject)) op_slot = ctypes_wrapped.c_int(int(op_slot.value)) op_name = ctypes.cast(op_name, ctypes.POINTER(ctypes_wrapped.c_byte)) mv = ctypes.POINTER(g.PyNumberMethods)() mw = ctypes.POINTER(g.PyNumberMethods)() mz = ctypes.POINTER(g.PyNumberMethods)() x = ctypes.POINTER(g.PyObject)() slotv = g.ternaryfunc() slotw = g.ternaryfunc() slotz = g.ternaryfunc() helpers.assignPtr(mv, (ctypes.cast(intp._storePtr(v.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(mw, (ctypes.cast(intp._storePtr(w.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mv, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue helpers.assignPtr(slotv, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(mv, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.ternaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(w.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(v.contents.ob_type, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(mw, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 2 continue helpers.assignPtr(slotw, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(mw, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.ternaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(slotv, ctypes_wrapped.c_void_p).value or 0))).value): goto = 3 continue helpers.assignPtr(slotw, ctypes_wrapped.c_int(int(0L)).value) if (goto == 3): goto = None if (goto == 2): goto = None if (goto is None): if (not (ctypes.cast(slotv, ctypes_wrapped.c_void_p).value or 0)): goto = 4 continue if (not ctypes_wrapped.c_int(((ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(int(g.PyType_IsSubtype(w.contents.ob_type, v.contents.ob_type))).value)).value): goto = 5 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotw, v, w, z), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 6 continue return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) if (goto == 6): goto = None if (goto == 7): goto = None if (goto is None): if (not True): goto = 8 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 10 continue pass goto = 9 continue if (goto == 10): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 9): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 12 continue continue goto = 11 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 11): goto = None if (goto is None): goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.assignPtr(slotw, ctypes_wrapped.c_int(int(0L)).value) if (goto == 5): goto = None if (goto is None): helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotv, v, w, z), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 13 continue return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) if (goto == 13): goto = None if (goto == 14): goto = None if (goto is None): if (not True): goto = 15 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 17 continue pass goto = 16 continue if (goto == 17): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 19 continue continue goto = 18 continue if (goto == 19): goto = None if (goto is None): goto = 15 continue if (goto == 18): goto = None if (goto is None): goto = 14 continue if (goto == 15): goto = None if (goto == 4): goto = None if (goto is None): if (not (ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0)): goto = 20 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotw, v, w, z), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 21 continue return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) if (goto == 21): goto = None if (goto == 22): goto = None if (goto is None): if (not True): goto = 23 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 25 continue pass goto = 24 continue if (goto == 25): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 24): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 27 continue continue goto = 26 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 26): goto = None if (goto is None): goto = 22 continue if (goto == 23): goto = None if (goto == 20): goto = None if (goto is None): helpers.assignPtr(mz, (ctypes.cast(intp._storePtr(z.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mz, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((z.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 28 continue helpers.assignPtr(slotz, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(mz, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.ternaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(slotz, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(slotv, ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(slotz, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(slotw, ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 29 continue helpers.assignPtr(slotz, ctypes_wrapped.c_int(int(0L)).value) if (goto == 29): goto = None if (goto is None): if (not (ctypes.cast(slotz, ctypes_wrapped.c_void_p).value or 0)): goto = 30 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotz, v, w, z), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 31 continue return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) if (goto == 31): goto = None if (goto == 32): goto = None if (goto is None): if (not True): goto = 33 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 35 continue pass goto = 34 continue if (goto == 35): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 34): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 37 continue continue goto = 36 continue if (goto == 37): goto = None if (goto is None): goto = 33 continue if (goto == 36): goto = None if (goto is None): goto = 32 continue if (goto == 33): goto = None if (goto == 30): goto = None if (goto == 28): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((w.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(z, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((z.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(4L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value)).value): goto = 38 continue v1 = ctypes.POINTER(g.PyObject)() z1 = ctypes.POINTER(g.PyObject)() w2 = ctypes.POINTER(g.PyObject)() z2 = ctypes.POINTER(g.PyObject)() c = ctypes_wrapped.c_int() helpers.assign(c, ctypes_wrapped.c_int(int(g.PyNumber_Coerce(ctypes.pointer(v), ctypes.pointer(w)))).value) if (not ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue goto = u'error3' continue if (goto == 39): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(z, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 40 continue if (not (ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0)): goto = 42 continue helpers.assignPtr(slotz, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.ternaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if (not (ctypes.cast(slotz, ctypes_wrapped.c_void_p).value or 0)): goto = 44 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotz, v, w, z), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 43 continue if (goto == 44): goto = None if (goto is None): helpers.assign(c, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 43): goto = None if (goto is None): goto = 41 continue if (goto == 42): goto = None if (goto is None): helpers.assign(c, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 41): goto = None if (goto is None): goto = u'error2' continue if (goto == 40): goto = None if (goto is None): helpers.assignPtr(v1, (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(z1, (ctypes.cast(intp._storePtr(z), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(c, ctypes_wrapped.c_int(int(g.PyNumber_Coerce(ctypes.pointer(v1), ctypes.pointer(z1)))).value) if (not ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 45 continue goto = u'error2' continue if (goto == 45): goto = None if (goto is None): helpers.assignPtr(w2, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(z2, (ctypes.cast(intp._storePtr(z1), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(c, ctypes_wrapped.c_int(int(g.PyNumber_Coerce(ctypes.pointer(w2), ctypes.pointer(z2)))).value) if (not ctypes_wrapped.c_int((c.value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 46 continue goto = u'error1' continue if (goto == 46): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(v1.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 48 continue helpers.assignPtr(slotv, (ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(v1.contents.ob_type.contents.tp_as_number, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', op_slot.value).contents), ctypes.POINTER(g.ternaryfunc)).contents, ctypes_wrapped.c_void_p).value or 0)) if (not (ctypes.cast(slotv, ctypes_wrapped.c_void_p).value or 0)): goto = 50 continue helpers.assignPtr(x, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(slotv, v1, w2, z2), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) goto = 49 continue if (goto == 50): goto = None if (goto is None): helpers.assign(c, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 49): goto = None if (goto is None): goto = 47 continue if (goto == 48): goto = None if (goto is None): helpers.assign(c, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == 47): goto = None if (goto == 51): goto = None if (goto is None): if (not True): goto = 52 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 54 continue pass goto = 53 continue if (goto == 54): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 53): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 56 continue continue goto = 55 continue if (goto == 56): goto = None if (goto is None): goto = 52 continue if (goto == 55): goto = None if (goto is None): goto = 51 continue if (goto == 52): goto = None if (goto == 57): goto = None if (goto is None): if (not True): goto = 58 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(z2, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 60 continue pass goto = 59 continue if (goto == 60): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(z2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(z2, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 59): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 62 continue continue goto = 61 continue if (goto == 62): goto = None if (goto is None): goto = 58 continue if (goto == 61): goto = None if (goto is None): goto = 57 continue if (goto == 58): goto = None if (goto == u'error1'): goto = None if (goto == 63): goto = None if (goto is None): if (not True): goto = 64 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v1, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 66 continue pass goto = 65 continue if (goto == 66): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v1, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v1, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 65): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 68 continue continue goto = 67 continue if (goto == 68): goto = None if (goto is None): goto = 64 continue if (goto == 67): goto = None if (goto is None): goto = 63 continue if (goto == 64): goto = None if (goto == 69): goto = None if (goto is None): if (not True): goto = 70 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(z1, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 72 continue pass goto = 71 continue if (goto == 72): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(z1, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(z1, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 71): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 74 continue continue goto = 73 continue if (goto == 74): goto = None if (goto is None): goto = 70 continue if (goto == 73): goto = None if (goto is None): goto = 69 continue if (goto == 70): goto = None if (goto == u'error2'): goto = None if (goto == 75): goto = None if (goto is None): if (not True): goto = 76 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 78 continue pass goto = 77 continue if (goto == 78): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 77): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 80 continue continue goto = 79 continue if (goto == 80): goto = None if (goto is None): goto = 76 continue if (goto == 79): goto = None if (goto is None): goto = 75 continue if (goto == 76): goto = None if (goto == 81): goto = None if (goto is None): if (not True): goto = 82 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(w, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 84 continue pass goto = 83 continue if (goto == 84): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(w, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 83): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 86 continue continue goto = 85 continue if (goto == 86): goto = None if (goto is None): goto = 82 continue if (goto == 85): goto = None if (goto is None): goto = 81 continue if (goto == 82): goto = None if (goto == u'error3'): goto = None if (goto is None): if (not ctypes_wrapped.c_int((c.value >= ctypes_wrapped.c_int(int(0L)).value)).value): goto = 87 continue return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) if (goto == 87): goto = None if (goto is None): del v1 del c del z1 del z2 del w2 if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(z, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes_wrapped.c_void_p).value or 0))).value): goto = 89 continue intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("unsupported operand type(s) for ** or pow(): '%.100s' and '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), v.contents.ob_type.contents.tp_name, w.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) goto = 88 continue if (goto == 89): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("unsupported operand type(s) for pow(): '%.100s', '%.100s', '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), v.contents.ob_type.contents.tp_name, w.contents.ob_type.contents.tp_name, z.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 88): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del slotz del op_slot del op_name del slotv del mw del mv del w del v del x del z del slotw del mz return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyNumber_Or(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(128)).value)), ctypes.cast(intp._make_string('|'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Xor(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(120)).value)), ctypes.cast(intp._make_string('^'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_And(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(112)).value)), ctypes.cast(intp._make_string('&'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Lshift(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(96)).value)), ctypes.cast(intp._make_string('<<'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Rshift(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(104)).value)), ctypes.cast(intp._make_string('>>'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Subtract(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(8)).value)), ctypes.cast(intp._make_string('-'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Divide(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(24)).value)), ctypes.cast(intp._make_string('/'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Divmod(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(40)).value)), ctypes.cast(intp._make_string('divmod()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Add(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.binary_op1(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(0)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: m = ctypes.cast(v.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_concat, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.binop_type_error(v, w, ctypes.cast(intp._make_string('+'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del m return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def sequence_repeat(repeatfunc, seq, n): repeatfunc = ctypes.cast(repeatfunc, g.ssizeargfunc) seq = ctypes.cast(seq, ctypes.POINTER(g.PyObject)) n = ctypes.cast(n, ctypes.POINTER(g.PyObject)) count = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(n.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((n.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(n.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(count, g.Py_ssize_t(int(g.PyNumber_AsSsize_t(n, g.PyExc_OverflowError))).value) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((count.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("can't multiply sequence by non-int of type '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(repeatfunc, seq, count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del count del repeatfunc del seq del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Multiply(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.binary_op1(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: mv = ctypes.cast(v.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) mw = ctypes.cast(w.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(mv, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(mv.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.sequence_repeat(mv.contents.sq_repeat, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(mw, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(mw.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.sequence_repeat(mw.contents.sq_repeat, w, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.binop_type_error(v, w, ctypes.cast(intp._make_string('*'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del mw del mv return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_FloorDivide(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(272)).value)), ctypes.cast(intp._make_string('//'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_TrueDivide(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(280)).value)), ctypes.cast(intp._make_string('/'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Remainder(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(32)).value)), ctypes.cast(intp._make_string('%'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Power(v, w, z): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) z = ctypes.cast(z, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.ternary_op(v, w, z, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(48)).value)), ctypes.cast(intp._make_string('** or pow()'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del z del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def binary_iop1(v, w, iop_slot, op_slot): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) iop_slot = ctypes_wrapped.c_int(int(iop_slot.value)) op_slot = ctypes_wrapped.c_int(int(op_slot.value)) mv = ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes.POINTER(g.PyNumberMethods)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(mv, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: slot = ctypes.cast(ctypes.cast(ctypes.pointer(helpers.ptrArithmetic(ctypes.cast(mv, ctypes.POINTER(ctypes_wrapped.c_byte)), '+', iop_slot.value).contents), ctypes.POINTER(g.binaryfunc)).contents, g.binaryfunc) if (ctypes.cast(slot, ctypes_wrapped.c_void_p).value or 0): x = ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(slot, v, w), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del x del slot return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op1(v, w, op_slot), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del mv del op_slot del iop_slot del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def binary_iop(v, w, iop_slot, op_slot, op_name): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) iop_slot = ctypes_wrapped.c_int(int(iop_slot.value)) op_slot = ctypes_wrapped.c_int(int(op_slot.value)) op_name = ctypes.cast(op_name, ctypes.POINTER(ctypes_wrapped.c_byte)) result = ctypes.cast(intp._getPtr(g.binary_iop1(v, w, iop_slot, op_slot), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.binop_type_error(v, w, op_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del op_slot del op_name del iop_slot del result del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceOr(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(264)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(128)).value)), ctypes.cast(intp._make_string('|='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceXor(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(256)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(120)).value)), ctypes.cast(intp._make_string('^='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceAnd(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(248)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(112)).value)), ctypes.cast(intp._make_string('&='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceLshift(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(232)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(96)).value)), ctypes.cast(intp._make_string('<<='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceRshift(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(240)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(104)).value)), ctypes.cast(intp._make_string('>>='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceSubtract(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(192)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(8)).value)), ctypes.cast(intp._make_string('-='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceDivide(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(208)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(24)).value)), ctypes.cast(intp._make_string('/='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceFloorDivide(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(288)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(272)).value)), ctypes.cast(intp._make_string('//='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceTrueDivide(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(296)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(280)).value)), ctypes.cast(intp._make_string('/='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceAdd(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.binary_iop1(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(184)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(0)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: m = ctypes.cast(v.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: f = g.binaryfunc() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(f, (ctypes.cast(m.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(f, (ctypes.cast(m.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(f, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del f helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.binop_type_error(v, w, ctypes.cast(intp._make_string('+='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del m return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceMultiply(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) result = ctypes.cast(intp._getPtr(g.binary_iop1(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: f = g.ssizeargfunc() mv = ctypes.cast(v.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) mw = ctypes.cast(w.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(mv, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(f, (ctypes.cast(mv.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(f, (ctypes.cast(mv.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.sequence_repeat(f, v, w), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(mw, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(mw.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0): return (ctypes.cast(intp._storePtr(intp._getPtr(g.sequence_repeat(mw.contents.sq_repeat, w, v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.binop_type_error(v, w, ctypes.cast(intp._make_string('*='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) del mw del mv del f return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlaceRemainder(v, w): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop(v, w, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(216)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(32)).value)), ctypes.cast(intp._make_string('%='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_InPlacePower(v, w, z): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) z = ctypes.cast(z, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((v.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(v.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(v.contents.ob_type.contents.tp_as_number.contents.nb_inplace_power, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.ternary_op(v, w, z, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(224)).value)), ctypes.cast(intp._make_string('**='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.ternary_op(v, w, z, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(48)).value)), ctypes.cast(intp._make_string('**='), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del z del w del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Negative(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_negative, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_negative, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("bad operand type for unary -: '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Positive(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_positive, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_positive, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("bad operand type for unary +: '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Invert(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_invert, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_invert, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("bad operand type for unary ~: '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Absolute(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_absolute, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_absolute, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("bad operand type for abs(): '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def int_from_string(s, len_a): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) end = ctypes.POINTER(ctypes_wrapped.c_byte)() x = ctypes.POINTER(g.PyObject)() helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromString(ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(end), ctypes_wrapped.c_int(int(10L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.ptrArithmetic(s, u'+', len_a.value), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('null byte in argument for int()'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) del end del s del len_a del x return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Index(item): item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((item.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.postfixInc(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((item.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(17L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(item.contents.ob_type.contents.tp_as_number.contents.nb_index, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(item.contents.ob_type.contents.tp_as_number.contents.nb_index, item), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((result.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__index__ returned non-(int,long) (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), result.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value else: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%.200s' object cannot be interpreted as an index"), ctypes.POINTER(ctypes_wrapped.c_byte)), item.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del item del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_AsSsize_t(item, err): goto = None while True: if (goto is None): item = ctypes.cast(item, ctypes.POINTER(g.PyObject)) err = ctypes.cast(err, ctypes.POINTER(g.PyObject)) result = g.Py_ssize_t() runerr = ctypes.POINTER(g.PyObject)() value = ctypes.cast(intp._getPtr(g.PyNumber_Index(item), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(value, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): helpers.assign(result, g.Py_ssize_t(int(g.PyInt_AsSsize_t(value))).value) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((result.value != ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value or ctypes_wrapped.c_int((not (ctypes.cast(helpers.assignPtr(runerr, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0))).value)).value): goto = 2 continue goto = u'finish' continue if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyErr_GivenExceptionMatches(runerr, g.PyExc_OverflowError))).value))).value): goto = 3 continue goto = u'finish' continue if (goto == 3): goto = None if (goto is None): g.PyErr_Clear() if (not ctypes_wrapped.c_int((not (ctypes.cast(err, ctypes_wrapped.c_void_p).value or 0))).value): goto = 5 continue values.assert_a.value(ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value))) if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._PyLong_Sign(value))).value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue helpers.assign(result, ctypes_wrapped.c_ulong(int((g.Py_ssize_t(int((- g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value))).value - ctypes_wrapped.c_int(int(1L)).value))).value) goto = 6 continue if (goto == 7): goto = None if (goto is None): helpers.assign(result, g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value) if (goto == 6): goto = None if (goto is None): goto = 4 continue if (goto == 5): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(err, ctypes.cast(intp._make_string("cannot fit '%.200s' into an index-sized integer"), ctypes.POINTER(ctypes_wrapped.c_byte)), item.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) if (goto == 4): goto = None if (goto == u'finish'): goto = None if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(value, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 11 continue pass goto = 10 continue if (goto == 11): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(value, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 13 continue continue goto = 12 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 12): goto = None if (goto is None): goto = 8 continue if (goto == 9): goto = None if (goto is None): return result.value del item del runerr del value del result del err return g.Py_ssize_t().value break @staticmethod def _PyNumber_ConvertIntegralToInt(integral, error_format): goto = None while True: if (goto is None): integral = ctypes.cast(integral, ctypes.POINTER(g.PyObject)) error_format = ctypes.cast(error_format, ctypes.POINTER(ctypes_wrapped.c_byte)) type_name_a = ctypes.POINTER(ctypes_wrapped.c_byte)() int_name = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int(((ctypes.cast(int_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue helpers.assignPtr(int_name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__int__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(int_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(integral, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((integral.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(integral, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value): goto = 3 continue int_func = ctypes.cast(intp._getPtr(g.PyObject_GetAttr(integral, int_name), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(int_func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue g.PyErr_Clear() goto = u'non_integral_error' continue if (goto == 4): goto = None if (goto == 5): goto = None if (goto is None): if (not True): goto = 6 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(integral, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 8 continue pass goto = 7 continue if (goto == 8): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(integral, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(integral, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 10 continue continue goto = 9 continue if (goto == 10): goto = None if (goto is None): goto = 6 continue if (goto == 9): goto = None if (goto is None): goto = 5 continue if (goto == 6): goto = None if (goto is None): helpers.assignPtr(integral, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(int_func, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 11): goto = None if (goto is None): if (not True): goto = 12 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(int_func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 14 continue pass goto = 13 continue if (goto == 14): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(int_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(int_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 13): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 16 continue continue goto = 15 continue if (goto == 16): goto = None if (goto is None): goto = 12 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(integral, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((integral.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(integral, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value): goto = 17 continue goto = u'non_integral_error' continue if (goto == 17): goto = None if (goto is None): del int_func if (goto == 3): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(integral), ctypes_wrapped.c_void_p).value or 0) if (goto == u'non_integral_error'): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(integral.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 19 continue helpers.assignPtr(type_name_a, (ctypes.cast(intp._storePtr(ctypes.cast(ctypes.cast(integral, ctypes.POINTER(g.PyInstanceObject)).contents.in_class.contents.cl_name, ctypes.POINTER(g.PyStringObject)).contents.ob_sval), ctypes_wrapped.c_void_p).value or 0)) goto = 18 continue if (goto == 19): goto = None if (goto is None): helpers.assignPtr(type_name_a, (ctypes.cast(intp._storePtr(integral.contents.ob_type.contents.tp_name), ctypes_wrapped.c_void_p).value or 0)) if (goto == 18): goto = None if (goto is None): intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, error_format, type_name_a), ctypes.POINTER(g.PyObject)) if (goto == 20): goto = None if (goto is None): if (not True): goto = 21 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(integral, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 23 continue pass goto = 22 continue if (goto == 23): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(integral, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(integral, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 22): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 25 continue continue goto = 24 continue if (goto == 25): goto = None if (goto is None): goto = 21 continue if (goto == 24): goto = None if (goto is None): goto = 20 continue if (goto == 21): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del error_format del type_name_a del int_name del integral return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PyNumber_Int(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() trunc_name = ctypes.POINTER(g.PyObject)() trunc_func = ctypes.POINTER(g.PyObject)() buffer_a = ctypes.POINTER(ctypes_wrapped.c_byte)() buffer_len = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(trunc_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(trunc_name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__trunc__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(trunc_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInt_Type), ctypes_wrapped.c_void_p).value or 0))).value: helpers.postfixInc(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(o), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_int, ctypes_wrapped.c_void_p).value or 0))).value: res = ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_int, o), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((res.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__int__ returned non-int (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), res.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((o.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: io = ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyIntObject)), ctypes.POINTER(g.PyIntObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(io.contents.ob_ival), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del io helpers.assignPtr(trunc_func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(o, trunc_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(trunc_func, ctypes_wrapped.c_void_p).value or 0): truncated = ctypes.cast(intp._getPtr(g.PyEval_CallObjectWithKeywords(trunc_func, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(trunc_func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(trunc_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(trunc_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g._PyNumber_ConvertIntegralToInt(truncated, ctypes.cast(intp._make_string('__trunc__ returned non-Integral (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del truncated g.PyErr_Clear() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.int_from_string(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(o, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(o, ctypes.pointer(buffer_a), ctypes.pointer(buffer_len)))).value))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.int_from_string(ctypes.cast(buffer_a, ctypes.POINTER(ctypes_wrapped.c_byte)), buffer_len), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("int() argument must be a string or a number, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del trunc_name del m del o del buffer_len del buffer_a del trunc_func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def long_from_string(s, len_a): s = ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)) len_a = g.Py_ssize_t(int(len_a.value)) end = ctypes.POINTER(ctypes_wrapped.c_byte)() x = ctypes.POINTER(g.PyObject)() helpers.assignPtr(x, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromString(ctypes.cast(s, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(end), ctypes_wrapped.c_int(int(10L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(x, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(end, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.ptrArithmetic(s, u'+', len_a.value), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('null byte in argument for long()'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(x, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(x, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(x), ctypes_wrapped.c_void_p).value or 0) del end del s del len_a del x return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Long(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() trunc_name = ctypes.POINTER(g.PyObject)() trunc_func = ctypes.POINTER(g.PyObject)() buffer_a = ctypes.POINTER(ctypes_wrapped.c_byte)() buffer_len = g.Py_ssize_t() if ctypes_wrapped.c_int(((ctypes.cast(trunc_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(trunc_name, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__trunc__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(trunc_name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_long, ctypes_wrapped.c_void_p).value or 0))).value: res = ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_long, o), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((res.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: value = ctypes_wrapped.c_long(int(ctypes.cast(res, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromLong(value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del value elif ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__long__ returned non-long (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), res.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g._PyLong_Copy(ctypes.cast(o, ctypes.POINTER(g.PyLongObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(trunc_func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(o, trunc_name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(trunc_func, ctypes_wrapped.c_void_p).value or 0): truncated = ctypes.cast(intp._getPtr(g.PyEval_CallObjectWithKeywords(trunc_func, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject)), intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) int_instance = ctypes.POINTER(g.PyObject)() while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(trunc_func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(trunc_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(trunc_func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(int_instance, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyNumber_ConvertIntegralToInt(truncated, ctypes.cast(intp._make_string('__trunc__ returned non-Integral (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(int_instance, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((int_instance.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: value = ctypes_wrapped.c_long(int(ctypes.cast(int_instance, ctypes.POINTER(g.PyIntObject)).contents.ob_ival.value)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(int_instance, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(int_instance, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(int_instance, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromLong(value), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del value return (ctypes.cast(intp._storePtr(int_instance), ctypes_wrapped.c_void_p).value or 0) del int_instance del truncated g.PyErr_Clear() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(27L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.long_from_string(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyStringObject)).contents.ob_sval, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.cast(o, ctypes.POINTER(g.PyVarObject)).contents.ob_size), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyObject_AsCharBuffer(o, ctypes.pointer(buffer_a), ctypes.pointer(buffer_len)))).value))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.long_from_string(buffer_a, buffer_len), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("long() argument must be a string or a number, not '%.200s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del trunc_name del m del o del buffer_len del buffer_a del trunc_func return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_Float(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyNumberMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_number), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.nb_float, ctypes_wrapped.c_void_p).value or 0))).value: res = ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.nb_float, o), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFloat_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFloat_Type)))).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string('__float__ returned non-float (type %.200s)'), ctypes.POINTER(ctypes_wrapped.c_byte)), res.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyFloat_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyFloat_Type)))).value)).value: po = ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyFloatObject)), ctypes.POINTER(g.PyFloatObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFloat_FromDouble(po.contents.ob_fval), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del po return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFloat_FromString(o, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte)))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyNumber_ToBase(n, base): n = ctypes.cast(n, ctypes.POINTER(g.PyObject)) base = ctypes_wrapped.c_int(int(base.value)) res = ctypes.POINTER(g.PyObject)() index = ctypes.cast(intp._getPtr(g.PyNumber_Index(n), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(index, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(index, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(24L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyLong_Format(index, base, ctypes_wrapped.c_int(int(0L)), ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((index.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(23L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyInt_Format(ctypes.cast(index, ctypes.POINTER(g.PyIntObject)), base, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) else: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('PyNumber_ToBase: index not int or long'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(index, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(index, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(index, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del base del index del n return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_Check(s): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(s.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(g.PyObject_HasAttrString(s, ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(s, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(29L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value return ctypes_wrapped.c_int(((ctypes.cast(s.contents.ob_type.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(s.contents.ob_type.contents.tp_as_sequence.contents.sq_item, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value del s return ctypes_wrapped.c_int().value @staticmethod def PySequence_Size(s): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(m.contents.sq_length, s).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("object of type '%.200s' has no len()"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del s del m return g.Py_ssize_t().value @staticmethod def PySequence_Length(s): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) return g.Py_ssize_t(int(g.PySequence_Size(s))).value del s return g.Py_ssize_t().value @staticmethod def PySequence_Concat(s, o): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_concat, s, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySequence_Check(s))).value and ctypes_wrapped.c_int(int(g.PySequence_Check(o))).value)).value: result = ctypes.cast(intp._getPtr(g.binary_op1(s, o, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(0)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del result return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object can't be concatenated"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del s del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_Repeat(o, count): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) count = g.Py_ssize_t(int(count.value)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_repeat, o, count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int(g.PySequence_Check(o))).value: n = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(n, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_op1(o, n, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(n, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del result del n return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object can't be repeated"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del count del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_InPlaceConcat(s, o): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((s.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and (ctypes.cast(m.contents.sq_inplace_concat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_inplace_concat, s, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_concat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_concat, s, o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PySequence_Check(s))).value and ctypes_wrapped.c_int(int(g.PySequence_Check(o))).value)).value: result = ctypes.cast(intp._getPtr(g.binary_iop1(s, o, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(184)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(0)).value))), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del result return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object can't be concatenated"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del s del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_InPlaceRepeat(o, count): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) count = g.Py_ssize_t(int(count.value)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((o.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(3L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value and (ctypes.cast(m.contents.sq_inplace_repeat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_inplace_repeat, o, count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_repeat, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_repeat, o, count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(int(g.PySequence_Check(o))).value: n = ctypes.POINTER(g.PyObject)() result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(n, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromSsize_t(count), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.binary_iop1(o, n, ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(200)).value)), ctypes_wrapped.c_int(int(ctypes_wrapped.c_long(int(16)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(n, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.pointer(g._Py_NotImplementedStruct), ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del result del n return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object can't be repeated"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del count del m del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_GetItem(s, i): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_item, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0): l = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(m.contents.sq_length, s).value)) if ctypes_wrapped.c_int((l.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.augAssign(i, u'+=', l.value) del l return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_item, s, i), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object does not support indexing"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i del s del m return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_GetSlice(s, i1, i2): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) i1 = g.Py_ssize_t(int(i1.value)) i2 = g.Py_ssize_t(int(i2.value)) m = ctypes.POINTER(g.PySequenceMethods)() mp = ctypes.POINTER(g.PyMappingMethods)() if ctypes_wrapped.c_int((not (ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i1.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i2.value < ctypes_wrapped.c_int(int(0L)).value)).value)).value: if (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0): l = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(m.contents.sq_length, s).value)) if ctypes_wrapped.c_int((l.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((i1.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i1, u'+=', l.value) if ctypes_wrapped.c_int((i2.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i2, u'+=', l.value) del l return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(m.contents.sq_slice, s, i1, i2), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) elif ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(mp.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0))).value: res = ctypes.POINTER(g.PyObject)() slice_a = ctypes.cast(intp._getPtr(g._PySlice_FromIndices(i1, i2), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(slice_a, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(mp.contents.mp_subscript, s, slice_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del slice_a return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object is unsliceable"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del i1 del s del i2 del m del mp return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_SetItem(s, i, o): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0): l = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(m.contents.sq_length, s).value)) if ctypes_wrapped.c_int((l.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.augAssign(i, u'+=', l.value) del l return helpers.checkedFuncPtrCall(m.contents.sq_ass_item, s, i, o).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object does not support item assignment"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del i del s del m del o return ctypes_wrapped.c_int().value @staticmethod def PySequence_DelItem(s, i): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) i = g.Py_ssize_t(int(i.value)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_ass_item, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((i.value < ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0): l = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(m.contents.sq_length, s).value)) if ctypes_wrapped.c_int((l.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.augAssign(i, u'+=', l.value) del l return helpers.checkedFuncPtrCall(m.contents.sq_ass_item, s, i, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object doesn't support item deletion"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del i del s del m return ctypes_wrapped.c_int().value @staticmethod def PySequence_SetSlice(s, i1, i2, o): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) i1 = g.Py_ssize_t(int(i1.value)) i2 = g.Py_ssize_t(int(i2.value)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PySequenceMethods)() mp = ctypes.POINTER(g.PyMappingMethods)() if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i1.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i2.value < ctypes_wrapped.c_int(int(0L)).value)).value)).value: if (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0): l = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(m.contents.sq_length, s).value)) if ctypes_wrapped.c_int((l.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((i1.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i1, u'+=', l.value) if ctypes_wrapped.c_int((i2.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i2, u'+=', l.value) del l return helpers.checkedFuncPtrCall(m.contents.sq_ass_slice, s, i1, i2, o).value elif ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(mp, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(mp.contents.mp_ass_subscript, ctypes_wrapped.c_void_p).value or 0))).value: res = ctypes_wrapped.c_int() slice_a = ctypes.cast(intp._getPtr(g._PySlice_FromIndices(i1, i2), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(slice_a, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(res, helpers.checkedFuncPtrCall(mp.contents.mp_ass_subscript, s, slice_a, o).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(slice_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return res.value del res del slice_a intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object doesn't support slice assignment"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del i1 del i2 del m del o del s del mp return ctypes_wrapped.c_int().value @staticmethod def PySequence_DelSlice(s, i1, i2): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) i1 = g.Py_ssize_t(int(i1.value)) i2 = g.Py_ssize_t(int(i2.value)) m = ctypes.POINTER(g.PySequenceMethods)() if ctypes_wrapped.c_int(((ctypes.cast(s, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(s.contents.ob_type.contents.tp_as_sequence), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.sq_ass_slice, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((ctypes_wrapped.c_int((i1.value < ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((i2.value < ctypes_wrapped.c_int(int(0L)).value)).value)).value: if (ctypes.cast(m.contents.sq_length, ctypes_wrapped.c_void_p).value or 0): l = g.Py_ssize_t(int(helpers.checkedFuncPtrCall(m.contents.sq_length, s).value)) if ctypes_wrapped.c_int((l.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((i1.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i1, u'+=', l.value) if ctypes_wrapped.c_int((i2.value < ctypes_wrapped.c_int(int(0L)).value)).value: helpers.augAssign(i2, u'+=', l.value) del l return helpers.checkedFuncPtrCall(m.contents.sq_ass_slice, s, i1, i2, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object doesn't support slice deletion"), ctypes.POINTER(ctypes_wrapped.c_byte)), s), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del i1 del s del i2 del m return ctypes_wrapped.c_int().value @staticmethod def PySequence_Tuple(v): goto = None while True: if (goto is None): first_iteration = None v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) it = ctypes.POINTER(g.PyObject)() n = g.Py_ssize_t() result = ctypes.POINTER(g.PyObject)() j = g.Py_ssize_t() if (not ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 1 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 1): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value): goto = 2 continue helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(25L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 3 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_AsTuple(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 3): goto = None if (goto is None): helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 4 continue return ctypes_wrapped.c_int(int(0L)).value if (goto == 4): goto = None if (goto is None): helpers.assign(n, g.Py_ssize_t(int(g._PyObject_LengthHint(v, g.Py_ssize_t(int(ctypes_wrapped.c_int(int(10L)).value))))).value) if (not ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value): goto = 5 continue goto = u'Fail' continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 6 continue goto = u'Fail' continue if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue first_iteration = True helpers.assign(j, ctypes_wrapped.c_int(int(0L)).value) if (goto == 8): goto = None if (goto is None): if (not True): goto = 9 continue if (not first_iteration): goto = 11 continue first_iteration = False goto = 10 continue if (goto == 11): goto = None if (goto is None): helpers.prefixInc(j) if (goto == 10): goto = None if (goto is None): item = ctypes.cast(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 13 continue goto = u'Fail' continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int((j.value >= n.value)).value): goto = 14 continue oldn = g.Py_ssize_t(int(n.value)) helpers.augAssign(n, u'+=', ctypes_wrapped.c_int(int(10L)).value) helpers.augAssign(n, u'+=', g.Py_ssize_t(int((n.value >> ctypes_wrapped.c_int(int(2L)).value))).value) if (not ctypes_wrapped.c_int((n.value < oldn.value)).value): goto = 15 continue intp._getPtr(g.PyErr_NoMemory(), ctypes.POINTER(g.PyObject)) if (goto == 16): goto = None if (goto is None): if (not True): goto = 17 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 19 continue pass goto = 18 continue if (goto == 19): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 18): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 21 continue continue goto = 20 continue if (goto == 21): goto = None if (goto is None): goto = 17 continue if (goto == 20): goto = None if (goto is None): goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = u'Fail' continue if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._PyTuple_Resize(ctypes.pointer(result), n))).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 22 continue if (goto == 23): goto = None if (goto is None): if (not True): goto = 24 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 26 continue pass goto = 25 continue if (goto == 26): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 25): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 28 continue continue goto = 27 continue if (goto == 28): goto = None if (goto is None): goto = 24 continue if (goto == 27): goto = None if (goto is None): goto = 23 continue if (goto == 24): goto = None if (goto is None): goto = u'Fail' continue if (goto == 22): goto = None if (goto is None): del oldn if (goto == 14): goto = None if (goto is None): helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', j.value).contents, (ctypes.cast(intp._storePtr(item), ctypes_wrapped.c_void_p).value or 0)) del item goto = 8 continue if (goto == 9): goto = None if (goto == 7): goto = None if (goto is None): if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int((j.value < n.value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g._PyTuple_Resize(ctypes.pointer(result), j))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 29 continue goto = u'Fail' continue if (goto == 29): goto = None if (goto == 30): goto = None if (goto is None): if (not True): goto = 31 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 33 continue pass goto = 32 continue if (goto == 33): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 32): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 35 continue continue goto = 34 continue if (goto == 35): goto = None if (goto is None): goto = 31 continue if (goto == 34): goto = None if (goto is None): goto = 30 continue if (goto == 31): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) if (goto == u'Fail'): goto = None if (goto == 36): goto = None if (goto is None): if (not True): goto = 37 continue if (not ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 39 continue pass goto = 38 continue if (goto == 39): goto = None if (goto == 40): goto = None if (goto is None): if (not True): goto = 41 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 43 continue pass goto = 42 continue if (goto == 43): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 42): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 45 continue continue goto = 44 continue if (goto == 45): goto = None if (goto is None): goto = 41 continue if (goto == 44): goto = None if (goto is None): goto = 40 continue if (goto == 41): goto = None if (goto == 38): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 47 continue continue goto = 46 continue if (goto == 47): goto = None if (goto is None): goto = 37 continue if (goto == 46): goto = None if (goto is None): goto = 36 continue if (goto == 37): goto = None if (goto == 48): goto = None if (goto is None): if (not True): goto = 49 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 51 continue pass goto = 50 continue if (goto == 51): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 50): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 53 continue continue goto = 52 continue if (goto == 53): goto = None if (goto is None): goto = 49 continue if (goto == 52): goto = None if (goto is None): goto = 48 continue if (goto == 49): goto = None if (goto is None): return ctypes_wrapped.c_int(int(0L)).value del result del n del j del it del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def PySequence_List(v): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() rv = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(rv, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyList_Extend(ctypes.cast(result, ctypes.POINTER(g.PyListObject)), v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(rv, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(result, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(result, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(rv, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(rv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(rv, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del rv del result del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PySequence_Fast(v, m): v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) m = ctypes.cast(m, ctypes.POINTER(ctypes_wrapped.c_byte)) it = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyList_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyTuple_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(v), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_TypeError))).value: g.PyErr_SetString(g.PyExc_TypeError, m) return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PySequence_List(it), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del m del it del v return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PySequence_IterSearch(seq, obj, operation): goto = None while True: if (goto is None): first_iteration = None seq = ctypes.cast(seq, ctypes.POINTER(g.PyObject)) obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) operation = ctypes_wrapped.c_int(int(operation.value)) n = g.Py_ssize_t() wrapped = ctypes_wrapped.c_int() it = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(seq, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(obj, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 1): goto = None if (goto is None): helpers.assignPtr(it, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetIter(seq), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(it, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue intp._getPtr(g.type_error(ctypes.cast(intp._make_string("argument of type '%.200s' is not iterable"), ctypes.POINTER(ctypes_wrapped.c_byte)), seq), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (goto == 2): goto = None if (goto is None): helpers.assign(n, helpers.assign(wrapped, ctypes_wrapped.c_int(int(0L)).value).value) if (not True): goto = 3 continue first_iteration = True if (goto == 4): goto = None if (goto is None): if (not True): goto = 5 continue if (not first_iteration): goto = 6 continue first_iteration = False if (goto == 6): goto = None if (goto is None): cmp_a = ctypes_wrapped.c_int() item = ctypes.cast(intp._getPtr(g.PyIter_Next(it), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if (not ctypes_wrapped.c_int(((ctypes.cast(item, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 7 continue if (not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0)): goto = 8 continue goto = u'Fail' continue if (goto == 8): goto = None if (goto is None): goto = 5 continue if (goto == 7): goto = None if (goto is None): helpers.assign(cmp_a, ctypes_wrapped.c_int(int(g.PyObject_RichCompareBool(obj, item, ctypes_wrapped.c_int(int(2L))))).value) if (goto == 9): goto = None if (goto is None): if (not True): goto = 10 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(item, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 12 continue pass goto = 11 continue if (goto == 12): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(item, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 11): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 14 continue continue goto = 13 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 13): goto = None if (goto is None): goto = 9 continue if (goto == 10): goto = None if (goto is None): if (not ctypes_wrapped.c_int((cmp_a.value < ctypes_wrapped.c_int(int(0L)).value)).value): goto = 15 continue goto = u'Fail' continue if (goto == 15): goto = None if (goto is None): if (not ctypes_wrapped.c_int((cmp_a.value > ctypes_wrapped.c_int(int(0L)).value)).value): goto = 16 continue if (not True): goto = 17 continue _switchvalue = None _switchvalue = operation.value _switchfallthrough = None _switchfallthrough = False if (goto == 18): goto = None if (goto is None): if (not True): goto = 19 continue if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(1L)).value))): goto = 20 continue _switchfallthrough = True if (not ctypes_wrapped.c_int((n.value == g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value): goto = 21 continue g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('count exceeds C integer size'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'Fail' continue if (goto == 21): goto = None if (goto is None): helpers.prefixInc(n) goto = 19 continue if (goto == 20): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(2L)).value))): goto = 22 continue _switchfallthrough = True if (not wrapped.value): goto = 23 continue g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('index exceeds C integer size'), ctypes.POINTER(ctypes_wrapped.c_byte))) goto = u'Fail' continue if (goto == 23): goto = None if (goto is None): goto = u'Done' continue if (goto == 22): goto = None if (goto is None): if (not (_switchfallthrough or (_switchvalue == ctypes_wrapped.c_int(int(3L)).value))): goto = 24 continue _switchfallthrough = True helpers.assign(n, ctypes_wrapped.c_int(int(1L)).value) goto = u'Done' continue if (goto == 24): goto = None if (goto is None): if (not (not _switchfallthrough)): goto = 25 continue values.assert_a.value(ctypes_wrapped.c_int((not (ctypes.cast(intp._make_string('unknown operation'), ctypes_wrapped.c_void_p).value or 0)))) if (goto == 25): goto = None if (goto is None): goto = 19 continue goto = 18 continue if (goto == 19): goto = None if (goto is None): del _switchfallthrough del _switchvalue if (goto == 17): goto = None if (goto == 16): goto = None if (goto is None): if (not ctypes_wrapped.c_int((operation.value == ctypes_wrapped.c_int(int(2L)).value)).value): goto = 26 continue if (not ctypes_wrapped.c_int((n.value == g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value): goto = 27 continue helpers.assign(wrapped, ctypes_wrapped.c_int(int(1L)).value) if (goto == 27): goto = None if (goto is None): helpers.prefixInc(n) if (goto == 26): goto = None if (goto is None): del item del cmp_a goto = 4 continue if (goto == 5): goto = None if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int((operation.value != ctypes_wrapped.c_int(int(2L)).value)).value): goto = 28 continue goto = u'Done' continue if (goto == 28): goto = None if (goto is None): g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('sequence.index(x): x not in sequence'), ctypes.POINTER(ctypes_wrapped.c_byte))) if (goto == u'Fail'): goto = None if (goto is None): helpers.assign(n, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if (goto == u'Done'): goto = None if (goto == 29): goto = None if (goto is None): if (not True): goto = 30 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(it, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 32 continue pass goto = 31 continue if (goto == 32): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(it, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 31): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 34 continue continue goto = 33 continue if (goto == 34): goto = None if (goto is None): goto = 30 continue if (goto == 33): goto = None if (goto is None): goto = 29 continue if (goto == 30): goto = None if (goto is None): return n.value del obj del seq del it del n del wrapped del operation return g.Py_ssize_t().value break @staticmethod def PySequence_Count(s, o): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) return g.Py_ssize_t(int(g._PySequence_IterSearch(s, o, ctypes_wrapped.c_int(int(1L))))).value del s del o return g.Py_ssize_t().value @staticmethod def PySequence_Contains(seq, ob): seq = ctypes.cast(seq, ctypes.POINTER(g.PyObject)) ob = ctypes.cast(ob, ctypes.POINTER(g.PyObject)) result = g.Py_ssize_t() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((seq.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(1L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: sqm = ctypes.cast(seq.contents.ob_type.contents.tp_as_sequence, ctypes.POINTER(g.PySequenceMethods)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(sqm, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(sqm.contents.sq_contains, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return helpers.checkedFuncPtrCall(sqm.contents.sq_contains, seq, ob).value del sqm helpers.assign(result, g.Py_ssize_t(int(g._PySequence_IterSearch(seq, ob, ctypes_wrapped.c_int(int(3L))))).value) return ctypes_wrapped.c_int(int(result.value)).value del ob del seq del result return ctypes_wrapped.c_int().value @staticmethod def PySequence_In(w, v): w = ctypes.cast(w, ctypes.POINTER(g.PyObject)) v = ctypes.cast(v, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.PySequence_Contains(w, v))).value del w del v return ctypes_wrapped.c_int().value @staticmethod def PySequence_Index(s, o): s = ctypes.cast(s, ctypes.POINTER(g.PyObject)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) return g.Py_ssize_t(int(g._PySequence_IterSearch(s, o, ctypes_wrapped.c_int(int(2L))))).value del s del o return g.Py_ssize_t().value @staticmethod def PyMapping_Check(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) and ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: return ctypes_wrapped.c_int(int(g.PyObject_HasAttrString(o, ctypes.cast(intp._make_string('__getitem__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value return ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(o.contents.ob_type.contents.tp_as_mapping, ctypes_wrapped.c_void_p).value or 0))).value and (ctypes.cast(o.contents.ob_type.contents.tp_as_mapping.contents.mp_subscript, ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(o.contents.ob_type.contents.tp_as_sequence, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(o.contents.ob_type.contents.tp_as_sequence.contents.sq_slice, ctypes_wrapped.c_void_p).value or 0))).value)).value)).value del o return ctypes_wrapped.c_int().value @staticmethod def PyMapping_Size(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) m = ctypes.POINTER(g.PyMappingMethods)() if ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(m, (ctypes.cast(intp._storePtr(o.contents.ob_type.contents.tp_as_mapping), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(m, ctypes_wrapped.c_void_p).value or 0) and (ctypes.cast(m.contents.mp_length, ctypes_wrapped.c_void_p).value or 0))).value: return helpers.checkedFuncPtrCall(m.contents.mp_length, o).value intp._getPtr(g.type_error(ctypes.cast(intp._make_string("object of type '%.200s' has no len()"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del m del o return g.Py_ssize_t().value @staticmethod def PyMapping_Length(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) return g.Py_ssize_t(int(g.PyMapping_Size(o))).value del o return g.Py_ssize_t().value @staticmethod def PyMapping_GetItemString(o, key): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) okey = ctypes.POINTER(g.PyObject)() r = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(okey, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(okey, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(r, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(o, okey), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(okey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(okey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(okey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(r), ctypes_wrapped.c_void_p).value or 0) del okey del r del key del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyMapping_SetItemString(o, key, value): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) value = ctypes.cast(value, ctypes.POINTER(g.PyObject)) okey = ctypes.POINTER(g.PyObject)() r = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(key, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(okey, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(okey, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(r, ctypes_wrapped.c_int(int(g.PyObject_SetItem(o, okey, value))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(okey, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(okey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(okey, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return r.value del okey del value del r del key del o return ctypes_wrapped.c_int().value @staticmethod def PyMapping_HasKeyString(o, key): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(ctypes_wrapped.c_byte)) v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyMapping_GetItemString(o, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0): while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value del key del o del v return ctypes_wrapped.c_int().value @staticmethod def PyMapping_HasKey(o, key): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) key = ctypes.cast(key, ctypes.POINTER(g.PyObject)) v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetItem(o, key), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0): while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(1L)).value g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value del key del o del v return ctypes_wrapped.c_int().value @staticmethod def PyObject_CallObject(o, a): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) a = ctypes.cast(a, ctypes.POINTER(g.PyObject)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(o, a, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del a del o return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_Call(func, arg, kw): func = ctypes.cast(func, ctypes.POINTER(g.PyObject)) arg = ctypes.cast(arg, ctypes.POINTER(g.PyObject)) kw = ctypes.cast(kw, ctypes.POINTER(g.PyObject)) call = g.ternaryfunc() if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(call, (ctypes.cast(func.contents.ob_type.contents.tp_call, ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: result = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' while calling a Python object'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(call, func, arg, kw), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value)).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('NULL result without error in PyObject_Call'), ctypes.POINTER(ctypes_wrapped.c_byte))) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del result intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("'%.200s' object is not callable"), ctypes.POINTER(ctypes_wrapped.c_byte)), func.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(0L)).value del call del kw del func del arg return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def call_function_tail(callable_a, args): callable_a = ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)) args = ctypes.cast(args, ctypes.POINTER(g.PyObject)) retval = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: a = ctypes.POINTER(g.PyObject)() helpers.assignPtr(a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(a, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents, (ctypes.cast(intp._storePtr(args), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(a), ctypes_wrapped.c_void_p).value or 0)) del a helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(callable_a, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del args del retval del callable_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_CallFunction(callable_a, format_a, *varargs): callable_a = ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(callable_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) and format_a.contents.value)).value: values.va_start.value(va, format_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_VaBuildValue(format_a, va), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) else: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_function_tail(callable_a, args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del va del args del format_a del callable_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _PyObject_CallFunction_SizeT(callable_a, format_a, *varargs): callable_a = ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(callable_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) and format_a.contents.value)).value: values.va_start.value(va, format_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g._Py_VaBuildValue_SizeT(format_a, va), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) else: helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(intp._getPtr(g.call_function_tail(callable_a, args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del va del args del format_a del callable_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_CallMethod(o, name, format_a, *varargs): goto = None while True: if (goto is None): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() retval = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 1): goto = None if (goto is None): helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(o, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_AttributeError, name) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyCallable_Check(func))).value))).value): goto = 3 continue intp._getPtr(g.type_error(ctypes.cast(intp._make_string("attribute of type '%.200s' is not callable"), ctypes.POINTER(ctypes_wrapped.c_byte)), func), ctypes.POINTER(g.PyObject)) goto = u'exit' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) and format_a.contents.value)).value): goto = 5 continue values.va_start.value(va, format_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_VaBuildValue(format_a, va), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto is None): helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_function_tail(func, args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 'exit'): goto = None if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue pass goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 15 continue continue goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 7 continue if (goto == 16): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del va del name del args del o del func del retval del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def _PyObject_CallMethod_SizeT(o, name, format_a, *varargs): goto = None while True: if (goto is None): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() func = ctypes.POINTER(g.PyObject)() retval = ctypes.POINTER(g.PyObject)() if (not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value): goto = 1 continue return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (goto == 1): goto = None if (goto is None): helpers.assignPtr(func, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(o, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (not ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 2 continue g.PyErr_SetString(g.PyExc_AttributeError, name) return ctypes_wrapped.c_int(int(0L)).value if (goto == 2): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.PyCallable_Check(func))).value))).value): goto = 3 continue intp._getPtr(g.type_error(ctypes.cast(intp._make_string("attribute of type '%.200s' is not callable"), ctypes.POINTER(ctypes_wrapped.c_byte)), func), ctypes.POINTER(g.PyObject)) goto = u'exit' continue if (goto == 3): goto = None if (goto is None): if (not ctypes_wrapped.c_int(((ctypes.cast(format_a, ctypes_wrapped.c_void_p).value or 0) and format_a.contents.value)).value): goto = 5 continue values.va_start.value(va, format_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g._Py_VaBuildValue_SizeT(format_a, va), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) goto = 4 continue if (goto == 5): goto = None if (goto is None): helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(ctypes_wrapped.c_int(int(0L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 4): goto = None if (goto is None): helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.call_function_tail(func, args), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if (goto == 'exit'): goto = None if (goto == 6): goto = None if (goto is None): if (not True): goto = 7 continue if (not ctypes_wrapped.c_int(((ctypes.cast(func, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value): goto = 9 continue pass goto = 8 continue if (goto == 9): goto = None if (goto == 10): goto = None if (goto is None): if (not True): goto = 11 continue if (not ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(func, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value): goto = 13 continue pass goto = 12 continue if (goto == 13): goto = None if (goto is None): helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(func, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if (goto == 12): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 15 continue continue goto = 14 continue if (goto == 15): goto = None if (goto is None): goto = 11 continue if (goto == 14): goto = None if (goto is None): goto = 10 continue if (goto == 11): goto = None if (goto == 8): goto = None if (goto is None): if (not ctypes_wrapped.c_int(int(0L)).value): goto = 17 continue continue goto = 16 continue if (goto == 17): goto = None if (goto is None): goto = 7 continue if (goto == 16): goto = None if (goto is None): goto = 6 continue if (goto == 7): goto = None if (goto is None): return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del va del name del args del o del func del retval del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) break @staticmethod def objargs_mktuple(va): first_iteration = None va = helpers.VarArgs(va) i = ctypes_wrapped.c_int() n = ctypes_wrapped.c_int() countva = helpers.VarArgs(None, intp) result = ctypes.POINTER(g.PyObject)() tmp = ctypes.POINTER(g.PyObject)() helpers.assign(countva, va) while ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(values.__va_arg.value(countva, ctypes.POINTER(g.PyObject)()), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.prefixInc(n) helpers.assignPtr(result, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_int(int(0L)).value)).value)).value: if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(ctypes.cast(values.__va_arg.value(va, ctypes.POINTER(g.PyObject)()), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(result, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(tmp, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del tmp del va del i del countva del n del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_CallMethodObjArgs(callable_a, name, *varargs): callable_a = ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(g.PyObject)) args = ctypes.POINTER(g.PyObject)() tmp = ctypes.POINTER(g.PyObject)() vargs = helpers.VarArgs(varargs, intp) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(callable_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int(((ctypes.cast(name, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) helpers.assignPtr(callable_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(callable_a, name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(callable_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.va_start.value(vargs, name) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.objargs_mktuple(vargs), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(vargs) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(callable_a, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0) del tmp del args del vargs del name del callable_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyObject_CallFunctionObjArgs(callable_a, *varargs): callable_a = ctypes.cast(callable_a, ctypes.POINTER(g.PyObject)) args = ctypes.POINTER(g.PyObject)() tmp = ctypes.POINTER(g.PyObject)() vargs = helpers.VarArgs(varargs, intp) if ctypes_wrapped.c_int(((ctypes.cast(callable_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.null_error(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) values.va_start.value(vargs, callable_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.objargs_mktuple(vargs), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(vargs) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(tmp, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_Call(callable_a, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(tmp), ctypes_wrapped.c_void_p).value or 0) del tmp del args del vargs del callable_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def abstract_get_bases(cls): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) __bases__ = ctypes.POINTER(g.PyObject)() bases = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(__bases__, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(__bases__, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__bases__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(__bases__, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(cls, __bases__), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_AttributeError))).value: g.PyErr_Clear() return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value return (ctypes.cast(intp._storePtr(bases), ctypes_wrapped.c_void_p).value or 0) del bases del __bases__ del cls return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def abstract_issubclass(derived, cls): first_iteration = None derived = ctypes.cast(derived, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) bases = ctypes.POINTER(g.PyObject)() i = g.Py_ssize_t() n = g.Py_ssize_t() r = ctypes_wrapped.c_int() while ctypes_wrapped.c_int(int(1L)).value: if ctypes_wrapped.c_int(((ctypes.cast(derived, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(cls, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value helpers.assignPtr(bases, (ctypes.cast(intp._storePtr(intp._getPtr(g.abstract_get_bases(derived), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value return ctypes_wrapped.c_int(int(0L)).value helpers.assign(n, ctypes.cast(bases, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(1L)).value)).value: helpers.assignPtr(derived, (ctypes.cast(intp._storePtr(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', ctypes_wrapped.c_int(int(0L)).value).contents), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break continue if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break helpers.assign(r, ctypes_wrapped.c_int(int(g.abstract_issubclass(helpers.ptrArithmetic(ctypes.cast(bases, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, cls))).value) if ctypes_wrapped.c_int((r.value != ctypes_wrapped.c_int(int(0L)).value)).value: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return r.value del bases del i del derived del n del r del cls return ctypes_wrapped.c_int().value @staticmethod def check_class(cls, error): cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) error = ctypes.cast(error, ctypes.POINTER(ctypes_wrapped.c_byte)) bases = ctypes.cast(intp._getPtr(g.abstract_get_bases(cls), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(bases, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_TypeError, error) return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(bases, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(bases, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del bases del error del cls return ctypes_wrapped.c_int().value @staticmethod def recursive_isinstance(inst, cls): inst = ctypes.cast(inst, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) icls = ctypes.POINTER(g.PyObject)() __class__ = ctypes.POINTER(g.PyObject)() retval = ctypes_wrapped.c_int() if ctypes_wrapped.c_int(((ctypes.cast(__class__, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(__class__, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_InternFromString(ctypes.cast(intp._make_string('__class__'), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(__class__, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(((ctypes.cast(inst.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value: inclass = ctypes.cast(ctypes.cast(ctypes.cast(inst, ctypes.POINTER(g.PyInstanceObject)).contents.in_class, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) helpers.assign(retval, ctypes_wrapped.c_int(int(g.PyClass_IsSubclass(inclass, cls))).value) del inclass elif ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(retval, ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(inst, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject)), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(inst, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject))))).value)).value) if ctypes_wrapped.c_int((retval.value == ctypes_wrapped.c_int(int(0L)).value)).value: c = ctypes.cast(intp._getPtr(g.PyObject_GetAttr(inst, __class__), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(c, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() else: if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(c, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(ctypes.cast(inst.contents.ob_type, ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(c, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assign(retval, ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(c, ctypes.POINTER(g.PyTypeObject)), ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject))))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(c, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(c, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(c, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break del c else: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_class(cls, ctypes.cast(intp._make_string('isinstance() arg 2 must be a class, type, or tuple of classes and types'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(icls, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttr(inst, __class__), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(icls, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.PyErr_Clear() helpers.assign(retval, ctypes_wrapped.c_int(int(0L)).value) else: helpers.assign(retval, ctypes_wrapped.c_int(int(g.abstract_issubclass(icls, cls))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(icls, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(icls, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(icls, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return retval.value del retval del icls del inst del __class__ del cls return ctypes_wrapped.c_int().value @staticmethod def PyObject_IsInstance(inst, cls): first_iteration = None inst = ctypes.cast(inst, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) name = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(inst, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject)), ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int(1L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: i = g.Py_ssize_t() n = g.Py_ssize_t() r = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' in __instancecheck__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(n, ctypes.cast(cls, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break item = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(cls, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.assign(r, ctypes_wrapped.c_int(int(g.PyObject_IsInstance(inst, item))).value) if ctypes_wrapped.c_int((r.value != ctypes_wrapped.c_int(int(0L)).value)).value: break del item helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) return r.value del i del r del n if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: checker = ctypes.POINTER(g.PyObject)() helpers.assignPtr(checker, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_LookupSpecial(cls, ctypes.cast(intp._make_string('__instancecheck__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(name)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(checker, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: res = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' in __instancecheck__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(checker, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(checker, inst, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(checker, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value del res del ok elif (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del checker return ctypes_wrapped.c_int(int(g.recursive_isinstance(inst, cls))).value del inst del name del cls return ctypes_wrapped.c_int().value @staticmethod def recursive_issubclass(derived, cls): derived = ctypes.cast(derived, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) retval = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(derived, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(31L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: return ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(derived, ctypes.POINTER(g.PyTypeObject)), ctypes.cast(cls, ctypes.POINTER(g.PyTypeObject))))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(derived.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value or ctypes_wrapped.c_int((not ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_class(derived, ctypes.cast(intp._make_string('issubclass() arg 1 must be a class'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int((not ctypes_wrapped.c_int(int(g.check_class(cls, ctypes.cast(intp._make_string('issubclass() arg 2 must be a class or tuple of classes'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(retval, ctypes_wrapped.c_int(int(g.abstract_issubclass(derived, cls))).value) elif ctypes_wrapped.c_int(int((not helpers.assign(retval, ctypes_wrapped.c_int(((ctypes.cast(derived, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(cls, ctypes_wrapped.c_void_p).value or 0))).value).value))).value: helpers.assign(retval, ctypes_wrapped.c_int(int(g.PyClass_IsSubclass(derived, cls))).value) return retval.value del retval del derived del cls return ctypes_wrapped.c_int().value @staticmethod def PyObject_IsSubclass(derived, cls): first_iteration = None derived = ctypes.cast(derived, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) name = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((ctypes.cast(cls, ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(26L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: i = g.Py_ssize_t() n = g.Py_ssize_t() r = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' in __subclasscheck__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assign(n, ctypes.cast(cls, ctypes.POINTER(g.PyVarObject)).contents.ob_size.value) if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.prefixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break item = ctypes.cast(helpers.ptrArithmetic(ctypes.cast(cls, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, ctypes.POINTER(g.PyObject)) helpers.assign(r, ctypes_wrapped.c_int(int(g.PyObject_IsSubclass(derived, item))).value) if ctypes_wrapped.c_int((r.value != ctypes_wrapped.c_int(int(0L)).value)).value: break del item helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) return r.value del i del r del n if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyClass_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(((ctypes.cast(cls.contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyInstance_Type), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value: checker = ctypes.POINTER(g.PyObject)() helpers.assignPtr(checker, (ctypes.cast(intp._storePtr(intp._getPtr(g._PyObject_LookupSpecial(cls, ctypes.cast(intp._make_string('__subclasscheck__'), ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes.pointer(name)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(checker, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: res = ctypes.POINTER(g.PyObject)() ok = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((helpers.prefixInc(g._PyThreadState_Current.contents.recursion_depth).value > g._Py_CheckRecursionLimit.value)).value and ctypes_wrapped.c_int(int(g._Py_CheckRecursiveCall(ctypes.cast(intp._make_string(' in __subclasscheck__'), ctypes.POINTER(ctypes_wrapped.c_byte))))).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(checker, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_CallFunctionObjArgs(checker, derived, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) helpers.prefixDec(g._PyThreadState_Current.contents.recursion_depth) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(checker, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(checker, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(ok, ctypes_wrapped.c_int(int(g.PyObject_IsTrue(res))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ok.value del res del ok elif (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0): return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del checker return ctypes_wrapped.c_int(int(g.recursive_issubclass(derived, cls))).value del derived del name del cls return ctypes_wrapped.c_int().value @staticmethod def _PyObject_RealIsInstance(inst, cls): inst = ctypes.cast(inst, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.recursive_isinstance(inst, cls))).value del inst del cls return ctypes_wrapped.c_int().value @staticmethod def _PyObject_RealIsSubclass(derived, cls): derived = ctypes.cast(derived, ctypes.POINTER(g.PyObject)) cls = ctypes.cast(cls, ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int(g.recursive_issubclass(derived, cls))).value del derived del cls return ctypes_wrapped.c_int().value @staticmethod def PyObject_GetIter(o): o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) t = ctypes.cast(o.contents.ob_type, ctypes.POINTER(g.PyTypeObject)) f = g.getiterfunc() if ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((t.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(f, (ctypes.cast(t.contents.tp_iter, ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(f, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int(int(g.PySequence_Check(o))).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PySeqIter_New(o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.type_error(ctypes.cast(intp._make_string("'%.200s' object is not iterable"), ctypes.POINTER(ctypes_wrapped.c_byte)), o), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: res = ctypes.cast(ctypes.cast(helpers.checkedFuncPtrCall(f, o), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(res, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_ulong(int((res.contents.ob_type.contents.tp_flags.value & ctypes_wrapped.c_uint(int((ctypes_wrapped.c_int(int(1L)).value << ctypes_wrapped.c_int(int(7L)).value))).value))).value != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(res.contents.ob_type.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value)).value and ctypes_wrapped.c_int(((ctypes.cast(res.contents.ob_type.contents.tp_iternext, ctypes_wrapped.c_void_p).value or 0) != (ctypes.cast(helpers.makeFuncPtr(ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)), g._PyObject_NextNotImplemented), ctypes_wrapped.c_void_p).value or 0))).value)).value)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_TypeError, ctypes.cast(intp._make_string("iter() returned non-iterator of type '%.100s'"), ctypes.POINTER(ctypes_wrapped.c_byte)), res.contents.ob_type.contents.tp_name), ctypes.POINTER(g.PyObject)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(res, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(res, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(res, ctypes_wrapped.c_int(int(0L)).value) return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del res del t del o del f return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyIter_Next(iter_a): iter_a = ctypes.cast(iter_a, ctypes.POINTER(g.PyObject)) result = ctypes.POINTER(g.PyObject)() helpers.assignPtr(result, (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(iter_a.contents.ob_type.contents.tp_iternext, iter_a), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(result, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value and (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value and ctypes_wrapped.c_int(int(g.PyErr_ExceptionMatches(g.PyExc_StopIteration))).value)).value: g.PyErr_Clear() return (ctypes.cast(intp._storePtr(result), ctypes_wrapped.c_void_p).value or 0) del iter_a del result return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) va_double = ctypes_wrapped.c_double _Py_PackageContext = ctypes.POINTER(ctypes_wrapped.c_byte)() api_version_warning = (ctypes_wrapped.c_byte * 111)() # TODO init api_version_warning with (ctypes_wrapped.c_byte * 111)(*intp._make_string('Python C API version mismatch for module %.100s: This Python has API version %d, module %.100s has version %d.')) @staticmethod def Py_InitModule4_64(name, methods, doc, passthrough, module_api_version): first_iteration = None name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) methods = ctypes.cast(methods, ctypes.POINTER(g.PyMethodDef)) doc = ctypes.cast(doc, ctypes.POINTER(ctypes_wrapped.c_byte)) passthrough = ctypes.cast(passthrough, ctypes.POINTER(g.PyObject)) module_api_version = ctypes_wrapped.c_int(int(module_api_version.value)) m = ctypes.POINTER(g.PyObject)() d = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() n = ctypes.POINTER(g.PyObject)() ml = ctypes.POINTER(g.PyMethodDef)() interp = ctypes.cast(intp._getPtr(g.PyThreadState_Get(), ctypes.POINTER(g.PyThreadState)).contents.interp, ctypes.POINTER(g.PyInterpreterState)) if ctypes_wrapped.c_int(((ctypes.cast(interp.contents.modules, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: g.Py_FatalError(ctypes.cast(intp._make_string('Python import machinery not initialized'), ctypes.POINTER(ctypes_wrapped.c_byte))) if ctypes_wrapped.c_int((module_api_version.value != ctypes_wrapped.c_int(int(1013L)).value)).value: message = (ctypes_wrapped.c_byte * 512L)() ctypes_wrapped.c_int(int(g.PyOS_snprintf(ctypes.cast(message, ctypes.POINTER(ctypes_wrapped.c_byte)), ctypes_wrapped.c_size_t(ctypes.sizeof(message)), ctypes.cast(g.api_version_warning, ctypes.POINTER(ctypes_wrapped.c_byte)), name, ctypes_wrapped.c_int(int(1013L)), name, module_api_version))) if ctypes_wrapped.c_int(int(g.PyErr_WarnEx(g.PyExc_RuntimeWarning, ctypes.cast(message, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))))).value: return ctypes_wrapped.c_int(int(0L)).value del message if ctypes_wrapped.c_int(((ctypes.cast(g._Py_PackageContext, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: p = ctypes.cast(values.strrchr.value(g._Py_PackageContext, ctypes_wrapped.c_int(ctypes.c_byte(46).value)), ctypes.POINTER(ctypes_wrapped.c_byte)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(p, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((values.strcmp.value(name, helpers.ptrArithmetic(p, u'+', ctypes_wrapped.c_int(int(1L)).value)).value == ctypes_wrapped.c_int(int(0L)).value)).value)).value: helpers.assignPtr(name, (ctypes.cast(intp._storePtr(g._Py_PackageContext), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(g._Py_PackageContext, ctypes_wrapped.c_int(int(0L)).value) del p if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(m, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyImport_AddModule(name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(methods, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(n, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(name), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(n, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assignPtr(ml, (ctypes.cast(intp._storePtr(methods), ctypes_wrapped.c_void_p).value or 0)) while True: if first_iteration: first_iteration = False else: helpers.postfixIncPtr(ml) if ctypes_wrapped.c_int(((ctypes.cast(ml.contents.ml_name, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_uint(int((ml.contents.ml_flags.value & ctypes_wrapped.c_int(int(16L)).value))).value or ctypes_wrapped.c_uint(int((ml.contents.ml_flags.value & ctypes_wrapped.c_int(int(32L)).value))).value)).value: g.PyErr_SetString(g.PyExc_ValueError, ctypes.cast(intp._make_string('module functions cannot set METH_CLASS or METH_STATIC'), ctypes.POINTER(ctypes_wrapped.c_byte))) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(n, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyCFunction_NewEx(ml, passthrough, n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(n, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(d, ml.contents.ml_name, v))).value != ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(n, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(n, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(n, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(((ctypes.cast(doc, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromString(doc), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyDict_SetItemString(d, ctypes.cast(intp._make_string('__doc__'), ctypes.POINTER(ctypes_wrapped.c_byte)), v))).value != ctypes_wrapped.c_int(int(0L)).value)).value)).value: while True: if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: pass else: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(m), ctypes_wrapped.c_void_p).value or 0) del interp del name del doc del v del m del d del ml del passthrough del n del module_api_version del methods return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def countformat(format_a, endchar): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) endchar = ctypes_wrapped.c_int(int(endchar.value)) count = ctypes_wrapped.c_int() level = ctypes_wrapped.c_int() while ctypes_wrapped.c_int((ctypes_wrapped.c_int((level.value > ctypes_wrapped.c_int(int(0L)).value)).value or ctypes_wrapped.c_int((format_a.contents.value != endchar.value)).value)).value: if True: _switchvalue = None _switchvalue = format_a.contents.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(0).value)): _switchfallthrough = True g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('unmatched paren in format'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if (_switchfallthrough or (_switchvalue == ctypes.c_byte(40).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(91).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(123).value)): _switchfallthrough = True if ctypes_wrapped.c_int((level.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(count) helpers.postfixInc(level) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(41).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(93).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(125).value)): _switchfallthrough = True helpers.postfixDec(level) break if (_switchfallthrough or (_switchvalue == ctypes.c_byte(35).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(38).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(44).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(58).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(32).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(9).value)): _switchfallthrough = True break if (not _switchfallthrough): if ctypes_wrapped.c_int((level.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(count) break del _switchfallthrough del _switchvalue helpers.postfixIncPtr(format_a) return count.value del endchar del count del format_a del level return ctypes_wrapped.c_int().value @staticmethod def do_mkdict(p_format, p_va, endchar, n, flags): first_iteration = None p_format = ctypes.cast(p_format, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) p_va = helpers.PyRef(p_va.ref) endchar = ctypes_wrapped.c_int(int(endchar.value)) n = ctypes_wrapped.c_int(int(n.value)) flags = ctypes_wrapped.c_int(int(flags.value)) d = ctypes.POINTER(g.PyObject)() i = ctypes_wrapped.c_int() itemfailed = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(d, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyDict_New(), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.augAssign(i, u'+=', ctypes_wrapped.c_int(int(2L)).value) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break k = ctypes.POINTER(g.PyObject)() v = ctypes.POINTER(g.PyObject)() err = ctypes_wrapped.c_int() helpers.assignPtr(k, (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mkvalue(p_format, p_va, flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(k, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(itemfailed, ctypes_wrapped.c_int(int(1L)).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(k, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mkvalue(p_format, p_va, flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(itemfailed, ctypes_wrapped.c_int(int(1L)).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(v, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assign(err, ctypes_wrapped.c_int(int(g.PyDict_SetItem(d, k, v))).value) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(k, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(k, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(k, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break if ctypes_wrapped.c_int((ctypes_wrapped.c_int((err.value < ctypes_wrapped.c_int(int(0L)).value)).value or itemfailed.value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del k del err del v if ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(d, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value and ctypes_wrapped.c_int((p_format.contents.contents.value != endchar.value)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(d, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(d, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break helpers.assignPtr(d, ctypes_wrapped.c_int(int(0L)).value) g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('Unmatched paren in format'), ctypes.POINTER(ctypes_wrapped.c_byte))) elif endchar.value: helpers.prefixIncPtr(p_format.contents) return (ctypes.cast(intp._storePtr(d), ctypes_wrapped.c_void_p).value or 0) del itemfailed del d del endchar del n del i del flags del p_format del p_va return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_mklist(p_format, p_va, endchar, n, flags): first_iteration = None p_format = ctypes.cast(p_format, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) p_va = helpers.PyRef(p_va.ref) endchar = ctypes_wrapped.c_int(int(endchar.value)) n = ctypes_wrapped.c_int(int(n.value)) flags = ctypes_wrapped.c_int(int(flags.value)) v = ctypes.POINTER(g.PyObject)() i = ctypes_wrapped.c_int() itemfailed = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyList_New(g.Py_ssize_t(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break w = ctypes.cast(intp._getPtr(g.do_mkvalue(p_format, p_va, flags), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(itemfailed, ctypes_wrapped.c_int(int(1L)).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyListObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) del w if itemfailed.value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((p_format.contents.contents.value != endchar.value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('Unmatched paren in format'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if endchar.value: helpers.prefixIncPtr(p_format.contents) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del itemfailed del endchar del n del i del flags del p_format del v del p_va return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_mktuple(p_format, p_va, endchar, n, flags): first_iteration = None p_format = ctypes.cast(p_format, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) p_va = helpers.PyRef(p_va.ref) endchar = ctypes_wrapped.c_int(int(endchar.value)) n = ctypes_wrapped.c_int(int(n.value)) flags = ctypes_wrapped.c_int(int(flags.value)) v = ctypes.POINTER(g.PyObject)() i = ctypes_wrapped.c_int() itemfailed = ctypes_wrapped.c_int() if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int(((ctypes.cast(helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyTuple_New(g.Py_ssize_t(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)), ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if True: first_iteration = True helpers.assign(i, ctypes_wrapped.c_int(int(0L)).value) while True: if first_iteration: first_iteration = False else: helpers.postfixInc(i) if ctypes_wrapped.c_int((i.value < n.value)).value: pass else: break w = ctypes.cast(intp._getPtr(g.do_mkvalue(p_format, p_va, flags), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int(((ctypes.cast(w, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assign(itemfailed, ctypes_wrapped.c_int(int(1L)).value) helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) helpers.assignPtr(w, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.assignPtr(helpers.ptrArithmetic(ctypes.cast(v, ctypes.POINTER(g.PyTupleObject)).contents.ob_item, '+', i.value).contents, (ctypes.cast(intp._storePtr(w), ctypes_wrapped.c_void_p).value or 0)) del w if itemfailed.value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((p_format.contents.contents.value != endchar.value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(v, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('Unmatched paren in format'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value if endchar.value: helpers.prefixIncPtr(p_format.contents) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del itemfailed del endchar del n del i del flags del p_format del v del p_va return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def do_mkvalue(p_format, p_va, flags): first_iteration = None p_format = ctypes.cast(p_format, ctypes.POINTER(ctypes.POINTER(ctypes_wrapped.c_byte))) p_va = helpers.PyRef(p_va.ref) flags = ctypes_wrapped.c_int(int(flags.value)) if True: first_iteration = True while True: if first_iteration: first_iteration = False if True: _switchvalue = None _switchvalue = helpers.postfixIncPtr(p_format.contents).contents.value _switchfallthrough = None _switchfallthrough = False while True: if (_switchfallthrough or (_switchvalue == ctypes.c_byte(40).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mktuple(p_format, p_va, ctypes_wrapped.c_int(int(ctypes.c_byte(41).value)), ctypes_wrapped.c_int(int(g.countformat(p_format.contents, ctypes_wrapped.c_int(int(ctypes.c_byte(41).value))))), flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(91).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mklist(p_format, p_va, ctypes_wrapped.c_int(int(ctypes.c_byte(93).value)), ctypes_wrapped.c_int(int(g.countformat(p_format.contents, ctypes_wrapped.c_int(int(ctypes.c_byte(93).value))))), flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(123).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mkdict(p_format, p_va, ctypes_wrapped.c_int(int(ctypes.c_byte(125).value)), ctypes_wrapped.c_int(int(g.countformat(p_format.contents, ctypes_wrapped.c_int(int(ctypes.c_byte(125).value))))), flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(98).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(66).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(104).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(105).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(values.__va_arg.value(p_va.ref, ctypes_wrapped.c_int()).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(72).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(values.__va_arg.value(p_va.ref, ctypes_wrapped.c_uint()).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(73).value)): _switchfallthrough = True n = ctypes_wrapped.c_uint() helpers.assign(n, values.__va_arg.value(p_va.ref, ctypes_wrapped.c_uint()).value) if ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_long(int(g.PyInt_GetMax())).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromUnsignedLong(ctypes_wrapped.c_ulong(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del n if (_switchfallthrough or (_switchvalue == ctypes.c_byte(110).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(108).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(values.__va_arg.value(p_va.ref, ctypes_wrapped.c_long())), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(107).value)): _switchfallthrough = True n = ctypes_wrapped.c_ulong() helpers.assign(n, values.__va_arg.value(p_va.ref, ctypes_wrapped.c_ulong()).value) if ctypes_wrapped.c_int((n.value > ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_long(int(g.PyInt_GetMax())).value)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyLong_FromUnsignedLong(n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) else: return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyInt_FromLong(ctypes_wrapped.c_long(int(n.value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del n if (_switchfallthrough or (_switchvalue == ctypes.c_byte(102).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(100).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyFloat_FromDouble(ctypes_wrapped.c_double(values.__va_arg.value(p_va.ref, g.va_double()).value)), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(68).value)): _switchfallthrough = True return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyComplex_FromCComplex(ctypes.cast(values.__va_arg.value(p_va.ref, ctypes.POINTER(g.Py_complex)()), ctypes.POINTER(g.Py_complex)).contents), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) if (_switchfallthrough or (_switchvalue == ctypes.c_byte(99).value)): _switchfallthrough = True p = (ctypes_wrapped.c_byte * 1L)() helpers.assign(helpers.ptrArithmetic(p, '+', ctypes_wrapped.c_int(int(0L)).value).contents, ctypes_wrapped.c_byte(int(values.__va_arg.value(p_va.ref, ctypes_wrapped.c_int()).value)).value) return (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(ctypes.cast(p, ctypes.POINTER(ctypes_wrapped.c_byte)), g.Py_ssize_t(int(ctypes_wrapped.c_int(int(1L)).value))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del p if (_switchfallthrough or (_switchvalue == ctypes.c_byte(115).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(122).value)): _switchfallthrough = True v = ctypes.POINTER(g.PyObject)() str_a = ctypes.cast(values.__va_arg.value(p_va.ref, ctypes.POINTER(ctypes_wrapped.c_byte)()), ctypes.POINTER(ctypes_wrapped.c_byte)) n = g.Py_ssize_t() if ctypes_wrapped.c_int((p_format.contents.contents.value == ctypes.c_byte(35).value)).value: helpers.prefixIncPtr(p_format.contents) if ctypes_wrapped.c_uint(int((flags.value & ctypes_wrapped.c_int(int(1L)).value))).value: helpers.assign(n, values.__va_arg.value(p_va.ref, g.Py_ssize_t()).value) else: helpers.assign(n, values.__va_arg.value(p_va.ref, ctypes_wrapped.c_int()).value) else: helpers.assign(n, ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value) if ctypes_wrapped.c_int(((ctypes.cast(str_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.assignPtr(v, (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0)) helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) else: if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: m = ctypes_wrapped.c_ulong(int(values.strlen.value(str_a).value)) if ctypes_wrapped.c_int((m.value > g.Py_ssize_t(int(ctypes_wrapped.c_ulong(int((ctypes_wrapped.c_ulong(int(ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value)).value >> ctypes_wrapped.c_int(int(1L)).value))).value)).value)).value: g.PyErr_SetString(g.PyExc_OverflowError, ctypes.cast(intp._make_string('string too long for Python string'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value helpers.assign(n, g.Py_ssize_t(int(m.value)).value) del m helpers.assignPtr(v, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyString_FromStringAndSize(str_a, n), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del n del str_a del v if (_switchfallthrough or (_switchvalue == ctypes.c_byte(78).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(83).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(79).value)): _switchfallthrough = True if ctypes_wrapped.c_int((p_format.contents.contents.value == ctypes.c_byte(38).value)).value: converter = ctypes.CFUNCTYPE(helpers.fixReturnType(ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p) func = ctypes.cast(values.__va_arg.value(p_va.ref, converter()), converter) arg = ctypes.cast(values.__va_arg.value(p_va.ref, ctypes_wrapped.c_void_p()), ctypes_wrapped.c_void_p) helpers.prefixIncPtr(p_format.contents) return (ctypes.cast(intp._storePtr(ctypes.cast(helpers.checkedFuncPtrCall(func, arg), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del func del arg else: v = ctypes.POINTER(g.PyObject)() helpers.assignPtr(v, (ctypes.cast(intp._storePtr(values.__va_arg.value(p_va.ref, ctypes.POINTER(g.PyObject)())), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(v, ctypes_wrapped.c_void_p).value or 0) != ctypes_wrapped.c_int(int(0L)).value)).value: if ctypes_wrapped.c_int((helpers.ptrArithmetic(p_format.contents, u'-', ctypes_wrapped.c_int(int(1L)).value).contents.value != ctypes.c_byte(78).value)).value: helpers.postfixInc(ctypes.cast(v, ctypes.POINTER(g.PyObject)).contents.ob_refcnt) elif ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('NULL object passed to Py_BuildValue'), ctypes.POINTER(ctypes_wrapped.c_byte))) return (ctypes.cast(intp._storePtr(v), ctypes_wrapped.c_void_p).value or 0) del v if (_switchfallthrough or (_switchvalue == ctypes.c_byte(58).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(44).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(32).value)): _switchfallthrough = True if (_switchfallthrough or (_switchvalue == ctypes.c_byte(9).value)): _switchfallthrough = True break if (not _switchfallthrough): g.PyErr_SetString(g.PyExc_SystemError, ctypes.cast(intp._make_string('bad format char passed to Py_BuildValue'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int(0L)).value break del _switchfallthrough del _switchvalue del flags del p_va del p_format return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_BuildValue(format_a, *varargs): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) retval = ctypes.POINTER(g.PyObject)() values.va_start.value(va, format_a) helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.va_build_value(format_a, va, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del va del retval del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_BuildValue_SizeT(format_a, *varargs): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(varargs, intp) retval = ctypes.POINTER(g.PyObject)() values.va_start.value(va, format_a) helpers.assignPtr(retval, (ctypes.cast(intp._storePtr(intp._getPtr(g.va_build_value(format_a, va, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(va) return (ctypes.cast(intp._storePtr(retval), ctypes_wrapped.c_void_p).value or 0) del va del retval del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def Py_VaBuildValue(format_a, va): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(va) return (ctypes.cast(intp._storePtr(intp._getPtr(g.va_build_value(format_a, va, ctypes_wrapped.c_int(int(0L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del va del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def _Py_VaBuildValue_SizeT(format_a, va): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(va) return (ctypes.cast(intp._storePtr(intp._getPtr(g.va_build_value(format_a, va, ctypes_wrapped.c_int(int(1L))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del va del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def va_build_value(format_a, va, flags): format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) va = helpers.VarArgs(va) flags = ctypes_wrapped.c_int(int(flags.value)) f = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) n = ctypes_wrapped.c_int(int(ctypes_wrapped.c_int(int(g.countformat(f, ctypes_wrapped.c_int(int(ctypes.c_byte(0).value))))).value)) lva = helpers.VarArgs(None, intp) helpers.assign(lva, va) if ctypes_wrapped.c_int((n.value < ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(0L)).value)).value: helpers.postfixInc(ctypes.cast(ctypes.pointer(g._Py_NoneStruct), ctypes.POINTER(g.PyObject)).contents.ob_refcnt) return (ctypes.cast(intp._storePtr(ctypes.pointer(g._Py_NoneStruct)), ctypes_wrapped.c_void_p).value or 0) if ctypes_wrapped.c_int((n.value == ctypes_wrapped.c_int(int(1L)).value)).value: return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mkvalue(ctypes.pointer(f), helpers.PyRef(lva), flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) return (ctypes.cast(intp._storePtr(intp._getPtr(g.do_mktuple(ctypes.pointer(f), helpers.PyRef(lva), ctypes_wrapped.c_int(int(ctypes.c_byte(0).value)), n, flags), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0) del va del f del n del lva del flags del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_CallFunction(obj, format_a, *varargs): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) vargs = helpers.VarArgs(varargs, intp) args = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() values.va_start.value(vargs, format_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_VaBuildValue(format_a, vargs), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(vargs) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(obj, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del vargs del args del obj del format_a del res return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyEval_CallMethod(obj, methodname, format_a, *varargs): obj = ctypes.cast(obj, ctypes.POINTER(g.PyObject)) methodname = ctypes.cast(methodname, ctypes.POINTER(ctypes_wrapped.c_byte)) format_a = ctypes.cast(format_a, ctypes.POINTER(ctypes_wrapped.c_byte)) vargs = helpers.VarArgs(varargs, intp) meth = ctypes.POINTER(g.PyObject)() args = ctypes.POINTER(g.PyObject)() res = ctypes.POINTER(g.PyObject)() helpers.assignPtr(meth, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyObject_GetAttrString(obj, methodname), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(meth, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value values.va_start.value(vargs, format_a) helpers.assignPtr(args, (ctypes.cast(intp._storePtr(intp._getPtr(g.Py_VaBuildValue(format_a, vargs), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) values.va_end.value(vargs) if ctypes_wrapped.c_int(((ctypes.cast(args, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(meth, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value helpers.assignPtr(res, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyEval_CallObjectWithKeywords(meth, args, intp._getPtr(ctypes_wrapped.c_int(int(0L)).value, ctypes.POINTER(g.PyObject))), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(meth, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(meth, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(args, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(args, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return (ctypes.cast(intp._storePtr(res), ctypes_wrapped.c_void_p).value or 0) del methodname del res del args del vargs del obj del meth del format_a return (ctypes.cast(ctypes.POINTER(g.PyObject)(), ctypes_wrapped.c_void_p).value or 0) @staticmethod def PyModule_AddObject(m, name, o): m = ctypes.cast(m, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) o = ctypes.cast(o, ctypes.POINTER(g.PyObject)) dict_a = ctypes.POINTER(g.PyObject)() if ctypes_wrapped.c_int((not ctypes_wrapped.c_int((ctypes_wrapped.c_int(((ctypes.cast(ctypes.cast(m, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes_wrapped.c_void_p).value or 0) == (ctypes.cast(ctypes.pointer(g.PyModule_Type), ctypes_wrapped.c_void_p).value or 0))).value or ctypes_wrapped.c_int(int(g.PyType_IsSubtype(ctypes.cast(m, ctypes.POINTER(g.PyObject)).contents.ob_type, ctypes.pointer(g.PyModule_Type)))).value)).value)).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('PyModule_AddObject() needs module as first arg'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((not (ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0))).value: if ctypes_wrapped.c_int((not (ctypes.cast(intp._getPtr(g.PyErr_Occurred(), ctypes.POINTER(g.PyObject)), ctypes_wrapped.c_void_p).value or 0))).value: g.PyErr_SetString(g.PyExc_TypeError, ctypes.cast(intp._make_string('PyModule_AddObject() needs non-NULL value'), ctypes.POINTER(ctypes_wrapped.c_byte))) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value helpers.assignPtr(dict_a, (ctypes.cast(intp._storePtr(intp._getPtr(g.PyModule_GetDict(m), ctypes.POINTER(g.PyObject))), ctypes_wrapped.c_void_p).value or 0)) if ctypes_wrapped.c_int(((ctypes.cast(dict_a, ctypes_wrapped.c_void_p).value or 0) == ctypes_wrapped.c_int(int(0L)).value)).value: intp._getPtr(g.PyErr_Format(g.PyExc_SystemError, ctypes.cast(intp._make_string("module '%s' has no __dict__"), ctypes.POINTER(ctypes_wrapped.c_byte)), intp._getPtr(g.PyModule_GetName(m), ctypes.POINTER(ctypes_wrapped.c_byte))), ctypes.POINTER(g.PyObject)) return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int(int(g.PyDict_SetItemString(dict_a, name, o))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int(0L)).value del dict_a del m del name del o return ctypes_wrapped.c_int().value @staticmethod def PyModule_AddIntConstant(m, name, value): m = ctypes.cast(m, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) value = ctypes_wrapped.c_long(int(value.value)) o = ctypes.cast(intp._getPtr(g.PyInt_FromLong(value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddObject(m, name, o))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del o del m del name del value return ctypes_wrapped.c_int().value @staticmethod def PyModule_AddStringConstant(m, name, value): m = ctypes.cast(m, ctypes.POINTER(g.PyObject)) name = ctypes.cast(name, ctypes.POINTER(ctypes_wrapped.c_byte)) value = ctypes.cast(value, ctypes.POINTER(ctypes_wrapped.c_byte)) o = ctypes.cast(intp._getPtr(g.PyString_FromString(value), ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)) if ctypes_wrapped.c_int((not (ctypes.cast(o, ctypes_wrapped.c_void_p).value or 0))).value: return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value if ctypes_wrapped.c_int((ctypes_wrapped.c_int(int(g.PyModule_AddObject(m, name, o))).value == ctypes_wrapped.c_int(int(0L)).value)).value: return ctypes_wrapped.c_int(int(0L)).value while True: if ctypes_wrapped.c_int((helpers.prefixDec(ctypes.cast(o, ctypes.POINTER(g.PyObject)).contents.ob_refcnt).value != ctypes_wrapped.c_int(int(0L)).value)).value: pass else: helpers.checkedFuncPtrCall(ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject)).contents.ob_type.contents.tp_dealloc, ctypes.cast(ctypes.cast(o, ctypes.POINTER(g.PyObject)), ctypes.POINTER(g.PyObject))) if ctypes_wrapped.c_int(int(0L)).value: continue else: break return ctypes_wrapped.c_int(int((- ctypes_wrapped.c_int(int(1L)).value))).value del o del m del name del value return ctypes_wrapped.c_int().value if __name__ == '__main__': g.Py_Main(ctypes_wrapped.c_int(len(sys.argv)), (ctypes.POINTER(ctypes_wrapped.c_char) * (len(sys.argv) + 1))( *[ctypes.cast(intp._make_string(arg), ctypes.POINTER(ctypes_wrapped.c_char)) for arg in sys.argv]))