def comment(enum, **repeatable): """Return the comment for the enumeration `enum`. If the bool `repeatable` is specified, then return the repeatable comment. """ eid = by(enum) return idaapi.get_enum_cmt(eid, repeatable.get('repeatable', True))
def comment(enum, **repeatable): """Return the comment for the enumeration `enum`. If the bool `repeatable` is specified, then return the repeatable comment. """ eid = by(enum) res = idaapi.get_enum_cmt(eid, repeatable.get('repeatable', True)) return utils.string.of(res)
def handle_enums(delta, segs): for idx in range(idaapi.get_enum_qty()): e = idaapi.getn_enum(idx) for cmt_type in (True, False): cmt = idaapi.get_enum_cmt(e, cmt_type) if cmt: new_cmt = rebase_comment(segs, delta, cmt) if new_cmt: idaapi.set_enum_cmt(e, new_cmt, cmt_type) idaapi.for_all_enum_members(e, enum_memb_visitor(segs, delta))
def repeat(self): return idaapi.get_enum_cmt(self._eid, True)
def regular(self): return idaapi.get_enum_cmt(self._eid, False)
def comment(identifier, comment=None): '''Given an enum id, get/set it's /comment/''' if commment is None: return idaapi.get_enum_cmt(identifier) return idaapi.set_enum_cmt(identifier, comment)
def enum_cmt_changed(self, tid, repeatable_cmt): cmt = idaapi.get_enum_cmt(tid, repeatable_cmt) self._send_event(EnumCmtChangedEvent(tid, cmt, repeatable_cmt)) return 0