[pypy-dev] pyopengl on pypy

Armin Rigo arigo at tunes.org
Wed Dec 1 15:23:01 CET 2010

Hi Renaud,

On Wed, Dec 1, 2010 at 2:21 PM, renaud blanch <rndblnch at gmail.com> wrote:
>>> We'd need to find a mechanism in PyPy that would give us that direct
>>> memory-pointer access to be able to use it.  Note: a compacting garbage
>>> collector (or anything else that can move memory locations) will cause
>>> problems there, so we may need to find a way to signal PyPy not to move
>>> a given object, and to use contiguous data-arrays for their storage.

Indeed, this part from Mike Fletcher got the cause right, but the
solution we recommend is different.  It's kind of impossible in PyPy
to mark objects as non-moving ("pin" them, as the garbage collection
language goes).  Instead you need to just use the official ctypes API,
create_string_buffer().  It's equivalent, but requires one extra copy
of the data.

A bientôt,


More information about the Pypy-dev mailing list