Discussion:
[edk2] [PATCH] BaseTools: Fix build fail when the number in validlist is long type.
BobCF
2015-08-19 02:58:59 UTC
Permalink
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bob Feng <***@intel.com>
Cc: Chen, Hesheng <***@intel.com>
---
Source/Python/AutoGen/ValidCheckingInfoObject.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Python/AutoGen/ValidCheckingInfoObject.py b/Source/Python/AutoGen/ValidCheckingInfoObject.py
index 4a6e031..08c0800 100644
--- a/Source/Python/AutoGen/ValidCheckingInfoObject.py
+++ b/Source/Python/AutoGen/ValidCheckingInfoObject.py
@@ -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
@@ -155,7 +155,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
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
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Chen, Hesheng
2015-08-21 00:31:20 UTC
Permalink
Reviewed-by Hess Chen <***@intel.com>

Chen, Hess
Intel China Software Center
Tel: +86-21-6116-6740
Email: ***@intel.com

-----Original Message-----
From: Feng, Bob C
Sent: Wednesday, August 19, 2015 10:59 AM
To: edk2-***@lists.sourceforge.net
Cc: Feng, Bob C; Chen, Hesheng
Subject: [PATCH] BaseTools: Fix build fail when the number in validlist is long type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bob Feng <***@intel.com>
Cc: Chen, Hesheng <***@intel.com>
---
Source/Python/AutoGen/ValidCheckingInfoObject.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Python/AutoGen/ValidCheckingInfoObject.py b/Source/Python/AutoGen/ValidCheckingInfoObject.py
index 4a6e031..08c0800 100644
--- a/Source/Python/AutoGen/ValidCheckingInfoObject.py
+++ b/Source/Python/AutoGen/ValidCheckingInfoObject.py
@@ -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 @@ -155,7 +155,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
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
--
1.9.5.msysgit.0


------------------------------------------------------------------------------
Loading...