Revision: 18256
          http://sourceforge.net/p/edk2/code/18256
Author:   bobfeng
Date:     2015-08-21 01:09:16 +0000 (Fri, 21 Aug 2015)
Log Message:
-----------
BaseTools: Fix build fail when the number in validlist is long type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Bob Feng" <[email protected]>
Reviewed-by: "Chen, Hesheng" <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py

Modified: trunk/edk2/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py       
2015-08-20 08:49:31 UTC (rev 18255)
+++ trunk/edk2/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py       
2015-08-21 01:09:16 UTC (rev 18256)
@@ -31,7 +31,7 @@
                 break
         else:
             self.var_check_info.append(var_check_tab)
-        
+    
     def dump(self, dest, Phase):
         
         FormatMap = {}
@@ -62,7 +62,7 @@
                 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 @@
                 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


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to