Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctypes.create_string_buffer should only accept bytes #52553

Closed
benjaminp opened this issue Apr 3, 2010 · 3 comments
Closed

ctypes.create_string_buffer should only accept bytes #52553

benjaminp opened this issue Apr 3, 2010 · 3 comments
Assignees

Comments

@benjaminp
Copy link
Contributor

BPO 8306
Nosy @theller, @terryjreedy, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/theller'
closed_at = <Date 2010-08-07.01:56:59.574>
created_at = <Date 2010-04-03.16:57:47.192>
labels = ['ctypes']
title = 'ctypes.create_string_buffer should only accept bytes'
updated_at = <Date 2010-08-07.01:56:59.573>
user = 'https://github.com/benjaminp'

bugs.python.org fields:

activity = <Date 2010-08-07.01:56:59.573>
actor = 'benjamin.peterson'
assignee = 'theller'
closed = True
closed_date = <Date 2010-08-07.01:56:59.574>
closer = 'benjamin.peterson'
components = ['ctypes']
creation = <Date 2010-04-03.16:57:47.192>
creator = 'benjamin.peterson'
dependencies = []
files = []
hgrepos = []
issue_num = 8306
keywords = []
message_count = 3.0
messages = ['102282', '113021', '113092']
nosy_count = 4.0
nosy_names = ['theller', 'terry.reedy', 'benjamin.peterson', 'ysj.ray']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue8306'
versions = ['Python 3.1', 'Python 3.2', 'Python 3.3']

@benjaminp
Copy link
Contributor Author

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'

@terryjreedy
Copy link
Member

I am just responding so this will not show up on the 'unanswered issues' list.

@ysjray
Copy link
Mannequin

ysjray mannequin commented Aug 6, 2010

Why not close this issue? It seems that this has been fixed in current py3k branch.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants