[IronPython] array.fromfile

Dino Viehland dinov at exchange.microsoft.com
Tue Feb 27 20:47:27 CET 2007


Cool, thanks for spending the time to try this out.  I'll check-in the change in the next couple of days and it'll be 4 bytes in the next release.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of JoeSox
Sent: Monday, February 26, 2007 9:59 PM
To: Discussion of IronPython
Subject: Re: [IronPython] array.fromfile

Outstanding news! It worked.  I finally had some extra time to change
the other two methods to match my modifications to CreateData and it
worked like a charm. Pretty cool.  I think this is the best way to go,
so not too many people get broken.

Thanks, JoeSox


On 2/24/07, Dino Viehland <dinov at exchange.microsoft.com> wrote:
> Unfortunately there are several switch statements that will need to be updated.  They are in CreateData (generic type), ToStream (cast), FromStream (call Read?Int32).  If you update all 3 you should be consistent then.
>
> If I had to take a guess here I would think maybe there's an earlier read from an array that's driving the # of elements to be read later.
>
> I'm not opposed to changing the sizes of these to match CPython but I suspect we can never make the sizes 100% compatible across all architectures on all platforms.  Technically this IS a bug in the module you're using - it shouldn't expect the sizes to be fixed.  We can make these 4 byte values but I suspect we'll have differences on x64.  We can make them platform dependent but not all platforms have the same definitions for the size of "long".  In particular I believe Windows defines this as being 4 bytes and most other platforms choose 8 bytes.  Based upon that investigating I'll update the sizes so we can be more compatible.  But I'd love to hear if updating all 3 fixes your problem.
> ________________________________________
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list