[Patches] [Patch #101652] unidb-based unicodectype.c replacement
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 25 Sep 2000 23:19:50 -0700
Patch #101652 has been updated.
Project:
Category: core (C code)
Status: Closed
Summary: unidb-based unicodectype.c replacement
Follow-Ups:
Date: 2000-Sep-25 13:28
By: none
Comment:
(not a patch -- this is replacing a 450k source file
with a 14k source file, and the resulting patch file
is too large for sourceforge...)
to generate the associated datafile, check out the
latest Tools/unicode/makeunicodedata.py
-------------------------------------------------------
Date: 2000-Sep-25 14:10
By: lemburg
Comment:
The code looks ok, but I can't really follow the technique you
use for the lower/upper mappings: why can't you simply
use "const Py_UNICODE" + "return ctype->lower"
instead of "unsigned short" and then "return (ch + ctype->lower) & 0xffff" ?!
-------------------------------------------------------
Date: 2000-Sep-25 15:38
By: none
Comment:
the use of "unsigned short" is from the original unidb code; I've changed this to Py_UNICODE
</F>
-------------------------------------------------------
Date: 2000-Sep-25 15:43
By: lemburg
Comment:
There's still the "ch + ctype->upper" code in there... it would be
pretty straight forward changing the offset in the database to an
absolute Py_UNICODE value which I would prefer due to the
possible problems with overflows and compiler warnings.
Do you need the offset for something else too ?
-------------------------------------------------------
Date: 2000-Sep-25 16:40
By: tim_one
Comment:
This has been checked in and passes the tests. More fiddling has to wait until after 2.0b2 ships.
-------------------------------------------------------
Date: 2000-Sep-25 23:19
By: none
Comment:
Re: "ch + ctype->upper" code.
mal, deltas are an important part of the compression algorithm. if you take them away, you can no longer use the same character type descriptor for more than one character code.
</F>
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=101652&group_id=5470