Fred Kiefer wrote: [snip] > The actual fix solves a problem on systems where > unsigned int == unsigned short > does not hold. I think that this is indendent of the endianess of the > system (You rather expect it to fail on a 16 bit or 64 bit machine).
On little-endian systems with 16-bit shorts and 32-bit ints, the lower 16 bits of the int will occupy the same memory with the same format as the 16 bits of the short and the code will give the correct result for characters <=65535. (Eg. U-1234 will be stored as: 34 12 00 00 and the short would grab the first two bytes and get the correct value. On a big-endian system, it would be stored as: 00 00 12 34 and the result would be 0 for all characters <=65535. Being able to cast pointers to ints of different widths into each other is a nice feature of little-endian systems, but you can't use it in portable code.) - Alexander Malmberg _______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep