[Patches] [ python-Patches-438013 ] Remove 2-byte Py_UCS2 assumptions
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 03 Aug 2001 16:56:19 -0700
Patches item #438013, was opened at 2001-07-02 12:43
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=438013&group_id=5470
Category: core (C code)
Group: None
Status: Open
Resolution: Out of Date
Priority: 5
Submitted By: Tim Peters (tim_one)
>Assigned to: M.-A. Lemburg (lemburg)
Summary: Remove 2-byte Py_UCS2 assumptions
Initial Comment:
The patch changes PyUnicode_EncodeUTF16 and
PyUnicode_DecodeUTF16 to work without assuming the
existence of a (exactly) 2-byte type.
There are no more references remaining in the code
base to Py_UCS2, except for what looks to be a now-
pointless complaint in unicodeobject.h.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-08-03 16:56
Message:
Logged In: YES
user_id=31435
New patch attached, and back to MAL.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-08-02 22:59
Message:
Logged In: YES
user_id=31435
Marked Out of Date as per MAL's remark, and assigned back
to me.
----------------------------------------------------------------------
Comment By: M.-A. Lemburg (lemburg)
Date: 2001-08-02 09:39
Message:
Logged In: YES
user_id=38388
Tim, please resubmit the patch -- it no longer applies to
the current CVS tree. Thanks.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-07-02 13:27
Message:
Logged In: YES
user_id=31435
Isn't Py_UNICODE always big enough to hold a UCS-2 code
point? If the latter is 16 bits (which I assume), C
guarantees an unsigned short is big enough to hold it (and
doesn't guarantee an int is bigger than that -- although
Python would be pretty useless if an int weren't bigger!).
----------------------------------------------------------------------
Comment By: Fredrik Lundh (effbot)
Date: 2001-07-02 13:09
Message:
Logged In: YES
user_id=38376
+1 from here.
Py_UCS2 should either go away, or be redefined as "large
enough to hold a UCS-2 code point" (maybe there's some
codec that may want to use such a data type? in real
life, "unsigned int" is probably a decent approximation...)
</F>
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=438013&group_id=5470