[New-bugs-announce] [issue8306] ctypes.create_string_buffer should only accept bytes

Benjamin Peterson report at bugs.python.org
Sat Apr 3 18:57:48 CEST 2010


New submission from Benjamin Peterson <benjamin at python.org>:

These coercions shouldn't be allowed:

import ctypes
>>> buf = ctypes.create_string_buffer("hi")
>>> buf.value
b'hi'
>>> buf.value = "23"
>>> buf.value
b'23'

----------
assignee: theller
components: ctypes
messages: 102282
nosy: benjamin.peterson, theller
severity: normal
status: open
title: ctypes.create_string_buffer should only accept bytes
versions: Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8306>
_______________________________________


More information about the New-bugs-announce mailing list