[edk2] [PATCH v3 13/20] BaseTools: Unify long int and int in python scripts

Gary Lin posted 20 patches 7 years, 2 months ago
There is a newer version of this series
[edk2] [PATCH v3 13/20] BaseTools: Unify long int and int in python scripts
Posted by Gary Lin 7 years, 2 months ago
According to PEP237, long int and int are unified.
https://www.python.org/dev/peps/pep-0237/

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
---
 BaseTools/Source/Python/Common/Expression.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 5f24789f6c05..5ee9802c4fe9 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -255,7 +255,6 @@ class ValueExpression(BaseExpression):
                 Oprand2 = IntToStr(Oprand2)
         TypeDict = {
             type(0)  : 0,
-            type(0L) : 0,
             type('') : 1,
             type(True) : 2
         }
@@ -893,7 +892,7 @@ class ValueExpressionEx(ValueExpression):
                     raise BadExpression('Type %s PCD Value Size is Larger than 8 byte' % self.PcdType)
             else:
                 try:
-                    TmpValue = long(PcdValue)
+                    TmpValue = int(PcdValue)
                     TmpList = []
                     if TmpValue.bit_length() == 0:
                         PcdValue = '{0x00}'
-- 
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel