BaseTools: replace long by int

replace long by int
Because the long() was not exist in Python3

Cc: Bob Feng <bob.c.feng@intel.com>
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>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Yunhua Feng
2018-12-03 10:29:40 +08:00
committed by Feng, Bob C
parent 1d2aa01cdf
commit af881abc65
8 changed files with 27 additions and 27 deletions

View File

@ -620,11 +620,11 @@ class _DecPcd(_DecBase):
if not IsValidToken(PCD_TOKEN_PATTERN, Token):
self._LoggerError(ST.ERR_DECPARSE_PCD_TOKEN % Token)
elif not Token.startswith('0x') and not Token.startswith('0X'):
if long(Token) > 4294967295:
if int(Token) > 4294967295:
self._LoggerError(ST.ERR_DECPARSE_PCD_TOKEN_INT % Token)
Token = hex(long(Token))[:-1]
Token = hex(int(Token))[:-1]
IntToken = long(Token, 0)
IntToken = int(Token, 0)
if (Guid, IntToken) in self.TokenMap:
if self.TokenMap[Guid, IntToken] != CName:
self._LoggerError(ST.ERR_DECPARSE_PCD_TOKEN_UNIQUE%(Token))