Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: "Wiederhake, Tim" <tim.wiederhake@intel.com>
Cc: "Jose E. Marchesi" <jose.marchesi@oracle.com>,
	Yao Qi <qiyaoltc@gmail.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: MemoryView missing from Python 2.4 and 2.6
Date: Tue, 07 Mar 2017 15:27:00 -0000	[thread overview]
Message-ID: <20170307152749.qqy6gbktvv3uygll@adacore.com> (raw)
In-Reply-To: <9676A094AF46E14E8265E7A3F4CCE9AF9428CB@irsmsx105.ger.corp.intel.com>

> > It looks like the patch is also removing the feature from users of
> > Python 2.7.x, though, is it not?
> 
> The patch (see
> https://sourceware.org/ml/gdb-patches/2017-03/msg00039.html) does not
> remove any feature.  The patch changes the return type of one function
> from "memoryview" to "buffer" for Python 2.7 and below.  Both types
> support the "in" keyword, indexed access, length etc. and behave very
> similar.  Granted, memoryview has some additional functions that lets
> the user inspect the stride and size of the elements in the buffer,
> but this is a feature we do not use here anyway.
> 
> I chose 2.7 as a parting point because that is how it is  handled in
> infpy_read_memory in py-inferior.c.  Personally, I would leave it that
> way because with "buffer" exposed with Python 2.7 as well as Python
> 2.6 and below, I guess it gets more exposure and testing and won't
> suffer bit-rot as easily.
> 
> The patch is tested with Python 2.7 and Python 3.6.  I cannot test it
> with Python 2.6 but that should not be necessary as these two versions
> already check both different return types.

OK, that seems sensible for me indeed. Thanks for taking the time
to explain!

-- 
Joel


  reply	other threads:[~2017-03-07 15:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 16:48 Jose E. Marchesi
2017-02-23 17:06 ` Jose E. Marchesi
2017-02-23 22:59 ` Yao Qi
2017-02-24 10:37   ` Wiederhake, Tim
2017-02-24 16:06     ` Yao Qi
2017-02-24 16:14       ` Paul.Koning
2017-02-28 10:53       ` Wiederhake, Tim
2017-02-28 12:51         ` Jose E. Marchesi
2017-03-07  0:21           ` Joel Brobecker
2017-03-07 13:38             ` Wiederhake, Tim
2017-03-07 15:27               ` Joel Brobecker [this message]
2017-03-03 10:21         ` Yao Qi
2017-03-06  8:56           ` Wiederhake, Tim
2017-03-07 10:32             ` Yao Qi
2017-03-07 17:18               ` Wiederhake, Tim
2017-03-17 15:59                 ` Yao Qi
2017-03-17 16:39                   ` Jose E. Marchesi
2017-03-20  9:04             ` Yao Qi
2017-03-20 22:44               ` Yao Qi

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=20170307152749.qqy6gbktvv3uygll@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jose.marchesi@oracle.com \
    --cc=qiyaoltc@gmail.com \
    --cc=tim.wiederhake@intel.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