Message89086
If you assign a function a restype of c_char_p, you get back a Unicode
string, but you should get a bytes object.
>>> from ctypes import *
>>> strchr = cdll['libc.so.6'].strchr
>>> strchr.restype = c_char_p
>>> strchr.argtypes = [c_char_p, c_char]
>>> strchr(b'abcde', b'd')
'de' |
|
Date |
User |
Action |
Args |
2009-06-08 16:07:30 | georg.brandl | set | recipients:
+ georg.brandl, theller |
2009-06-08 16:07:29 | georg.brandl | set | messageid: <1244477249.92.0.44777371921.issue6239@psf.upfronthosting.co.za> |
2009-06-08 16:07:28 | georg.brandl | link | issue6239 messages |
2009-06-08 16:07:28 | georg.brandl | create | |
|