Accept bytes in c_char_p and c_wchar_p types.

This commit is contained in:
Thomas Heller 2007-07-12 15:41:51 +00:00
parent 3af4266d07
commit 2c5e96465f
2 changed files with 18 additions and 9 deletions

View file

@ -14,5 +14,13 @@ class BytesTest(unittest.TestCase):
c_wchar.from_param(b"x")
(c_wchar * 3)(b"a", b"b", b"c")
def test_c_char_p(self):
c_char_p("foo bar")
c_char_p(b"foo bar")
def test_c_wchar_p(self):
c_wchar_p("foo bar")
c_wchar_p(b"foo bar")
if __name__ == '__main__':
unittest.main()