From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19601 invoked by alias); 16 Sep 2018 01:58:02 -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 19285 invoked by uid 89); 16 Sep 2018 01:57:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:820 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 16 Sep 2018 01:57:57 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id DE5631E16B; Sat, 15 Sep 2018 21:57:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=simark.ca; s=mail; t=1537063076; bh=h7npEnhLKPwyUB/dSrq1mcEH3atrP9kat6In+HiARlw=; h=Subject:From:To:References:Date:In-Reply-To:From; b=u9vcPqgX1HT1U7zv/Oil0vqg+/s5O6HzvO0r1Sp2a+/PRS/OnVxQKbP3u2+5ol9e1 mc0C34iFO2AMaGiKGRb4MAp5NhBof/SuD1w12/ttOhodhQef1wtq0002umO2UHDDUB oB1IqaxqO87bSGRanUzQeWlFeH3QiVvb4/RlIKdY= Subject: Re: [PATCH 1/4] Change pspace_to_pspace_object to return a new reference From: Simon Marchi To: Tom Tromey , gdb-patches@sourceware.org References: <20180913053007.11780-1-tom@tromey.com> <20180913053007.11780-2-tom@tromey.com> Message-ID: Date: Sun, 16 Sep 2018 01:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-09/txt/msg00514.txt.bz2 On 2018-09-15 9:19 p.m., Simon Marchi wrote: > On 2018-09-13 1:30 a.m., Tom Tromey wrote: >> This changes pspace_to_pspace_object to return a new reference and >> fixes up all the callers. > > Actually, I think the patch is missing a hunk or something, I get this error: > > /home/simark/src/binutils-gdb/gdb/python/py-inferior.c:474:13: error: no viable conversion from 'gdbpy_ref<>' (aka 'gdb::ref_ptr<_object, gdbpy_ref_policy<_object> >') to 'PyObject *' (aka '_object *') > PyObject *py_pspace = pspace_to_pspace_object (pspace); > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. Ah ok, this is the code I added recently, that's why. I think changing it to return pspace_to_pspace_object (pspace).release (); should work. Simon