Skip to content

Commit 158b227

Browse files
authored
Merge pull request #3383 from MightyJosip/bufferproxy
Refactor bufferproxy
2 parents c031e1a + 364a534 commit 158b227

File tree

8 files changed

+95
-146
lines changed

8 files changed

+95
-146
lines changed

docs/reST/c_api/bufferproxy.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ src_c/bufferproxy.c
1111

1212
This extension module defines Python type :py:class:`pygame.BufferProxy`.
1313

14-
Header file: src_c/include/pygame_bufferproxy.h
14+
Header file: src_c/include/pygame.h
1515

1616

17-
.. c:var:: PyTypeObject *pgBufproxy_Type
17+
.. c:var:: PyTypeObject *pgBufferProxy_Type
1818
1919
The pygame buffer proxy object type pygame.BufferProxy.
2020

21-
.. c:function:: int pgBufproxy_Check(PyObject *x)
21+
.. c:function:: int pgBufferProxy_Check(PyObject *x)
2222
2323
Return true if Python object *x* is a :py:class:`pygame.BufferProxy` instance,
2424
false otherwise.
2525
This will return false on :py:class:`pygame.BufferProxy` subclass instances as well.
2626
27-
.. c:function:: PyObject* pgBufproxy_New(PyObject *obj, getbufferproc get_buffer)
27+
.. c:function:: PyObject* pgBufferProxy_New(PyObject *obj, getbufferproc get_buffer)
2828
2929
Return a new :py:class:`pygame.BufferProxy` instance.
3030
Argument *obj* is the Python object that has its data exposed.
@@ -33,13 +33,13 @@ Header file: src_c/include/pygame_bufferproxy.h
3333
It must not be ``NULL``.
3434
On failure raise a Python error and return ``NULL``.
3535
36-
.. c:function:: PyObject* pgBufproxy_GetParent(PyObject *obj)
36+
.. c:function:: PyObject* pgBufferProxy_GetParent(PyObject *obj)
3737
3838
Return the Python object wrapped by buffer proxy *obj*.
3939
Argument *obj* must not be ``NULL``.
4040
On failure, raise a Python error and return ``NULL``.
4141
42-
.. c:function:: int pgBufproxy_Trip(PyObject *obj)
42+
.. c:function:: int pgBufferProxy_Trip(PyObject *obj)
4343
4444
Cause the buffer proxy object *obj* to create a :c:type:`pg_buffer` view of its parent.
4545
Argument *obj* must not be ``NULL``.

src_c/_pygame.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,5 +626,6 @@ typedef enum {
626626
#define PYGAMEAPI_WINDOW_NUMSLOTS 1
627627
#define PYGAMEAPI_RENDER_NUMSLOTS 3
628628
#define PYGAMEAPI_GEOMETRY_NUMSLOTS 2
629+
#define PYGAMEAPI_BUFFERPROXY_NUMSLOTS 4
629630

630631
#endif /* _PYGAME_INTERNAL_H */

0 commit comments

Comments
 (0)