Skip to content

Commit 71d9a5d

Browse files
committed
Also remove Py_TPFLAGS_HAVE_NEWBUFFER
1 parent 1ceb2e0 commit 71d9a5d

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

src_c/_pygame.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,6 @@ typedef enum {
349349
PGS_PREALLOC = 0x01000000
350350
} PygameSurfaceFlags;
351351

352-
// TODO Implement check below in a way that does not break CI
353-
/* New buffer protocol (PEP 3118) implemented on all supported Py versions.
354-
#if !defined(Py_TPFLAGS_HAVE_NEWBUFFER)
355-
#error No support for PEP 3118/Py_TPFLAGS_HAVE_NEWBUFFER. Please use a
356-
supported Python version. #endif */
357-
358352
#define RAISE(x, y) (PyErr_SetString((x), (y)), NULL)
359353
#define RAISERETURN(x, y, r) \
360354
PyErr_SetString((x), (y)); \

src_c/mixer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,7 @@ static PyTypeObject pgSound_Type = {
10051005
.tp_basicsize = sizeof(pgSoundObject),
10061006
.tp_dealloc = (destructor)sound_dealloc,
10071007
.tp_as_buffer = sound_as_buffer,
1008-
.tp_flags =
1009-
(Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_NEWBUFFER),
1008+
.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE),
10101009
.tp_doc = DOC_MIXER_SOUND,
10111010
.tp_weaklistoffset = offsetof(pgSoundObject, weakreflist),
10121011
.tp_methods = sound_methods,

src_c/pgcompat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,4 @@
1717

1818
#define RELATIVE_MODULE(m) ("." m)
1919

20-
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
21-
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
22-
#endif
23-
2420
#endif /* ~PGCOMPAT_INTERNAL_H */

0 commit comments

Comments
 (0)