def set_enum(name): if (idaapi.get_enum(str(name)) != idaapi.BADADDR): idaapi.del_enum(idaapi.get_enum(str(name))) ok = idc.add_enum(-1, str(name), 1) if not ok: print("Could not add enum {name}".format(name=name))
def delete(enum): '''Delete the enumeration `enum`.''' eid = by(enum) return idaapi.del_enum(eid)
def remove_enum(name): """Delete an enum by name.""" eid = _get_enum(name) idaapi.del_enum(eid)
def _delete(identifier): return idaapi.del_enum(identifier)
def delete(id): return idaapi.del_enum(id)