Oops, really pass a bytes string to the ctypes function.

This commit is contained in:
Amaury Forgeot d'Arc 2009-07-13 20:48:07 +00:00
parent 8b84ea0aa4
commit d8840860df
2 changed files with 28 additions and 28 deletions

View file

@ -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'