diff options
author | Bob Feng <bob.c.feng@intel.com> | 2015-08-21 01:09:16 +0000 |
---|---|---|
committer | bobfeng <bobfeng@Edk2> | 2015-08-21 01:09:16 +0000 |
commit | 072418e553507a7e80e1b94acc3ebcd7b96a9446 (patch) | |
tree | a22fba6a17c4d53bc5b9e0af07b9929548f19c46 | |
parent | 9e8841b4f86a933b6aa1ce27babe2483e2ca208f (diff) | |
download | edk2-platforms-072418e553507a7e80e1b94acc3ebcd7b96a9446.tar.xz |
BaseTools: Fix build fail when the number in validlist is long type.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Bob Feng" <bob.c.feng@intel.com>
Reviewed-by: "Chen, Hesheng" <hesheng.chen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18256 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py index 4a6e031053..92ede7a823 100644 --- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py +++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py @@ -31,7 +31,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): break
else:
self.var_check_info.append(var_check_tab)
-
+
def dump(self, dest, Phase):
FormatMap = {}
@@ -62,7 +62,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): itemIndex += 1
realLength += 5
for v_data in item.data:
- if type(v_data) == type(1):
+ if type(v_data) in (int, long):
realLength += item.StorageWidth
else:
realLength += item.StorageWidth
@@ -153,9 +153,8 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): b = pack("=B", item.StorageWidth)
Buffer += b
realLength += 1
-
for v_data in item.data:
- if type(v_data) == type(1):
+ if type(v_data) in (int, long):
b = pack(FormatMap[item.StorageWidth], v_data)
Buffer += b
realLength += item.StorageWidth
|