Commits

Author Commit Message Labels Comments Date
Lenard Lindstrom
replace ambiguous switch statement default clauses with specific comments In several cases, a do-nothing default clause was used to indicate the containing switch statement was not exhaustive; unhandled switch values were expected. This intention was not obvious. These are replaced with explanatory comments. Other default clauses were used as assertions, or bug traps, catching invalid switch values and raising a Python SystemError exception. These are better documented …
Lenard Lindstrom
Fix Python 3.x compatibility issue introduced in changeset f7a9049e3b31
Lenard Lindstrom
Fix handling of new buffer format verification in base.c The format '1x' was not recognized (a bug accidently introduced in changeset 0ecf23052547). Also allow an item count prefix of '1' for other supported formats. In the process, clean up and add comments to the format checking code. Finally, add further format checking unit tests to base_test.py.
Lenard Lindstrom
verify pygame.tests.test_utils.buftools.Exporter supports boolean arrays
Lenard Lindstrom
fix a new buffer format bug involving an item count of 1
Lenard Lindstrom
Announce the new buffer protocol additions to Pygame 1.9.2
Lenard Lindstrom
Remove some trailing white space and tabs
Lenard Lindstrom
Document the pygame.Surface.get_buffer() '&' typekind argument as permanent Remove deprecation notices for the '&' raw buffer typekind. It will remain the default value for the get_buffer method argument.
Lenard Lindstrom
Add new buffer protocol support to pygame.Color The pygame.Color type now exports a new buffer interface, with the C level array interface updated to use it.
Lenard Lindstrom
Move new buffer support determination to setup.py Allow the ENABLE_NEWBUF C macro to be set in the compiler shell command. This allows the decision to enable new buffer protocol support to be made in the build chain, particularly setup.py. Now new buffer protocol support and the deletion of src/newbuffer.c are controlled by the same piece of code.
Lenard Lindstrom
C macro cleanup and bug fixes for Python versions 2.5, 2.7, 3.2, and 3.3 Move a buffer related C macro definition to pgcompat.h. Build and test with Python 3.2 and 2.5. Most of the new buffer support was developed in Python 2.7 and 3.3. A Python 3.2 specific problem showed that pygame.PixelArray, a container object, lacked GC support code. Python 2.5 exposed compatibility slip-ups with the new buffer protocol.
Lenard Lindstrom
Fix Python 2.5 compatibility issue
Lenard Lindstrom
Remove redundant prefix from buftools.BufferImporter and BufferExporter
Lenard Lindstrom
Get pygame.PixelArray to handle PyBUF_* buffer import flags properly
Lenard Lindstrom
Make PyBUF_HAS_FLAG macro available to all C source files.
Lenard Lindstrom
Correct pygame.mixer.Sound handling of PyBUF_* buffer export flags
Lenard Lindstrom
Finish up surface BufferProxy PyBUF_* flag handling for 3D and rgba views
Lenard Lindstrom
Filled in surface BufferProxy PyBUF_* flag support for 0D to 2D view kinds
Lenard Lindstrom
Fix problems with Surface.get_buffer('&') and PyBUF_* flags
Lenard Lindstrom
Add pygame.Surface unit tests for PyBUF_* flags: surface_test.py crashes Changed the Surface.get_buffer() BufferProxy object to set Py_buffer.ndim to 0 for a '&' buffer kind. This leads to a crash.
Lenard Lindstrom
More work to get the PyBUF_* flags handling right
Lenard Lindstrom
Finish up bufferproxy module unit tests The BufferProxy.write method test function was incomplete.
Lenard Lindstrom
rename pygame.tests.test_utils.array to avoid import conflicts For Python 2.7, the pygame.tests.test_utils.png module would import the local array Python module instead of the builtin standard library array module, as intended. The new name 'buftools' is more descriptive and does not match any Python library module names.
Lenard Lindstrom
Fix Python 3.x issues with unit tests
Lenard Lindstrom
Implement the BufferProxy.write method and clean up the bufferproxy.c code Fill in the write method function code. Improve error handling for the raw and length properties. For all properties, fix a parent with a read-only buffer. Remove the vestiges of development code.
Lenard Lindstrom
Add PyBUF_* flag to the PgObject_GetBuffer C api function for dict buffers The PgObject_GetBuffer Pygame C api function, in pygame.base, now properly handles the buffer request flags passed to it for an exporting object with a Python level array interface. The changes are made in PgDict_AsBuffer, another C api function. These changes effect all Pygame types and functions that import a buffer, since they all use these api functions.
Lenard Lindstrom
Add convenience attributes to pygame.tests.test_utils.array.BufferExporter These attributes make BufferExporter more compatible with BufferImporter, simplifying comparisons.
Lenard Lindstrom
Make pygame.tests.test_utils.array a module, and clean up some doc strings The test_utils.array module installs, unlike the package it replaces. Unfortunately, it is always installed, whether or not the Pygame build has new buffer support. Though this should be fixed, it breaks nothing for now.
Lenard Lindstrom
Extend and reorganize the unit tests of pygame.tests.test_utils.array package In the process several bugs where detected and fixed.
Lenard Lindstrom
Add new buffer interface import and export test types: incomplete The new pygame.tests.test_utils.array package contains two classes, BufferExporter and BufferImporter. These permit finer control over buffer interface export and import than is possible with existing Python standard library types.
  1. Prev
  2. Next