Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
``os.write`` on Windows no longer limits or splits up writes to console
objects. The behavior was initially added to address bpo-11395 in 2011 as a
workaround for the OS returning an error with too large of a write call to
a console.
17 changes: 0 additions & 17 deletions Modules/_io/winconsoleio.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,6 @@ char _PyIO_get_console_type(PyObject *path_or_fd) {
return m;
}

static DWORD
_find_last_utf8_boundary(const char *buf, DWORD len)
{
/* This function never returns 0, returns the original len instead */
DWORD count = 1;
if (len == 0 || (buf[len - 1] & 0x80) == 0) {
return len;
}
for (;; count++) {
if (count > 3 || count >= len) {
return len;
}
if ((buf[len - count] & 0xc0) != 0x80) {
return len - count;
}
}
}

/*[clinic input]
module _io
Expand Down