diff options
Diffstat (limited to 'src/magic_numbers.zig')
| -rw-r--r-- | src/magic_numbers.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/magic_numbers.zig b/src/magic_numbers.zig new file mode 100644 index 0000000..203bdfd --- /dev/null +++ b/src/magic_numbers.zig | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | //! 'Magic' numbers for codegen sizing | ||
| 2 | //! | ||
| 3 | //! These need to be updated for each Unicode version. | ||
| 4 | |||
| 5 | // Whether to print the magic numbers | ||
| 6 | pub const print = false; | ||
| 7 | |||
| 8 | // Don't want to crash while printing magic... | ||
| 9 | const fudge = if (print) 1000 else 0; | ||
| 10 | |||
| 11 | // Number of codepoints in CanonData.zig | ||
| 12 | pub const canon_size: usize = 3127 + fudge; | ||
| 13 | |||
| 14 | // Number of codepoitns in CompatData.zig | ||
| 15 | pub const compat_size: usize = 5612 + fudge; | ||