From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 750 invoked by alias); 4 Jun 2014 18:25:26 -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 739 invoked by uid 89); 4 Jun 2014 18:25:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f181.google.com Received: from mail-wi0-f181.google.com (HELO mail-wi0-f181.google.com) (209.85.212.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 04 Jun 2014 18:25:23 +0000 Received: by mail-wi0-f181.google.com with SMTP id n15so2033214wiw.2 for ; Wed, 04 Jun 2014 11:25:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kTT0ysVe8Hd0ySgUxfnQoS8v2u626hkh8ARhNnoUDDU=; b=jag8QPn/ZOt9D4+o/780BcdNk8i+6YzTBSmmrA40bQxhRF3/8U6ZHzmKitUMVvmdoo 7lcIDxubR9mm+pkzGqfG9laNtaDBqo+tVxOzJCIpqf0WUiGUABjTllpYKnULb7ZknazT G5DB8OmlNWA2kpzC8btS3faDLr02H6eBjkVes0mB4iS/mFWhVPgc1BdHSPTJLVsSfffR ZzIwmhkjCLCB9nVBqdbY9OIaqVGq6NC9MdUr0CgjPC86oKIL5TNA07qgbyR1RMtG1CIJ JIojoa1SPYrTAHLrItBGu0SyT0PHGDOOHW0bgcs2z6AmPCH0PEEUqtQr6/rTXQ6FbHb/ 1hxA== X-Gm-Message-State: ALoCoQkskHgpuz/Tb6lA8gj4qebsZWMZspuMlG0ZLXGML+aEwSq7etnqFuK6OhOMqFKxWjeUNuJC MIME-Version: 1.0 X-Received: by 10.180.107.130 with SMTP id hc2mr7775990wib.7.1401906320562; Wed, 04 Jun 2014 11:25:20 -0700 (PDT) Received: by 10.217.51.7 with HTTP; Wed, 4 Jun 2014 11:25:20 -0700 (PDT) In-Reply-To: <20140604181342.GW4289@adacore.com> References: <20140604181342.GW4289@adacore.com> Date: Wed, 04 Jun 2014 18:25:00 -0000 Message-ID: Subject: Re: [PATCH] Fix py-xmethods.c when compiled with -Werror against Python 2.4 From: Siva Chandra To: Joel Brobecker Cc: gdb-patches , Doug Evans , uweigand@de.ibm.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00203.txt.bz2 On Wed, Jun 4, 2014 at 11:13 AM, Joel Brobecker wrote: >> Does the attached patch fix the issue pointed out by Ulrich Weigand >> here: https://sourceware.org/ml/gdb-patches/2014-06/msg00169.html >> >> ChangeLog >> 2014-06-04 Siva Chandra Reddy >> >> * python/py-xmethods.c (invoke_match_method) >> (gdbpy_get_matching_xmethod_workers, gdbpy_get_xmethod_arg_types): >> Cast the second arg to PyObject_GetAttrString and >> PyObject_GetAttrString to char *. > > I can't tell whether it fixes the problem - it should! - but looking > at the patch, I think some lines might have become longer than 80 > characters... I double checked again. Two of the lines are at 80. Rest of the lines touched are less than 80. > Also, it'd be nice to answer Ulrich's question regarding the use > of the constants - whether it might make sense to use the string > directly? Looking at the code, I think that it would be to avoid > duplicating that string? enabled_field_name is only used once, > but then you'd probably use the constant for ... consistency (;-)). Yes. That is the reason. Sorry for not mentioning it earlier.