Lines Matching refs:wlen
671 DWORD wlen = (DWORD)(len / 4); in readinto() local
672 if (wlen == 0) { in readinto()
673 wlen = 1; in readinto()
680 wlen -= 1; in readinto()
682 if (len == read_len || wlen == 0) in readinto()
686 wchar_t *wbuf = read_console_w(self->handle, wlen, &n); in readinto()
966 DWORD len, wlen, n = 0; in _io__WindowsConsoleIO_write_impl() local
982 wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, NULL, 0); in _io__WindowsConsoleIO_write_impl() local
989 while (wlen > 32766 / sizeof(wchar_t)) { in _io__WindowsConsoleIO_write_impl()
991 wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, NULL, 0); in _io__WindowsConsoleIO_write_impl()
995 if (!wlen) in _io__WindowsConsoleIO_write_impl()
998 wbuf = (wchar_t*)PyMem_Malloc(wlen * sizeof(wchar_t)); in _io__WindowsConsoleIO_write_impl()
1001 wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, wbuf, wlen); in _io__WindowsConsoleIO_write_impl() local
1002 if (wlen) { in _io__WindowsConsoleIO_write_impl()
1003 res = WriteConsoleW(self->handle, wbuf, wlen, &n, NULL); in _io__WindowsConsoleIO_write_impl()
1004 if (res && n < wlen) { in _io__WindowsConsoleIO_write_impl()
1013 wlen = MultiByteToWideChar(CP_UTF8, 0, b->buf, len, in _io__WindowsConsoleIO_write_impl()
1015 assert(wlen == len); in _io__WindowsConsoleIO_write_impl()