import Common.EdkLogger as EdkLogger\r
import copy\r
from Common.DataType import *\r
+import sys\r
\r
ERR_STRING_EXPR = 'This operator cannot be used in string expression: [%s].'\r
ERR_SNYTAX = 'Syntax error, the rest of expression cannot be evaluated: [%s].'\r
Oprand2 = IntToStr(Oprand2)\r
TypeDict = {\r
type(0) : 0,\r
- type(0L) : 0,\r
+ # For python2 long type\r
+ type(sys.maxsize + 1) : 0,\r
type('') : 1,\r
type(True) : 2\r
}\r
raise BadExpression('Type %s PCD Value Size is Larger than 8 byte' % self.PcdType)\r
else:\r
try:\r
- TmpValue = long(PcdValue)\r
+ TmpValue = int(PcdValue)\r
TmpList = []\r
if TmpValue.bit_length() == 0:\r
PcdValue = '{0x00}'\r