def __init__(self, space, size, extra, extra_position, ctitem, could_cast_anything=True): name, name_position = ctitem.insert_name(extra, extra_position) W_CType.__init__(self, space, size, name, name_position) # this is the "underlying type": # - for pointers, it is the pointed-to type # - for arrays, it is the array item type # - for functions, it is the return type self.ctitem = ctitem self.can_cast_anything = could_cast_anything and ctitem.cast_anything
def __init__(self, space, size, extra, extra_position, ctitem, could_cast_anything=True): from pypy.module._cffi_backend.ctypestruct import W_CTypeStructOrUnion name, name_position = ctitem.insert_name(extra, extra_position) W_CType.__init__(self, space, size, name, name_position) # this is the "underlying type": # - for pointers, it is the pointed-to type # - for arrays, it is the array item type # - for functions, it is the return type self.ctitem = ctitem self.can_cast_anything = could_cast_anything and ctitem.cast_anything self.is_struct_ptr = isinstance(ctitem, W_CTypeStructOrUnion)
def __init__(self, space, size, extra, extra_position, ctitem): name, name_position = ctitem.insert_name(extra, extra_position) W_CType.__init__(self, space, size, name, name_position) # this is the "underlying type": # - for pointers, it is the pointed-to type # - for arrays, it is the array item type # - for functions, it is the return type self.ctitem = ctitem self.accept_str = (self.is_nonfunc_pointer_or_array and (isinstance(ctitem, ctypevoid.W_CTypeVoid) or isinstance(ctitem, ctypeprim.W_CTypePrimitiveChar) or (ctitem.is_primitive_integer and ctitem.size == rffi.sizeof(lltype.Char))))
def __init__(self, space, name): W_CType.__init__(self, space, -1, name, len(name))
def __init__(self, space, size, name, name_position, align): W_CType.__init__(self, space, size, name, name_position) self.align = align
def __init__(self, space): W_CType.__init__(self, space, -1, "void", len("void"))