From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=195.135.221.5; helo=smtp.nue.novell.com; envelope-from=glin@suse.com; receiver=edk2-devel@lists.01.org Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 50AA42232BE18 for ; Thu, 18 Jan 2018 20:38:43 -0800 (PST) Received: from localhost.localdomain (unknown.telstraglobal.net [134.159.103.118]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Fri, 19 Jan 2018 05:44:02 +0100 From: Gary Lin To: edk2-devel@lists.01.org Cc: Yonghong Zhu , Liming Gao Date: Fri, 19 Jan 2018 12:43:14 +0800 Message-Id: <20180119044316.4713-14-glin@suse.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180119044316.4713-1-glin@suse.com> References: <20180119044316.4713-1-glin@suse.com> Subject: [PATCH 13/15] BaseTools: Unify long int and int in python scripts X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 04:38:44 -0000 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 Cc: Liming Gao Signed-off-by: Gary Lin --- 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 7663df7160c1..d7714e54d47e 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 } @@ -819,7 +818,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.15.1