From 2edeeae88be12a9af5f5492091a214899ae83dd6 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Sat, 17 Oct 2009 20:43:09 +0000 Subject: [PATCH] idautils.py: Classes are all newskool. Fixed a pylint warning. --- python/idautils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python/idautils.py b/python/idautils.py index 288507e..a0cacd1 100644 --- a/python/idautils.py +++ b/python/idautils.py @@ -125,7 +125,7 @@ def XrefTypeName(typecode): def _copy_xref(xref): """ Make a private copy of the xref class to preserve its contents """ - class _xref: + class _xref(object): pass xr = _xref() @@ -300,7 +300,7 @@ def DecodeInstruction(ea): insn = idaapi.get_current_instruction() if not insn: return None - class dup: + class dup(object): def __init__(self, op): for x in dir(op): if x.startswith("__") and x.endswith("__"): @@ -359,7 +359,7 @@ def GetInputFileMD5(): return idc.GetInputMD5() -class _cpu: +class _cpu(object): "Simple wrapper around GetRegValue/SetRegValue" def __getattr__(self, name): #print "cpu.get(%s)"%name @@ -369,7 +369,7 @@ class _cpu: #print "cpu.set(%s)"%name return idc.SetRegValue(value, name) -class Strings: +class Strings(object): """ Returns the string list. @@ -380,7 +380,7 @@ class Strings: print "%x: len=%d type=%d -> '%s'" % (i.ea, i.length, i.type, str(i)) """ - class StringItem: + class StringItem(object): """ Class representing each string item. The attributes are: @@ -411,6 +411,7 @@ class Strings: if default_setup: self.setup() self._si = idaapi.string_info_t() + self.size = 0 def refresh(self, ea1=idaapi.cvar.inf.minEA, ea2=idaapi.cvar.inf.maxEA): """Refreshes the strings list"""