From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15723 invoked by alias); 7 Jul 2009 07:32:36 -0000 Received: (qmail 15714 invoked by uid 22791); 7 Jul 2009 07:32:35 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 07:32:25 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n677WNe8028957 for ; Tue, 7 Jul 2009 03:32:23 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n677WM5B015664; Tue, 7 Jul 2009 03:32:22 -0400 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n677WLHk031432; Tue, 7 Jul 2009 03:32:21 -0400 Message-ID: <4A52FA05.9050607@redhat.com> Date: Tue, 07 Jul 2009 07:32:00 -0000 From: Phil Muldoon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [patch] Support counted strings and embedded nulls in value.string References: <4A4A3F27.9060401@redhat.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2009-07/txt/msg00174.txt.bz2 On 07/06/2009 06:36 PM, Tom Tromey wrote: > Phil> /* Obtain a C string from the inferior storing it in a newly allocated > > [...] > > Phil> + buffer in BUFFER, which should be freed by the caller. If LENGTH > Phil> + is specified at -1, the string is read until a null character of > > This should mention *LENGTH, not LENGTH. > I think this comment (and the similar comment in language.h) would be > clearer if it mentioned that LENGTH is both an in- and out-parameter. > > Ok. > Phil> Index: python/python-prettyprint.c > Phil> + /* Apply a pretty-printer for the varobj code. PRINTER_OBJ is the > Phil> + print object. It must have a 'to_string' method (but this is > Phil> + checked by varobj, not here) which takes no arguments and > Phil> + returns a string. The printer will return a value and in the case > Phil> + of a Python string being returned, this function will return a > Phil> + PyObject containing the string. For any other type, *REPLACEMENT is > Phil> + set to the replacement value and this function returns NULL. On > Phil> + error, *REPLACEMENT is set to NULL and this function also returns > Phil> + NULL. */ > > I noticed recently that this entire comment is shifted over by a space. > Could you move it back? > Ok. > The code bits are approved with those two changes. > It still needs a doc review. > I've made the two changes above. Pending Eli's response, I'll check this patch in. Regards Phil