def store(self, obj, dest_ea=None, base_ea=0, flags=0): """ Packs an object into a given ea if provided or into a string if no address was passed. @param obj: The object to pack @param dest_ea: If packing to idb this will be the store location @param base_ea: If packing to a buffer, this will be the base that will be used to relocate the pointers @return: - If packing to a string then a Tuple(Boolean, packed_string or error code) - If packing to the database then a return code is returned (0 is success) """ # no ea passed? thus pack to a string if dest_ea is None: return _ida_typeinf.pack_object_to_bv(obj, None, self.type, self.fields, base_ea, flags) else: return _ida_typeinf.pack_object_to_idb(obj, None, self.type, self.fields, dest_ea, flags)
def store(self, obj, dest_ea=None, base_ea=0, flags=0): """ Packs an object into a given ea if provided or into a string if no address was passed. @param obj: The object to pack @param dest_ea: If packing to idb this will be the store location @param base_ea: If packing to a buffer, this will be the base that will be used to relocate the pointers @return: - If packing to a string then a Tuple(Boolean, packed_string or error code) - If packing to the database then a return code is returned (0 is success) """ # no ea passed? thus pack to a string if dest_ea is None: return _ida_typeinf.pack_object_to_bv(obj, None, self.type, self.fields, base_ea, flags) else: return _ida_typeinf.pack_object_to_idb(obj, None, self.type, self.fields, dest_ea, flags)