From: Fredrik Lundh Date: Sun, 24 Sep 2000 21:45:34 +0000 (+0000) Subject: unicode database compression, step 1: X-Git-Tag: v2.0b2~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4287c29b343dec5115672fd1ff1325f322dec1b;p=python unicode database compression, step 1: - use unidb compression for the unicodedata module. on Windows, the new unidatabase module is 120k, down from nearly 600k. --- diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 36c6566ad4..e15ff27183 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -13,17 +13,7 @@ Copyright (c) Corporation for National Research Initiatives. #include "Python.h" #include "unicodedatabase.h" -/* --- Helpers ------------------------------------------------------------ */ - -static -const _PyUnicode_DatabaseRecord *unicode_db(register int i) -{ - register int page = i >> 12; - - if (page < sizeof(_PyUnicode_Database)) - return &_PyUnicode_Database[page][i & 0x0fff]; - return &_PyUnicode_Database[0][0]; -} +#define unicode_db _PyUnicode_Database_GetRecord /* --- Module API --------------------------------------------------------- */