diff options
| author | Peng Huang <shawn.p.huang@gmail.com> | 2010-06-15 00:12:30 +0800 |
|---|---|---|
| committer | Peng Huang <shawn.p.huang@gmail.com> | 2010-06-15 00:12:30 +0800 |
| commit | 4894ed5d2db043eff4c9bc4f0fa54093a8b63444 (patch) | |
| tree | eb0263d383c81e4f38d4ff5296ac04de2e6363db /scripts | |
| parent | 9dbe241f90e55ec7114de2d3352e795841bd2802 (diff) | |
| download | ibus-libpinyin-4894ed5d2db043eff4c9bc4f0fa54093a8b63444.tar.gz ibus-libpinyin-4894ed5d2db043eff4c9bc4f0fa54093a8b63444.tar.xz ibus-libpinyin-4894ed5d2db043eff4c9bc4f0fa54093a8b63444.zip | |
Use gint8 for pinyin id in double pinyin table
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/double.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/double.py b/scripts/double.py index 7f74348..58ad664 100644 --- a/scripts/double.py +++ b/scripts/double.py @@ -1,7 +1,7 @@ import pydict for name, (sheng, yun) in pydict.SHUANGPIN_SCHEMAS: - print "static const gint double_pinyin_%s_sheng[] = {" % name.lower() + print "static const gint8 double_pinyin_%s_sheng[] = {" % name.lower() for c in "abcdefghijklmnopqrstuvwxyz;": s = sheng.get(c, "VOID") if s == "'": @@ -13,7 +13,7 @@ for name, (sheng, yun) in pydict.SHUANGPIN_SCHEMAS: print " PINYIN_ID_%s // %s" % ((s + ",").ljust(5), c.upper()) print "};" - print "static const gint double_pinyin_%s_yun[][2] = {" % name.lower() + print "static const gint8 double_pinyin_%s_yun[][2] = {" % name.lower() for c in "abcdefghijklmnopqrstuvwxyz;": s = yun.get(c, ("VOID", "VOID")) if len(s) == 1: @@ -32,8 +32,8 @@ for name, (sheng, yun) in pydict.SHUANGPIN_SCHEMAS: print ''' static const struct { - const gint (&sheng)[27]; - const gint (&yun)[27][2]; + const gint8 (&sheng)[27]; + const gint8 (&yun)[27][2]; } double_pinyin_map [] = {''' for name, (sheng, yun) in pydict.SHUANGPIN_SCHEMAS: print " { double_pinyin_%s_sheng, double_pinyin_%s_yun}," % (name.lower(), name.lower()) |
