On Thu, Nov 20, 2008 at 2:12 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
> I've had a look at the new memoryview and associated buffer API
> and have a question: how is a C extension supposed to use the buffer
> API without going directly into the C struct Py_buffer ?
>
> I have not found any macros for accessing Py_buffer internals and
> the docs mention the struct members directly (which is a bit unusual
> for the Python C API).
>
> Shouldn't there be a set of macros providing some form of abstraction
> for the struct members ?
>
> BTW: I was looking for a suitable replacement for the buffer object
> which isn't available in Python 3 anymore.
>
> Thanks,
> --
> Marc-Andre Lemburg
> eGenix.com

>From what I understand of the memoryview when I tried to do the same
thing a few months ago (use memoryview to replace buffer in
asyncore/asynchat), memoryview is incomplete.  It didn't support
character buffer slicing (you know, the 'offset' and 'size' arguments
that were in buffer), and at least a handful of other things (that I
can't remember at the moment).

 - Josiah
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to