From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Python pretty-printing [5/6]
Date: Tue, 07 Apr 2009 18:32:00 -0000 [thread overview]
Message-ID: <20090407183225.GB7535@adacore.com> (raw)
In-Reply-To: <m38wmibwq0.fsf@fleche.redhat.com>
> #if HAVE_LIBPYTHON2_4
> #include "python2.4/Python.h"
> +#include "python2.4/frameobject.h"
> /* Py_ssize_t is not defined until 2.5.
> Logical type for Py_ssize_t is Py_intptr_t, but that fails in 64-bit
> compilation due to several apparent mistakes in python2.4 API, so we
> @@ -40,8 +41,10 @@
> typedef int Py_ssize_t;
> #elif HAVE_LIBPYTHON2_5
> #include "python2.5/Python.h"
> +#include "python2.5/frameobject.h"
> #elif HAVE_LIBPYTHON2_6
> #include "python2.6/Python.h"
> +#include "python2.6/frameobject.h"
> #else
> #error "Unable to find usable Python.h"
> #endif
Can we avoid this by using the right -I option? It seems to be a shame
that we keep having to include the same file 3 times just because
the file resides in a different directory name...
In other words, do:
#include <Python.h>
instead of:
#if HAVE_LIBPYTHON2_4
#include "python2.4/Python.h"
#elif HAVE_LIBPYTHON2_5
#include "python2.5/Python.h"
#elif HAVE_LIBPYTHON2_6
#include "python2.6/Python.h"
#else
...
#endif
--
Joel
next prev parent reply other threads:[~2009-04-07 18:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 20:57 Tom Tromey
2009-04-03 15:29 ` Eli Zaretskii
2009-04-09 0:29 ` Tom Tromey
2009-04-04 16:39 ` Thiago Jung Bauermann
2009-04-09 0:52 ` Tom Tromey
2009-04-09 15:00 ` Thiago Jung Bauermann
2009-04-09 15:19 ` Phil Muldoon
2009-04-09 15:41 ` Thiago Jung Bauermann
2009-04-09 16:18 ` Tom Tromey
2009-04-09 15:44 ` Tom Tromey
2009-04-09 19:37 ` Tom Tromey
2009-04-09 22:09 ` Thiago Jung Bauermann
2009-04-09 22:36 ` Tom Tromey
2009-04-07 18:32 ` Joel Brobecker [this message]
2009-04-07 18:41 ` Tom Tromey
2009-04-07 20:38 ` Joel Brobecker
2009-04-09 1:08 ` Tom Tromey
2009-04-09 7:40 ` Eli Zaretskii
2009-04-09 16:16 ` Tom Tromey
2009-04-09 16:41 ` Eli Zaretskii
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=20090407183225.GB7535@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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