summaryrefslogtreecommitdiffstats
path: root/Modules/_io/_iomodule.c
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-05-07 14:01:27 (GMT)
committerGitHub <noreply@github.com>2023-05-07 14:01:27 (GMT)
commit7a7eaff95c7a400449822bbabd94524b8f87299c (patch)
treeb091c97fe43bcf54592ab5618f6bf1cb4d8c50f3 /Modules/_io/_iomodule.c
parenta05bad3254e2ae5fdf558dfdb65899a2298d8ded (diff)
downloadcpython-7a7eaff95c7a400449822bbabd94524b8f87299c.zip
cpython-7a7eaff95c7a400449822bbabd94524b8f87299c.tar.gz
cpython-7a7eaff95c7a400449822bbabd94524b8f87299c.tar.bz2
gh-101819: Port _io.PyBytesIOBuffer_Type to heap type (#104264)
Diffstat (limited to 'Modules/_io/_iomodule.c')
-rw-r--r--Modules/_io/_iomodule.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index b72b847..c05407b 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -671,9 +671,6 @@ static PyTypeObject* static_types[] = {
&PyBufferedIOBase_Type,
&PyRawIOBase_Type,
&PyTextIOBase_Type,
-
- // PyRawIOBase_Type(PyIOBase_Type) subclasses
- &_PyBytesIOBuffer_Type,
};
@@ -753,6 +750,7 @@ PyInit__io(void)
// Base classes
ADD_TYPE(m, state->PyIncrementalNewlineDecoder_Type, &nldecoder_spec, NULL);
+ ADD_TYPE(m, state->PyBytesIOBuffer_Type, &bytesiobuf_spec, NULL);
// PyIOBase_Type subclasses
state->PyRawIOBase_Type = (PyTypeObject *)Py_NewRef(&PyRawIOBase_Type);
@@ -771,7 +769,6 @@ PyInit__io(void)
state->PyBufferedIOBase_Type);
// PyRawIOBase_Type(PyIOBase_Type) subclasses
- state->PyBytesIOBuffer_Type = (PyTypeObject *)Py_NewRef(&_PyBytesIOBuffer_Type);
ADD_TYPE(m, state->PyFileIO_Type, &fileio_spec, state->PyRawIOBase_Type);
#ifdef MS_WINDOWS
ADD_TYPE(m, state->PyWindowsConsoleIO_Type, &winconsoleio_spec,