for (; i > 0; i--) {
buf[i] = 0;
result = (const gunichar **) bsearch (buf, simp_to_trad,
- SIMP_TO_TRAD_NR, sizeof (simp_to_trad[0]),
+ G_N_ELEMENTS (simp_to_trad), sizeof (simp_to_trad[0]),
_cmp);
if (G_UNLIKELY (result != NULL))
break;
{ L"龟", L"龜" },
};
#define SIMP_TO_TRAD_MAX_LEN (6)
-#define SIMP_TO_TRAD_NR (sizeof (simp_to_trad) / sizeof (simp_to_trad[0]))
print ' { L"%s", L"%s" },' % (s.encode("utf8"), ts.encode("utf8"))
print "};"
print '#define SIMP_TO_TRAD_MAX_LEN (%d)' % maxlen
- print '#define SIMP_TO_TRAD_NR (sizeof (simp_to_trad) / sizeof (simp_to_trad[0]))'
if __name__ == "__main__":
main()