[Bf-python] Fwd: [pygame] BufferProxy (was Flood Filling Images)

Toni Alatalo antont at kyperjokki.fi
Thu Apr 17 01:55:57 CEST 2008


just noticed that there has been some update to the buffer protocol, 
which is of interest to some people here .. i don't know which will 
come sooner, or if they come at the same time: Blender using py 2.6 for 
other reasons, or Blender using the (old) buffer protocol (which i 
guess is the same in 2.3 - 2.5?) to get/give numpy array sypport. 
anyhow i guess that kind of locking business that is the concern in 
pygame is not an issue with the blender things..?

so just for info / general interest,

~Toni

Begin forwarded message:

> From: "René Dudfield" <renesd at gmail.com>
> Date: April 17, 2008 2:20:56 AM EEST
> To: pygame-users at seul.org
> Subject: Re: [pygame] BufferProxy (was Flood Filling Images)
> Reply-To: pygame-users at seul.org
>
> 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 at telus.net> 
> 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.
>>
>>
>>
>>  --
>>  Lenard Lindstrom
>>  <len-l at telus.net>
>>
>>




More information about the Bf-python mailing list