def size(identifier, width=None): '''Given an enum id, get/set it's size''' if width is None: res = idaapi.get_enum_width(identifier) return 2**(res-1) if res > 0 else 0 res = int(math.log(width, 2)) return idaapi.set_enum_width(identifier, int(res)+1)
def size(enum): '''Return the number of bytes for the enumeration `enum`.''' eid = by(enum) return idaapi.get_enum_width(eid)
def width(self): """Width of the enum""" return idaapi.get_enum_width(self.eid)
def size(enum): '''Return the number of bits for the enumeration `enum`.''' eid = by(enum) res = idaapi.get_enum_width(eid) return res * 8
def size(enum): '''Return the number of bits for the enumeration ``enum``.''' eid = by(enum) res = idaapi.get_enum_width(eid) return res * 8
def size(enum): '''Return the size of the enumeration identified by ``enum``.''' eid = by(enum) res = idaapi.get_enum_width(eid) return 2**(res - 1) if res > 0 else 0