[New-bugs-announce] [issue13072] Getting a buffer from a Unicode array uses invalid format
STINNER Victor
report at bugs.python.org
Fri Sep 30 02:09:50 CEST 2011
New submission from STINNER Victor <victor.stinner at haypocalc.com>:
In Python 3.2, when you get a buffer from array.array('u'), "u" is used as buffer format. The format is supposed to be a format from the struct module, and "u" is an invalid struct format. "w" is used on wide mode.
I just upgraded the array module to use the new Unicode API (PEP 393). The array now uses a Py_UCS4 buffer. I used "I" or "L" format depending on the size of int and long C types.
It would be better to use a format for a Py_UCS4 string, but struct doesn't support such type.
For Python 2.7 and 3.2, I don't know if it is really a bug or not.
----------
components: Library (Lib)
messages: 144658
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: Getting a buffer from a Unicode array uses invalid format
versions: Python 2.7, Python 3.2, Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13072>
_______________________________________
More information about the New-bugs-announce
mailing list