[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] BufferProxy (was Flood Filling Images)



I suppose that will work. Fall back to the old buffer protocol if the slots for the new functions are not filled.

Lenard


René Dudfield wrote:
hi,

I'm pretty sure they are back porting it to python 2.6.

"It is intended that this PEP will be back-ported to Python 2.6 by
adding the C-API and the two functions to the existing buffer
protocol."
    -- http://www.python.org/dev/peps/pep-3118/#issues-and-details



On Thu, Apr 17, 2008 at 5:04 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
Greg Ewing wrote:

René Dudfield wrote:



[G]etting a buffer proxy helps with surface locking semantics.

When you get a BufferProxy the surface is locked (which you need to do
when you are modifying Surface->pixels - when the BufferProxy is
destroyed, the surface lock is released.

That's a good reason. Although the new buffer protocol
has locking facilities built in, so it wouldn't strictly
be needed then.


 The new buffer protocol is for Python 3.0. I believe it breaks things so
will ever be available for the 2.x series.