On Mon, Jan 30, 2012 at 03:13:50AM +0100, Julien Puydt wrote:
> Le 30/01/2012 03:10, Dima Pasechnik a écrit :
> >Working on the ARM port (kudos to Snark), which has, unlike x86,
> >unsigned char, we stumbled upon several places in Sage library (in
> >Cython code) where char type was used for (essentially) operating on bit
> >strings.
> 
> To be more specific : all platforms have "unsigned char" and "signed
> char", but the unadorned "char" can be either of those, depending on
> the platform. On most platforms, "char" means "signed char" ; on
> ARM, it means "unsigned char".
> 
> So if your code uses bare "char", it might have portability issues.
> 
> If you just use "char*" for runtime data buffers, then all is ok. If
> you make sign tests, things get murky. If you write those buffers on
> disk with the hope to use them with the same code on another
> platform, it's wrong.

No, writing those buffers to disk is not necessarily a problem.
The issue was converting them to python ints and saving those (in __reduce__).


-Willem Jan

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to