mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
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:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user