=?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?=

Marc-Andre Lemburg report at bugs.python.org
Tue Oct 7 17:23:50 CEST 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 2008-10-07 14:33, Ronald Oussoren wrote:
> Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
> 
> Annoyingly enough my patch isn't good enough, it turns out that ctypes 
> has introduced a SIZEOF__BOOL definition in configure.in and that needs 
> special caseing as well.
> 
> pymacconfig.h.patch2 fixes that issue as well. Do you have access to a 
> PPC G5 system? I've determined the correct value of SIZEOF__BOOL for 
> that platform by reading the assembly code for a small test program and 
> hence am not 100% sure that sizeof(_Bool) actually is 1 on that 
> architecture.

Using this helper:

#include <stdio.h>
main() {
    printf("sizeof(_Bool)=%i bytes\n", sizeof(_Bool));
}

I get:

sizeof(_Bool)=4 bytes

on a G4 PPC.

Seems strange to me, but reasonable since it is defined like this
in stdbool.h:

#if __STDC_VERSION__ < 199901L && __GNUC__ < 3
typedef int     _Bool;
#endif

----------
title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC -> PyUnicode_DecodeUTF16(...,	byteorder=0) gets it wrong on Mac OS X/PowerPC

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4060>
_______________________________________


More information about the Python-bugs-list mailing list