Message68265
On 2008-06-13 22:32, Antoine Pitrou wrote:
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
> Le vendredi 13 juin 2008 à 20:18 +0000, Marc-Andre Lemburg a écrit :
>> AFAIK, only Crays have this problem, but apart from that: I'd consider
>> it a bug if sizeof(Py_UCS4) != 4.
>
> Perhaps a #error can be added to that effect?
> Something like (untested):
>
> #if SIZEOF_INT == 4
> typedef unsigned int Py_UCS4;
> #elif SIZEOF_LONG == 4
> typedef unsigned long Py_UCS4;
> #else
> #error Could not find a 4-byte integer type for Py_UCS4, aborting
> #endif
Sounds good !
> (of course we could also try harder to find an appropriate type, but I'm
> no specialist in C integer variations)
Python should really try to use uint32_t as fallback solution for
UCS4 where available (and uint16_t for UCS2).
We'd have to add an AC_TYPE_INT32_T and AC_TYPE_INT16_T check to
configure:
http://www.gnu.org/software/autoconf/manual/html_node/Particular-Types.html#Particular-Types
and could then use
typedef uint32_t Py_UCS4
and
typedef uint16_t Py_UCS2
Note that the code for supporting UCS2/UCS4 is not really all that
clean. It was a quick sprint between Martin and Fredrik and appears
to be only half-done... e.g. there currently is no Py_UCS2. |
|
Date |
User |
Action |
Args |
2008-06-16 09:57:23 | lemburg | set | spambayes_score: 0.00219946 -> 0.002199465 recipients:
+ lemburg, georg.brandl, amaury.forgeotdarc, pitrou, benjamin.peterson, schuppenies |
2008-06-16 09:57:18 | lemburg | link | issue3098 messages |
2008-06-16 09:57:10 | lemburg | create | |
|