From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH] tools: remove unused wrappers for python Date: Tue, 6 Oct 2015 13:33:54 +0200 Message-ID: <5613B1A2.2030800@suse.com> References: <1444128368-31585-1-git-send-email-jgross@suse.com> <20151006111849.GW29124@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151006111849.GW29124@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, Andrew Cooper , ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, zhigang.x.wang@oracle.com List-Id: xen-devel@lists.xenproject.org On 10/06/2015 01:18 PM, Wei Liu wrote: > On Tue, Oct 06, 2015 at 12:46:08PM +0200, Juergen Gross wrote: >> Remove lots of functions in tools/python/xen/lowlevel/xc/xc.c as they >> are not used anywhere in the tree. In fact only one function is still >> being used from pygrub, namely "xeninfo". All other users seem to have >> gone with nuking xm/xend. >> >> Signed-off-by: Juergen Gross > > Andrew said the python module is useful for debugging purpose. There are > out-of-tree users as well. > > I'm not too fussed about either keeping these functions or removing > them. But I would like to leave some time for other people to object. > > Do these dead functions affect the work you are doing? I stumbled over them when looking to make some domain builder data private to the domain type (here: superpages). In general I don't like those wrappers very much, as they are not very maintainable. It's rather easy to miss incrementing a python reference or to mess up the parameter types and names when calling PyArg_ParseTupleAndKeywords() (you have to match the kwd_list, the types of the parameters and the parameters themselves by hand). BTW: I've been told it's possible to use any shared library from Python, so there should be no need for a wrapper like this just for debugging purposes. Juergen