From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24133 invoked by alias); 25 Sep 2009 20:43:24 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 24120 invoked by uid 22791); 25 Sep 2009 20:43:23 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org From: Tom Tromey To: Richard Ward Cc: archer@sourceware.org Subject: Re: Patch to add rtti_type member to gdb.Value References: <4ABA6ADD.4000003@googlemail.com> <4ABD179F.6050006@googlemail.com> Reply-To: Tom Tromey Date: Fri, 25 Sep 2009 20:43:00 -0000 In-Reply-To: <4ABD179F.6050006@googlemail.com> (Richard Ward's message of "Fri, 25 Sep 2009 20:18:55 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2009-q3/txt/msg00255.txt.bz2 >>>>> "Richard" == Richard Ward writes: Richard> I'll look at the other points later when I have time, but In this case Richard> if Py_None is used it will be incremented twice before being handed Richard> back to the caller. Yeah -- once for the store to obj->type, and once for the caller. The caller needs a new reference, always. For obj->type, this lets us call Py_DECREF without checking whether obj->type is None. Tom