From patchwork Thu Feb 23 10:48:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 9588147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D133604A2 for ; Thu, 23 Feb 2017 10:51:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38C2028609 for ; Thu, 23 Feb 2017 10:51:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C2C4286F7; Thu, 23 Feb 2017 10:51:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E95AB28609 for ; Thu, 23 Feb 2017 10:51:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgqxC-0005qK-CA; Thu, 23 Feb 2017 10:48:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgqxA-0005pm-LS for xen-devel@lists.xen.org; Thu, 23 Feb 2017 10:48:52 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 41/F3-25657-31EBEA85; Thu, 23 Feb 2017 10:48:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOIsWRWlGSWpSXmKPExsXilM8ioyu8b12 EwfUH0hZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bU7XfZCw4IVTy4uIClgfEbTxcjF4eQwCpG iWsnjzB2MXICOdkSu2deZQJJsAhcYpa40z6TBSQhIeApcezSC1YI21niU/sCVojuQ4wSy969Z AJJsAmESrRvnwFWJCIgLXHt82VGkCJmgbmMEp//bWMHSQgLWEtcebKJDcRmEVCVmLziKthqXg F/ibtbZzBBbJCTuHmukxnE5hQIkHjZ18YKcZ6/xMSps6DqBSVOznwCdB0H0AJ1ifXzhEDC/AJ KEtvWXwYrYRaQl2jeOpt5AqPwLCQdsxA6ZiGpWsDIvIpRozi1qCy1SNfYQC+pKDM9oyQ3MTNH 19DAWC83tbg4MT01JzGpWC85P3cTIzDQ6xkYGHcwdp7wO8QoycGkJMrrs2ddhBBfUn5KZUZic UZ8UWlOavEhRhkODiUJ3qcgOcGi1PTUirTMHGDMwaQlOHiURHh7QdK8xQWJucWZ6RCpU4y6HH Nm737DJMSSl5+XKiXO+xWkSACkKKM0D24ELP4vMcpKCfMyMjAwCPEUpBblZpagyr9iFOdgVBL mnQUyhSczrwRu0yugI5iAjrB0XgtyREkiQkqqgTErmvXSBYu80j+CBlYtN3Xd1rlZ2Ez5tGvh 8x3OjxX9nrz7cPX++5Stbr7cJ1yYGad39jkGcXyVFo25NPNCxt38H5cfCt2Wqlv0IcDG4kbs+ rvhl25tdN77Ygv3B5PlbyoCfPdxJ+55ufjNo215fgz2erxhrzwS/ea9srmw4uervfKLdrz9za OlxFKckWioxVxUnAgAwO84mPoCAAA= X-Env-Sender: marmarek@invisiblethingslab.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1487846930!83019903!1 X-Originating-IP: [66.111.4.28] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9475 invoked from network); 23 Feb 2017 10:48:51 -0000 Received: from out4-smtp.messagingengine.com (HELO out4-smtp.messagingengine.com) (66.111.4.28) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 23 Feb 2017 10:48:51 -0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5950420AF9; Thu, 23 Feb 2017 05:48:50 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Thu, 23 Feb 2017 05:48:50 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=VE6/TEPrLl+bG6FmQGzApaPvKXY=; b=koqCLRIek6TUFl55ah6c 0/5gmmK3CrWrI46rRW+Ug8R87INLZIcvssCBeevTxIJhMYUWb/eDwbxySGmDtqbZ G7pe2nxVRkt4qerITE1QcxVgkQs4pErTWBPi1FtTKoMM1+UHuddN0vOYh/zeI/t1 u7Bg4GKU6jHMJiHPdb0udeQ= X-ME-Sender: X-Sasl-enc: 6lr3iRoAfQ2aNUd9yTp0q3fuWpNBJHZt4J99o9IilHpJ 1487846929 Received: from devel-3rdparty.localdomain (89-70-103-23.dynamic.chello.pl [89.70.103.23]) by mail.messagingengine.com (Postfix) with ESMTPA id 659EA24357; Thu, 23 Feb 2017 05:48:49 -0500 (EST) From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xen.org Date: Thu, 23 Feb 2017 11:48:22 +0100 Message-Id: <1487846908-21462-3-git-send-email-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487846908-21462-1-git-send-email-marmarek@invisiblethingslab.com> References: <1487846908-21462-1-git-send-email-marmarek@invisiblethingslab.com> MIME-Version: 1.0 Organization: Invisible Things Lab Cc: Wei Liu , Ian Jackson , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Subject: [Xen-devel] [PATCH 2/8] python: drop tp_getattr implementation X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP tp_getattr method of type object is deprecated already in Python2 and gone in Python3. Default implementation does the same as this custom one. Signed-off-by: Marek Marczykowski-Górecki --- tools/python/xen/lowlevel/xc/xc.c | 7 +------ tools/python/xen/lowlevel/xs/xs.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 7fbead5..109ef57 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -2640,11 +2640,6 @@ static PyMethodDef pyxc_methods[] = { }; -static PyObject *PyXc_getattr(PyObject *obj, char *name) -{ - return Py_FindMethod(pyxc_methods, obj, name); -} - static PyObject *PyXc_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { XcObject *self = (XcObject *)type->tp_alloc(type, 0); @@ -2686,7 +2681,7 @@ static PyTypeObject PyXcType = { 0, (destructor)PyXc_dealloc, /* tp_dealloc */ NULL, /* tp_print */ - PyXc_getattr, /* tp_getattr */ + NULL, /* tp_getattr */ NULL, /* tp_setattr */ NULL, /* tp_compare */ NULL, /* tp_repr */ diff --git a/tools/python/xen/lowlevel/xs/xs.c b/tools/python/xen/lowlevel/xs/xs.c index 5772f4b..e9eef73 100644 --- a/tools/python/xen/lowlevel/xs/xs.c +++ b/tools/python/xen/lowlevel/xs/xs.c @@ -870,11 +870,6 @@ static PyMethodDef xshandle_methods[] = { { NULL /* Sentinel. */ }, }; -static PyObject *xshandle_getattr(PyObject *self, char *name) -{ - return Py_FindMethod(xshandle_methods, self, name); -} - static PyObject * xshandle_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { @@ -938,7 +933,7 @@ static PyTypeObject xshandle_type = { 0, (destructor)xshandle_dealloc, /* tp_dealloc */ NULL, /* tp_print */ - xshandle_getattr, /* tp_getattr */ + NULL, /* tp_getattr */ NULL, /* tp_setattr */ NULL, /* tp_compare */ NULL, /* tp_repr */