From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3576 invoked by alias); 18 May 2012 20:07:11 -0000 Received: (qmail 3568 invoked by uid 22791); 18 May 2012 20:07:10 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 May 2012 20:06:51 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4IK6nYD027043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 May 2012 16:06:50 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4IK6mjp025268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 18 May 2012 16:06:49 -0400 From: Tom Tromey To: Cc: Subject: Re: Will therefore GDB utilize C++ or not? References: <20120330161403.GA17891@host2.jankratochvil.net> <87aa2rjkb8.fsf@fleche.redhat.com> <4F832D5B.9030308@redhat.com> <20120409190519.GA524@host2.jankratochvil.net> <4F833D29.4050102@redhat.com> <20120416065456.GA30097@host2.jankratochvil.net> <4F8ECB72.70708@redhat.com> <20120418151553.GA16768@host2.jankratochvil.net> <4F8EDD7B.2010602@redhat.com> <20120418155354.GA17912@host2.jankratochvil.net> <201204181748.q3IHm1cF002815@new.toad.com> <87pqb4q2on.fsf@fleche.redhat.com> <201204182309.q3IN9FcF019607@new.toad.com> <87k409gwv0.fsf@fleche.redhat.com> <35C0C41D-6D07-4612-B0C5-DB00CFD2F975@dell.com> <87zk95fg8c.fsf@fleche.redhat.com> Date: Fri, 18 May 2012 20:07:00 -0000 In-Reply-To: (Paul Koning's message of "Fri, 18 May 2012 19:44:07 +0000") Message-ID: <877gw9fe3r.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00093.txt.bz2 >>>>> "Paul" == writes: Tom> We'd use RAII to ensure that refcounts were automatically managed Tom> by the C++ compiler. Paul> That would be nice if the Python ABI is compatible with this. It may Paul> not be, or not always. For example, when some calls steal a reference Paul> while others (most of them) don't, and some return a borrowed Paul> reference while others return a new one, it isn't clear how a Paul> mechanical scheme like RAII will give you a full answer. I think you can write wrapper functions which abstract the details. We'd want this anyway so we can turn Python exceptions into C++ exceptions. boost::python basically does all this already, but I've been assuming we'd roll our own. Paul> Maybe if you use only the subset that does reference counting in Paul> the one way you want it done? There would be some performance Paul> impact but probably not much. I think the wrappers would be pretty thin, and there'd be no runtime hit to speak of. Tom