[i18n] Adding NUM_SCRIPTS to the end of the scripts enum

This commit is contained in:
Al
2015-05-16 12:19:40 -04:00
parent 8699409f15
commit 5983cb6af0
2 changed files with 5 additions and 3 deletions

View File

@@ -75,6 +75,7 @@ scripts_header_template = u'''#ifndef UNICODE_SCRIPT_TYPES_H
typedef enum {{
{script_enum}
NUM_SCRIPTS
}} script_t;
#endif
@@ -370,8 +371,8 @@ def main(out_dir):
# Generate C header and constants
script_enum = u''',
'''.join(['SCRIPT_{} = {}'.format(s.upper(), i) for s, i in sorted(all_scripts.iteritems(), key=itemgetter(1))])
script_enum = u'''
'''.join(['SCRIPT_{} = {},'.format(s.upper(), i) for s, i in sorted(all_scripts.iteritems(), key=itemgetter(1))])
out_header.write(scripts_header_template.format(num_chars=NUM_CHARS,
max_langs=max_langs,

View File

@@ -78,7 +78,8 @@ typedef enum {
SCRIPT_JAVANESE = 68,
SCRIPT_CHAM = 69,
SCRIPT_TAI_VIET = 70,
SCRIPT_MEETEI_MAYEK = 71
SCRIPT_MEETEI_MAYEK = 71,
NUM_SCRIPTS
} script_t;
#endif