mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-28 18:51:53 +01:00
has_key() is slowly getting deprecated. Might make sense to stop using it.
This commit is contained in:
parent
bbf6b2e547
commit
9d3fb35f87
4
build.py
4
build.py
@ -22,8 +22,8 @@ from distutils import sysconfig
|
||||
# Start of user configurable options
|
||||
VERBOSE = True
|
||||
IDA_MAJOR_VERSION = 5
|
||||
IDA_MINOR_VERSION = 4
|
||||
if os.environ.has_key('IDA'):
|
||||
IDA_MINOR_VERSION = 5
|
||||
if 'IDA' in os.environ:
|
||||
IDA_SDK = os.environ['IDA']
|
||||
else:
|
||||
IDA_SDK = ".." + os.sep + "swigsdk-versions" + os.sep + "%d.%d" % (IDA_MAJOR_VERSION, IDA_MINOR_VERSION)
|
||||
|
@ -1471,7 +1471,7 @@ def SetRegEx(ea, reg, value, tag):
|
||||
|
||||
See also SetReg() compatibility macro.
|
||||
"""
|
||||
if _REGMAP.has_key(reg):
|
||||
if reg in _REGMAP:
|
||||
return idaapi.splitSRarea1(ea, _REGMAP[reg], value, tag)
|
||||
else:
|
||||
return False
|
||||
@ -1889,7 +1889,7 @@ def GetReg(ea, reg):
|
||||
so to get paragraph pointed by the segment register you need to
|
||||
call AskSelector() function.
|
||||
"""
|
||||
if _REGMAP.has_key(reg):
|
||||
if reg in _REGMAP:
|
||||
return idaapi.getSR(ea, _REGMAP[reg]) & 0xFFFF
|
||||
else:
|
||||
return False
|
||||
@ -3340,7 +3340,7 @@ def SetSegDefReg(ea, reg, value):
|
||||
"""
|
||||
seg = idaapi.getseg(ea)
|
||||
|
||||
if seg and _REGMAP.has_key(reg):
|
||||
if seg and reg in _REGMAP:
|
||||
return idaapi.SetDefaultRegisterValue(seg, _REGMAP[reg], value)
|
||||
else:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user