From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16786 invoked by alias); 3 Jun 2013 16:06:19 -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 16758 invoked by uid 89); 3 Jun 2013 16:06:15 -0000 X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 03 Jun 2013 16:06:15 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r53G6CLb021478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 3 Jun 2013 12:06:12 -0400 Received: from barimba (ovpn-113-72.phx2.redhat.com [10.3.113.72]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r53G6ANc004616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 3 Jun 2013 12:06:11 -0400 From: Tom Tromey To: "Ulrich Weigand" Cc: gdb-patches@sourceware.org Subject: Re: Python 2.4 compile failure (Re: [PATCH 24/28] introduce gdb_pymodule_addobject) References: <8761ziy43f.fsf@fleche.redhat.com> <201306031249.r53Cnp4I018753@d06av02.portsmouth.uk.ibm.com> Date: Mon, 03 Jun 2013 16:06:00 -0000 In-Reply-To: <201306031249.r53Cnp4I018753@d06av02.portsmouth.uk.ibm.com> (Ulrich Weigand's message of "Mon, 3 Jun 2013 14:49:51 +0200 (CEST)") Message-ID: <874ndfnpql.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-06/txt/msg00017.txt.bz2 Ulrich> Now I guess 2.4 is quite old, but it is still supported according to Ulrich> GDB documentation (and there are some special cases in the sources) ... Ulrich> Should this be fixed? Yes. Can you please try the appended? Tom diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index 7c7c5ca..bbbdef4 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -436,7 +436,8 @@ gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object) int result; Py_INCREF (object); - result = PyModule_AddObject (module, name, object); + /* Python 2.4 did not have a 'const' here. */ + result = PyModule_AddObject (module, (char *) name, object); if (result < 0) Py_DECREF (object); return result;