mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
unicode database compression, step 1:
- use unidb compression for the unicodedata module. on Windows, the new unidatabase module is 120k, down from nearly 600k.
This commit is contained in:
parent
58af43fd76
commit
a4287c29b3
1 changed files with 1 additions and 11 deletions
|
@ -13,17 +13,7 @@ Copyright (c) Corporation for National Research Initiatives.
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "unicodedatabase.h"
|
#include "unicodedatabase.h"
|
||||||
|
|
||||||
/* --- Helpers ------------------------------------------------------------ */
|
#define unicode_db _PyUnicode_Database_GetRecord
|
||||||
|
|
||||||
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];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- Module API --------------------------------------------------------- */
|
/* --- Module API --------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue