def name(id, string, *suffix): '''Set the name of the structure identified by ``id`` to ``string``.''' res = (string, ) + suffix string = interface.tuplename(*res) res = idaapi.validate_name2(buffer(string)[:]) if string and string != res: logging.warn( "{:s}.name : Stripping invalid chars from structure name \"{:s}\". : {!r}" .format(__name__, string, res)) string = res return idaapi.set_struc_name(id, string)
def name(self, string): '''Set the name for the structure to ``string``.''' if isinstance(string, tuple): string = interface.tuplename(*string) res = idaapi.validate_name2(buffer(string)[:]) if string and string != res: logging.warn( "{:s}.name : Stripping invalid chars from structure name {!r}. : {!r}" .format('.'.join((__name__, self.__class__.__name__)), string, res)) string = res return idaapi.set_struc_name(self.id, string)
def name(self, name): return idaapi.set_struc_name(self.id, name)
def __call__(self): idaapi.set_struc_name(self.sid, self.new_name.encode('utf-8'))
def name(id, name=None): """set/get the name of a particular structure""" if name is None: return idaapi.get_struc_name(id) return idaapi.set_struc_name(id, name)
def __call__(self): idaapi.set_struc_name(self.sid, self.new_name)
def __call__(self): idaapi.set_struc_name(idc.get_struc_id(self.oldname.encode('utf-8')), self.newname.encode('utf-8'))