summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-07-12 19:19:43 (GMT)
committerThomas Heller <theller@ctypes.org>2007-07-12 19:19:43 (GMT)
commit7775c716fcf28346e2e79238d6e5080d5a1bcc81 (patch)
treee5adb2863214cf0e308006e60b27c9afcd45aeed /Lib/ctypes
parent60831316df8893e973f92592b7c4c95ad489ff15 (diff)
downloadcpython-7775c716fcf28346e2e79238d6e5080d5a1bcc81.zip
cpython-7775c716fcf28346e2e79238d6e5080d5a1bcc81.tar.gz
cpython-7775c716fcf28346e2e79238d6e5080d5a1bcc81.tar.bz2
Accept bytes as parameter to foreign functions without prototype.
These are passed as byte strings (unicode strings are passed as wide character strings).
Diffstat (limited to 'Lib/ctypes')
-rw-r--r--Lib/ctypes/test/test_slicing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ctypes/test/test_slicing.py b/Lib/ctypes/test/test_slicing.py
index 3db82c3..ab01c18 100644
--- a/Lib/ctypes/test/test_slicing.py
+++ b/Lib/ctypes/test/test_slicing.py
@@ -37,7 +37,7 @@ class SlicesTestCase(unittest.TestCase):
from ctypes.test import is_resource_enabled
if is_resource_enabled("struni-crash"):
def test_char_ptr(self):
- s = "abcdefghijklmnopqrstuvwxyz"
+ s = b"abcdefghijklmnopqrstuvwxyz"
dll = CDLL(_ctypes_test.__file__)
dll.my_strdup.restype = POINTER(c_char)
@@ -57,7 +57,7 @@ class SlicesTestCase(unittest.TestCase):
def test_char_ptr_with_free(self):
dll = CDLL(_ctypes_test.__file__)
- s = "abcdefghijklmnopqrstuvwxyz"
+ s = b"abcdefghijklmnopqrstuvwxyz"
class allocated_c_char_p(c_char_p):
pass