diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-10-10 11:00:31 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-13 09:50:42 +0800 |
commit | 8371d87412bc1dae454dcc570691fc0d63e710b4 (patch) | |
tree | fa1c0a276bfedde65ef3f28d129af4c00d9e2e98 /BaseTools/Source/Python/GenFds/FdfParser.py | |
parent | 261eee25de664dcef2d99b6365b16c9bc444143f (diff) | |
download | edk2-8371d87412bc1dae454dcc570691fc0d63e710b4.tar.gz edk2-8371d87412bc1dae454dcc570691fc0d63e710b4.tar.bz2 edk2-8371d87412bc1dae454dcc570691fc0d63e710b4.zip |
BaseTools: Rename long() to int()
Because the long() function was not exist in Python3.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FdfParser.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index d18b0a3328..cbdc893cdf 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1615,7 +1615,7 @@ class FdfParser: self.SetPcdLocalation(pcdPair)
FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
self.Profile.PcdFileLineDict[pcdPair] = FileLineTuple
- Obj.Size = long(Size, 0)
+ Obj.Size = int(Size, 0)
return True
if self.__IsKeyword( "ErasePolarity"):
@@ -1651,7 +1651,7 @@ class FdfParser: if not self.__GetNextDecimalNumber() and not self.__GetNextHexNumber():
raise Warning("expected address", self.FileName, self.CurrentLineNumber)
- BsAddress = long(self.__Token, 0)
+ BsAddress = int(self.__Token, 0)
Obj.BsBaseAddress = BsAddress
if self.__IsKeyword("RtBaseAddress"):
@@ -1661,7 +1661,7 @@ class FdfParser: if not self.__GetNextDecimalNumber() and not self.__GetNextHexNumber():
raise Warning("expected address", self.FileName, self.CurrentLineNumber)
- RtAddress = long(self.__Token, 0)
+ RtAddress = int(self.__Token, 0)
Obj.RtBaseAddress = RtAddress
## __GetBlockStatements() method
@@ -1709,7 +1709,7 @@ class FdfParser: self.SetPcdLocalation(PcdPair)
FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
self.Profile.PcdFileLineDict[PcdPair] = FileLineTuple
- BlockSize = long(BlockSize, 0)
+ BlockSize = int(BlockSize, 0)
BlockNumber = None
if self.__IsKeyword( "NumBlocks"):
@@ -1719,7 +1719,7 @@ class FdfParser: if not self.__GetNextDecimalNumber() and not self.__GetNextHexNumber():
raise Warning("expected block numbers", self.FileName, self.CurrentLineNumber)
- BlockNumber = long(self.__Token, 0)
+ BlockNumber = int(self.__Token, 0)
Obj.BlockSizeList.append((BlockSize, BlockNumber, BlockSizePcd))
return True
@@ -1828,7 +1828,7 @@ class FdfParser: Expr += CurCh
self.__GetOneChar()
try:
- return long(
+ return int(
ValueExpression(Expr,
self.__CollectMacroPcd()
)(True), 0)
@@ -1876,7 +1876,7 @@ class FdfParser: RegionOffsetPcdPattern.match(self.__CurrentLine()[self.CurrentOffsetWithinLine:]))
if IsRegionPcd:
RegionObj.PcdOffset = self.__GetNextPcdSettings()
- self.Profile.PcdDict[RegionObj.PcdOffset] = "0x%08X" % (RegionObj.Offset + long(Fd.BaseAddress, 0))
+ self.Profile.PcdDict[RegionObj.PcdOffset] = "0x%08X" % (RegionObj.Offset + int(Fd.BaseAddress, 0))
self.SetPcdLocalation(RegionObj.PcdOffset)
self.__PcdDict['%s.%s' % (RegionObj.PcdOffset[1], RegionObj.PcdOffset[0])] = "0x%x" % RegionObj.Offset
FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
@@ -3231,9 +3231,9 @@ class FdfParser: if FdfParser.__Verify(Name, Value, 'UINT64'):
FmpData.MonotonicCount = Value
if FmpData.MonotonicCount.upper().startswith('0X'):
- FmpData.MonotonicCount = (long)(FmpData.MonotonicCount, 16)
+ FmpData.MonotonicCount = (int)(FmpData.MonotonicCount, 16)
else:
- FmpData.MonotonicCount = (long)(FmpData.MonotonicCount)
+ FmpData.MonotonicCount = (int)(FmpData.MonotonicCount)
if not self.__GetNextToken():
break
else:
|