Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA v2 2/2] Fix PR python/17386 - add __index__ method to gdb.Value
Date: Mon, 23 May 2016 18:01:00 -0000	[thread overview]
Message-ID: <dfa852ae-9f73-0a4c-4460-1eba3d00fe4d@redhat.com> (raw)
In-Reply-To: <1464024313-11932-3-git-send-email-tom@tromey.com>

On 05/23/2016 06:25 PM, Tom Tromey wrote:
> -  valpy_divide                /* nb_true_divide */
> +  valpy_divide,               /* nb_true_divide */
> +  NULL,			      /* nb_inplace_floor_divide */
> +  NULL			      /* nb_inplace_true_divide */
> +#ifndef HAVE_LIBPYTHON_2_4
> +  /* This was added in Python 2.5.  */
> +  , valpy_long		      /* nb_index */
> +#endif /* HAVE_LIBPYTHON_2_4 */
>  };

Are you trying to avoid a trailing comma?  We already use trailing commas
in many places in common code (and have been for a long while),
so the fact that it was valid C89/C++03 doesn't really matter in practice.
(It was a common extension that later became valid in C99/C++11.)

IOW, this can be:

+  valpy_divide,               /* nb_true_divide */
+  NULL,			      /* nb_inplace_floor_divide */
+  NULL,			      /* nb_inplace_true_divide */
+#ifndef HAVE_LIBPYTHON_2_4
+  /* This was added in Python 2.5.  */
+  valpy_long,		      /* nb_index */
+#endif /* HAVE_LIBPYTHON_2_4 */

Thanks,
Pedro Alves


  reply	other threads:[~2016-05-23 18:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 17:25 [RFA v2 0/2] " Tom Tromey
2016-05-23 17:25 ` [RFA v2 1/2] add nb_inplace_divide for python 2 Tom Tromey
2016-05-24  8:50   ` Yao Qi
2016-05-23 17:25 ` [RFA v2 2/2] Fix PR python/17386 - add __index__ method to gdb.Value Tom Tromey
2016-05-23 18:01   ` Pedro Alves [this message]
2016-05-23 18:40     ` Tom Tromey
2016-05-24  8:58   ` Yao Qi
2016-05-25 13:48   ` Ulrich Weigand
2016-05-25 14:04     ` Tom Tromey
2016-05-25 14:54       ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfa852ae-9f73-0a4c-4460-1eba3d00fe4d@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox