Message151800
ctypes.create_string_buffer documentation[1] says init_or_size parameter should accept a string. As of 3.2, it raises:
>>> import ctypes
>>> ctypes.create_string_buffer('foo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.2/ctypes/__init__.py", line 59, in create_string_buffer
buf.value = init
TypeError: str/bytes expected instead of str instance
It works fine as of 2.7 (and very probably any 2.x up to ctypes introduction):
>>> import ctypes
>>> ctypes.create_string_buffer('foo')
<ctypes.c_char_Array_4 object at 0x7fbdcb8b95f0>
[1] http://docs.python.org/py3k/library/ctypes.html#ctypes.create_string_buffer
Regards,
Vincent Pelletier |
|
Date |
User |
Action |
Args |
2012-01-23 07:53:08 | vpelletier | set | recipients:
+ vpelletier |
2012-01-23 07:53:08 | vpelletier | set | messageid: <1327305188.04.0.956774664708.issue13840@psf.upfronthosting.co.za> |
2012-01-23 07:53:07 | vpelletier | link | issue13840 messages |
2012-01-23 07:53:06 | vpelletier | create | |
|