On 11/3/07, Brett Cannon <[EMAIL PROTECTED]> wrote:
>
> > test_array
>
> _fileio.c for read() calls is using PyBytes instead of PyString, so a
> type check in array.array().fromfile() is failing. I am assuming that
> _fileio.c should be moved from PyBytes to PyString, right?
Should array.fromfile accept any kind of byte buffer out of .read() or
is it important to only accept PyString? Changing .fromfile to use
_CheckBuffer instead of Bytes_Check also works.
Also in array, I'm not sure if array('u',...) .tofile and .fromfile
works correctly. Currently tofile writes out the raw unicode bytes
without any encoding, and fromfile reads in without any decoding. It
seems like that could cause problems between e.g. 4 byte and 2 byte
unicode builds, not to mention endianess issues.
--
Adam Hupp | http://hupp.org/adam/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com