On 9/13/07, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
> I think if it doesn't go through the buffer interface it is up to the
> object to decide (i.e. what does the object do with itself when buffers
> are exported --- that will depend on the object).   All it must do is
> support the buffer interface in the correct way (i.e. not move the
> memory buffers are relying on and support the access modes correctly
> that it purports to export).

Correct.  This is what I have done in my Bytes object patch to support
READ | EXCLUDE_WRITE (speaking in Greg Ewing's terms which I think we
should adopt).

> Let me think about adding a function for read-write locking that is
> separate from getting a view (which implements memory-location
> locking).  I appreciate the discussion as it is helping me clarify my
> thinking.
>
> -Travis

I'm interested to see what you come up with but... As it is, I agree
with Greg Ewing that a separate function is not necessary and that
just an set of flags to the existing buffer interface are all thats
needed.  Otherwise code would need to make multiple calls (get, lock,
unlock, release) and deal with errors when both do not succeed which
is  complicated and error prone to do in C when a single call could
encapsulate it.

-gps
_______________________________________________
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