aboutsummaryrefslogtreecommitdiff
path: root/test/Scripts
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-10-29 01:14:16 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-10-29 01:14:16 +0000
commitb087c8490f6ad46c44825ccb08481c96a45b15ad (patch)
tree93c93a3750ed0d88e38e6bdbb07a81551a37c9f6 /test/Scripts
parentcd5c123a1d8723dbd5d493210c0a56890bffe409 (diff)
test/Scripts/macho-dump: Make hack for Python-2.4. [PR7995]
With Python-2.4, Reader::read64 always returns (unexpected) long integer. FileCheck detects failure on test/MC/MachO among '0' and '0L'. CentOS5(aka RHEL5 clone) provides python-2.4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Scripts')
-rwxr-xr-xtest/Scripts/macho-dump5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Scripts/macho-dump b/test/Scripts/macho-dump
index afef2ba504..8c9fa59c60 100755
--- a/test/Scripts/macho-dump
+++ b/test/Scripts/macho-dump
@@ -43,7 +43,10 @@ class Reader:
return int(Value)
def read64(self):
- return struct.unpack('><'[self.isLSB] + 'Q', self.read(8))[0]
+ Value = struct.unpack('><'[self.isLSB] + 'Q', self.read(8))[0]
+ if Value == int(Value):
+ Value = int(Value)
+ return Value
def registerStringTable(self, strings):
if self.string_table is not None: