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 <[email protected]> Cc: Liming Gao <[email protected]> Signed-off-by: Gary Lin <[email protected]> --- BaseTools/Source/Python/Common/Expression.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 90ef92a14f41..af5baeb2f5e1 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -179,7 +179,6 @@ class ValueExpression(object): Oprand2 = IntToStr(Oprand2) TypeDict = { type(0) : 0, - type(0L) : 0, type('') : 1, type(True) : 2 } @@ -795,7 +794,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}' @@ -825,7 +824,7 @@ class ValueExpressionEx(ValueExpression): else: ListItem = PcdValue.split(',') - if type(ListItem) == type(0) or type(ListItem) == type(0L): + if type(ListItem) == type(0): for Index in range(0, Size): ValueStr += '0x%02X' % (int(ListItem) & 255) ListItem >>= 8 -- 2.16.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

