extension: Fix IOStream.read_all() EOS handling

This commit is contained in:
Ole André Vadla Ravnås
2025-03-30 22:26:59 +02:00
parent 29abf88e31
commit 3f8b122ce7
+6
View File
@@ -5037,6 +5037,12 @@ PyIOStream_read_all (PyIOStream * self, PyObject * args)
if (error == NULL)
{
if ((unsigned long) bytes_read != count)
{
Py_DecRef (buffer);
buffer = PyBytes_FromString ("");
}
result = buffer;
}
else