mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Oops, really pass a bytes string to the ctypes function.
This commit is contained in:
parent
8b84ea0aa4
commit
d8840860df
2 changed files with 28 additions and 28 deletions
|
@ -24,7 +24,7 @@ def genwinmap(codepage):
|
|||
buf = ctypes.create_unicode_buffer(2)
|
||||
ret = MultiByteToWideChar(
|
||||
codepage, 0,
|
||||
chr(i), 1,
|
||||
bytes([i]), 1,
|
||||
buf, 2)
|
||||
assert ret == 1, "invalid code page"
|
||||
assert buf[1] == '\x00'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue