Message147392
Hmmm... I take back what I said before (not sure what I was thinking), I
don't think this is a regression. If this ever did work, it must have
been a bug. For one reason, Python byte strings are now immutable.
Allowing their memory to be indirectly mutated in Python via buffers
created from 'from_buffer' would be very bad.
Also, I can't reproduce the reported behavior with 3.1.3:
Python 3.1.3 (unknown, Nov 9 2011, 19:57:58)
[GCC 4.6.1 20110908 (Red Hat 4.6.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> (ctypes.c_char*5).from_buffer(b'abcde')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected an object with a writable buffer interface
Are you sure it was 3.1.3? At first I thought you might be using
3.0a, since bytes are mutable in that version, but 'from_buffer'
didn't exist in those times. |
|
Date |
User |
Action |
Args |
2011-11-10 03:10:49 | meador.inge | set | recipients:
+ meador.inge, theller, vstinner, santoso.wijaya, benrg |
2011-11-10 03:10:49 | meador.inge | set | messageid: <1320894649.83.0.85326768542.issue11427@psf.upfronthosting.co.za> |
2011-11-10 03:10:49 | meador.inge | link | issue11427 messages |
2011-11-10 03:10:48 | meador.inge | create | |
|