Skip to content

Commit a4287c2

Browse files
author
Fredrik Lundh
committed
unicode database compression, step 1:
- use unidb compression for the unicodedata module. on Windows, the new unidatabase module is 120k, down from nearly 600k.
1 parent 58af43f commit a4287c2

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

‎Modules/unicodedata.c‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,7 @@ Copyright (c) Corporation for National Research Initiatives.
1313
#include "Python.h"
1414
#include "unicodedatabase.h"
1515

16-
/* --- Helpers ------------------------------------------------------------ */
17-
18-
static
19-
const _PyUnicode_DatabaseRecord *unicode_db(register int i)
20-
{
21-
register int page = i >> 12;
22-
23-
if (page < sizeof(_PyUnicode_Database))
24-
return &_PyUnicode_Database[page][i & 0x0fff];
25-
return &_PyUnicode_Database[0][0];
26-
}
16+
#define unicode_db _PyUnicode_Database_GetRecord
2717

2818
/* --- Module API --------------------------------------------------------- */
2919

0 commit comments

Comments
 (0)