From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19301 invoked by alias); 19 Oct 2008 23:43:27 -0000 Received: (qmail 19287 invoked by uid 22791); 19 Oct 2008 23:43:27 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 19 Oct 2008 23:42:52 +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 m9JNekra024726; Sun, 19 Oct 2008 19:40:46 -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 m9JNejj4009944; Sun, 19 Oct 2008 19:40:45 -0400 Received: from opsy.redhat.com (vpn-12-33.rdu.redhat.com [10.11.12.33]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9JNeiDT009261; Sun, 19 Oct 2008 19:40:44 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 1F45E378721; Sun, 19 Oct 2008 17:40:40 -0600 (MDT) To: Pedro Alves Cc: "Paul Pluzhnikov" , gdb-patches@sourceware.org, archer@sourceware.org Subject: Re: Make GDB build with python 2.4 again. References: <200810192118.18369.pedro@codesourcery.com> <8ac60eac0810191546x2a69de5bw7ed413b298b6fb55@mail.gmail.com> <200810200017.19414.pedro@codesourcery.com> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Sun, 19 Oct 2008 23:43:00 -0000 In-Reply-To: <200810200017.19414.pedro@codesourcery.com> (Pedro Alves's message of "Mon\, 20 Oct 2008 00\:17\:18 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-10/txt/msg00475.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: >> Meanwhile, on 'archer-tromey-python': Pedro> Sorry, but if you know something is broken in code that's in the FSF Pedro> tree, you should post a patch there. You can't expect me to track what's Pedro> going on the archer branches. That seems reasonable. In this case, I didn't consider that the patch might be useful upstream, or I would have asked Paul to send it upstream. Sorry about that. >> Note that in current gdb/python sources, additional changes >> are required for python2.4 if Py_ssize_t isn't fixed as above ... Pedro> That looks strange, since ssize_t isn't usually the same size Pedro> of int. My belief is that Py_ssize_t is a 2.5 introduction, and places using Py_ssize_t used to use int. That is why the patch was written the way it was. >> > 2008-10-19 Pedro Alves >> > >> > * python/python-value.c (value_object_methods) >> > (value_object_as_number, value_object_as_mapping): Move to bottom >> > of file. Paul> Why? Pedro> To avoid all the forward references, so that we don't have to change Pedro> two places whenever an interface changes, or things like these happen. This is an issue -- a minor one -- for three reasons. First, in general, it is better to commit code rearrangements and bug fixes as separate patches. Second, in this particular instance, this code is actively being worked on separately and being merged in. Changes to the trunk mean back-porting the changes and redoing the patch branch -- adding work for, IMO, little gain. This is related to the first point in that this patch has to be edited before backporting. Finally, there is nothing to say that the preferred gdb style is to avoid forward declarations. So, we picked a style we liked -- not unintentionally, at least on my part, but because I like having the "class definition" at the top, followed by method implementations, followed by the initialization code. All the python code follows this outline. I'll look at moving this change to the python branch tomorrow (unless someone gets there first). If you want all the forward declarations removed from the python code, please let me know, and I'll implement that on the branch as well. Tom