New submission from Matthias Urlichs <>:

ctypes should support binary symbols.

Rationale: There's no requirement that the symbol name in question is encoded 
as ASCII or UTF-8.

>>> import ctypes
>>> t = type('iface', (ctypes.Structure,), {'_fields_': [(b'c_string_symbol', 
>>> ctypes.CFUNCTYPE(ctypes.c_uint32))]})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '_fields_' must be a sequence of (name, C type) pairs

components: ctypes
messages: 315096
nosy: smurfix
priority: normal
severity: normal
status: open
title: Support binary symbol names
type: enhancement

Python tracker <>
Python-bugs-list mailing list

Reply via email to