From patchwork Sun Mar 16 14:08:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 101 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (caibbdcaabja.dreamhost.com [208.113.200.190]) by wilcox.dreamhost.com (Postfix) with ESMTP id 9DA663601C7 for ; Sun, 16 Mar 2014 07:08:40 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14314964) id 4AB76638A4AD8; Sun, 16 Mar 2014 07:08:40 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 2DFA4638A4A7F for ; Sun, 16 Mar 2014 07:08:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:to:date:from:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=ETC swKHeBR4MoyqCl36c46LtrLzc4O0CFxZ2FSlBfR4J/wJ35OQ3rde+Z0uMWNML4nh LBAGRpfbcYgHxFsnEeB1XgIrhYAZvdIHnq0kzxzhyMg+zTKJq/atT57L24Ew+gHa PG0OHo/EUjQ8rLS+POO1ofarrbMbnWk/kDhwHeas= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:subject:to:date:from:mime-version :content-type:content-transfer-encoding; s=default; bh=xs8TW1XQw bWHnSkDllu7MRp/qao=; b=Hn3GftpG/wLaBBQq5SHsyGvs+G0zjZTLmMJL1krEy o0x5BB33ynwtBtsAJe5V8wbTFpsyxQO69rx5VxneDhJKO8k+kGbgKuHi5F8wIOzu cf99V+gnLCi/HuaPblqNJEF7rC0EfxnL2z5xdD5yglhgejPOHdC2W30wHYrphAbZ MU= Received: (qmail 9159 invoked by alias); 16 Mar 2014 14:08:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 9145 invoked by uid 89); 16 Mar 2014 14:08:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, MSGID_FROM_MTA_HEADER, SPF_SOFTFAIL, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e38.co.us.ibm.com Received: from e38.co.us.ibm.com (HELO e38.co.us.ibm.com) (32.97.110.159) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 16 Mar 2014 14:08:37 +0000 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 16 Mar 2014 08:08:35 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 16 Mar 2014 08:08:34 -0600 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id E8CA519D8036 for ; Sun, 16 Mar 2014 08:08:30 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08027.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2GE82q9262412 for ; Sun, 16 Mar 2014 15:08:02 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2GE8XWH026162 for ; Sun, 16 Mar 2014 08:08:33 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s2GE8VaK026095 for ; Sun, 16 Mar 2014 08:08:32 -0600 Message-Id: <201403161408.s2GE8VaK026095@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sun, 16 Mar 2014 15:08:31 +0100 Subject: [commit] Fix Python 2.4 build break To: gdb-patches@sourceware.org Date: Sun, 16 Mar 2014 15:08:31 +0100 (CET) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14031614-1344-0000-0000-0000004EEC8B X-DH-Original-To: gdb@patchwork.siddhesh.in Hello, this fixes a build failure against Python 2.4 by casting away "const" on the second argument to PyObject_GetAttrString. Similar casts to support Python 2.4 were already present in a number of other places. Pushed to mainline. Bye, Ulrich gdb/ 2014-03-16 Ulrich Weigand * python/py-value.c (get_field_flag): Cast flag_name argument to PyObject_GetAttrString to support Python 2.4. diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 75aa642..a118f6c 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -551,7 +551,8 @@ static int get_field_flag (PyObject *field, const char *flag_name) { int flag_value; - PyObject *flag_object = PyObject_GetAttrString (field, flag_name); + /* Python 2.4 did not have a 'const' here. */ + PyObject *flag_object = PyObject_GetAttrString (field, (char *) flag_name); if (flag_object == NULL) return -1;