Commits

Lenard Lindstrom committed 5e884e9

Announce the new buffer protocol additions to Pygame 1.9.2

Comments (0)

Files changed (1)

 # BREAK = change breaks existing code
 # BUG    = fixed a bug that was (or could have been) crashing
 
+[HG 962e528796ab] May 26, 2013
+    Add full Python new buffer protocol support to Pygame 1.9.2. In addition
+    Python level array interface support is added to several Pygame objects
+    and function. This changeset marks the end of a series of commits,
+    starting with revision 98e3a61592c1 on September 8, 2012.
+
+    Affected Pygame buffer exporting objects are BufferProxy, Surface
+    (through method get_buffer), Sound, PixelArray, and Color. Affected
+    importers are Sound, freetype.Font, BufferProxy, and the
+    pixelcopy module functions (array_to_surface, surface_to_array, map_array,
+    and make_surface).
+
+    Internally, Pygame has been rewritten to use the C Py_buffer to represent
+    external array objects. For Python 2.5 and earlier, which do not support
+    the new buffer protocol, Py_buffer is defined in pygame.h. The details
+    of translating between Py_buffer and the array interface are now found
+    in only on C file, base.c. Consequently, the base module exports several new
+    Pygame C api functions and a new exception: PgBuffer_AsArrayInterface,
+    PgBuffer_AsArrayStruct, PgObject_GetBuffer, PgBuffer_Release,
+    PgDict_AsBuffer, and PgExc_BufferError. These api additions also reduce
+    the amount of conditional compilation code required to support Python
+    versions which lack the new buffer protocol.
+
+    Finally, for proper testing, additions are made to the unit test framework.
+    A new extension module, pygame.newbuffer, adds new classes for importing
+    and exporting the new buffer interface at the Python level. It is built
+    conditionally. The new pygame.tests.test_utils.buftools Python module
+    implements the high level classes used in the actual unit tests. Also,
+    a new class in pygame.tests.test_utils.arrinter exports a C level
+    array interface from the Python level.
+    
 [SVN 3062] Mar 30, 2011
     Port scrap module to Python 3.x (merge with branches/port_scrap_py3).
     Accidently committed in rev 3061.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.