Python3 - Change sys.maxint to sys.maxsize.

Python3 has no analogue to sys.maxint since ints in Python 3 have
arbitrary size.  However, the distinction was not actually important
in any of these cases, and in a few cases using maxint was already
a bug to begin with.

llvm-svn: 251306
This commit is contained in:
Zachary Turner
2015-10-26 16:51:20 +00:00
parent f67f7e31e7
commit da3dea6122
4 changed files with 7 additions and 7 deletions

View File

@@ -421,7 +421,7 @@ class Window(object):
self.timeout(timeout_msec)
return c
def key_event_loop(self, timeout_msec=-1, n=sys.maxint):
def key_event_loop(self, timeout_msec=-1, n=sys.maxsize):
'''Run an event loop to receive key presses and pass them along to the
responder chain.
@@ -974,7 +974,7 @@ class MenuBar(Panel):
self.add_key_action(curses.KEY_ENTER, self.perform_action, "Select the next menu item")
self.add_key_action(10, self.perform_action, "Select the next menu item")
def insert_menu(self, menu, index=sys.maxint):
def insert_menu(self, menu, index=sys.maxsize):
if index >= len(self.menus):
self.menus.append(menu)
else:

View File

@@ -9,7 +9,7 @@ def fuzz_obj(obj):
obj.GetFileAddress()
obj.GetLoadAddress(lldb.SBTarget())
obj.SetLoadAddress(0xffff, lldb.SBTarget())
obj.OffsetAddress(sys.maxint)
obj.OffsetAddress(sys.maxsize)
obj.GetDescription(lldb.SBStream())
obj.GetSection()
obj.GetSymbolContext(lldb.eSymbolContextEverything)

View File

@@ -8,8 +8,8 @@ import lldb
def fuzz_obj(obj):
obj.GetID()
obj.ClearAllBreakpointSites()
obj.FindLocationByAddress(sys.maxint)
obj.FindLocationIDByAddress(sys.maxint)
obj.FindLocationByAddress(sys.maxsize)
obj.FindLocationIDByAddress(sys.maxsize)
obj.FindLocationByID(0)
obj.GetLocationAtIndex(0)
obj.SetEnabled(True)

View File

@@ -10,11 +10,11 @@ def fuzz_obj(obj):
obj.GetPlatformFileSpec()
obj.SetPlatformFileSpec(lldb.SBFileSpec())
obj.GetUUIDString()
obj.ResolveFileAddress(sys.maxint)
obj.ResolveFileAddress(sys.maxsize)
obj.ResolveSymbolContextForAddress(lldb.SBAddress(), 0)
obj.GetDescription(lldb.SBStream())
obj.GetNumSymbols()
obj.GetSymbolAtIndex(sys.maxint)
obj.GetSymbolAtIndex(sys.maxsize)
sc_list = obj.FindFunctions("my_func")
sc_list = obj.FindFunctions("my_func", lldb.eFunctionNameTypeAny)
obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1)