summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-09-24 21:45:34 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-09-24 21:45:34 (GMT)
commita4287c29b343dec5115672fd1ff1325f322dec1b (patch)
tree167f42fcadee9ea141e202e6cf1d6a29c2a1ef9a /Modules
parent58af43fd760c2d7d0d8238b7919cf8fa9f1b6dbe (diff)
downloadcpython-a4287c29b343dec5115672fd1ff1325f322dec1b.zip
cpython-a4287c29b343dec5115672fd1ff1325f322dec1b.tar.gz
cpython-a4287c29b343dec5115672fd1ff1325f322dec1b.tar.bz2
unicode database compression, step 1:
- use unidb compression for the unicodedata module. on Windows, the new unidatabase module is 120k, down from nearly 600k.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/unicodedata.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 36c6566..e15ff27 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 --------------------------------------------------------- */