mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Accept bytes in c_char_p and c_wchar_p types.
This commit is contained in:
parent
3af4266d07
commit
2c5e96465f
2 changed files with 18 additions and 9 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue