1. pygame
  2. pygame
  3. pygame

Commits

Author Commit Message Date Builds
René Dudfield
A patch for issue #172 from Lorenz Quack for inplace operators in Math.Vector2.
Lenard Lindstrom
Fix pygame.pixelcopy function problems with big-endian processors The pixelarray module was untested on big-endian systems, like the Power PC. A Mac build of Pygame failed many unit tests. This is a first attempt to fix the bugs uncovered in pixelcopy. This bug fix is untested on a Mac. Also fixed was a faulty unit test in pixelcopy_test.py—a source array was uninitialized—as well as the bugs uncovered when the unit test was repaired.
Lenard Lindstrom
Allow switching the byte order of a Python int to big or little endian The pygame.tests.test_utils.endian module does machine independent byte reorder of the first 4 bytes of a Python int.
Lenard Lindstrom
Add an Array test type to pygame.tests.test_utils.arrinter Numpy arrays and BufferProxy surface views only support the system default integer byte order. The new Array type supports a swapped byte order. It is also available for Python 2.5, unlike the test array type in buftools.
Lenard Lindstrom
Add a test array type to pygame.tests.test_utils.arrinter
Lenard Lindstrom
Bring in corrections to assert statements
Lenard Lindstrom
Correct faulty assertions added to the C code in changeset 67f1c85 and later Some untested assert statements were added to base.c and surface.c as while adding new buffer support. Some asserts failed when the unit tests were run on a Pygame debug build. The PyBUF_PYGAME new buffer request flag, changeset 11e8afc, confused the base.c functions _arraystruct_as_buffer and PgArrayStruct_AsBuffer. The BufferProxy __array_interface__ and __array_struct__ getters failed to add th…
René Dudfield
Tiny typo fix for weird endian machines.
Lenard Lindstrom
Refactor the casting between the C (Py_buffer *) and (Pg_buffer *) types Originally, a BufferProxy get buffer callback accepted a Pg_buffer * argument. This was intended to protect against accidentally using such a callback as a type's bf_releasebuffer slot function. But it left the code full of downcasts from (Pg_buffer *) to (Py_buffer *), and hid the intent that any bf_releasebuffer slot function can be used as a BufferProxy callback. So the BufferProxy callback sig…
Lenard Lindstrom
Remove unused Pg_buffer_d typedef
Lenard Lindstrom
Clean up white space in C source files For the *.c and *.h files in the src and src/freetype directories replace tabs with spaces and remove trailing whitespace.
Lenard Lindstrom
Add class pygame.BufferProxy to Pygame's public Python API Add extension type pygame.bufferproxy.BufferProxy to the root Pygame namespace and the Pygame docs. The pygame._view.View derived BufferProxy is backward compatible with the original BufferProxy object. Also, since Python's memoryview object is inadequate for exporting Surface views, BufferProxy is a permanent Pygame fixture.
Lenard Lindstrom
Restore the Surface.get_view() method The get_view() method returns to the Surface type. The resurrected get_view() is just the updated get_buffer(), without the '&' view kind option. Method new_buffer() goes back to just returning a raw bytes view, as it did originally. This is in response to a comment by illume (René Dudfield) on pull request #25.
Lenard Lindstrom
fix a new buffer format bug involving an item count of 1: Part 2 See changeset 0ecf23052547. Both the pixelcopy and _freetype modules were overlooked previously. Additionally, improve the unit tests on new buffer formats for these two modules.
Lenard Lindstrom
Extend buftools.Exporter to allow an arbitrary format when an itemsize is given Remove the pygame.newbuffer module dependency from base_test.py. Also, reduce code duplication when unit tests for an unsupported new buffer format are added to freetype_test.py.
Lenard Lindstrom
Enhance buftools.Exporter to support negative strides For pixelcopy_test.py unit tests.
Lenard Lindstrom
replace another ambiguous switch statement default clause See changeset 35c6f1cb33b5.
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
  1. Prev
  2. Next