From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32741 invoked by alias); 25 Sep 2014 15:18:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32644 invoked by uid 89); 25 Sep 2014 15:18:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausxipps310.us.dell.com Received: from AUSXIPPS310.us.dell.com (HELO ausxipps310.us.dell.com) (143.166.148.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 25 Sep 2014 15:18:48 +0000 X-LoopCount0: from 10.170.28.39 From: To: CC: , Subject: Re: Why do functions objfpy_new and pspy_new exist? Date: Thu, 25 Sep 2014 15:18:00 -0000 Message-ID: References: <5423E9C7.3060202@redhat.com> In-Reply-To: <5423E9C7.3060202@redhat.com> Content-Type: text/plain; charset="iso-8859-1" Content-ID: <3DCD442E96E4D74F93F169EF585273B9@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00738.txt.bz2 On Sep 25, 2014, at 6:09 AM, Phil Muldoon wrote: > On 24/09/14 22:38, Doug Evans wrote: >> Hi. >>=20 >> Normally, python wrappers of gdb objects are created with a >> foo_to_foo_object function. >> E.g., objfile_to_objfile_object and pspace_to_pspace_object. >>=20 >> So why do objfpy_new and pspy_new exist? >> [defined in py-objfile.c and py-progspace.c respectively] >>=20 >> IOW, when would one ever usefully do something with >> foo_objfile =3D gdb.Objfile() >> or >> foo_pspace =3D gdb.Progspace() >=20 > I can't think of a reason. But someone else might. Anyway the point > is moot (unfortunately) as we have an API promise, so they get to > stay. Forever. I would usually agree, but I would make an exception if the API function in= question does not produce anything that can be used for any plausible purp= ose. That may be the case here. paul