diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-16 07:49:21 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-16 07:49:21 (GMT) |
commit | 41d3c8f67e62fe307c46c91e5a42b71e39c59334 (patch) | |
tree | 0c7c6348e421d05be040ec77ef8a7200c85c391d /generic/tkText.c | |
parent | 9759a4f9b6f61757dc505a923c07951e560e47a3 (diff) | |
download | tk-41d3c8f67e62fe307c46c91e5a42b71e39c59334.zip tk-41d3c8f67e62fe307c46c91e5a42b71e39c59334.tar.gz tk-41d3c8f67e62fe307c46c91e5a42b71e39c59334.tar.bz2 |
Patch from Christian Werner, for evaluation
Diffstat (limited to 'generic/tkText.c')
-rw-r--r-- | generic/tkText.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 1227e7b..834e842 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -4508,7 +4508,11 @@ TkTextGetTabs( Tcl_Obj **objv; TkTextTabArray *tabArrayPtr; TkTextTab *tabPtr; +#if TCL_UTF_MAX == 4 + int ch; +#else Tcl_UniChar ch; +#endif double prevStop, lastStop; /* * Map these strings to TkTextTabAlign values. @@ -4615,7 +4619,11 @@ TkTextGetTabs( * There may be a more efficient way of getting this. */ +#if TCL_UTF_MAX == 4 + TkUtfToUniChar32(Tcl_GetString(objv[i+1]), &ch); +#else Tcl_UtfToUniChar(Tcl_GetString(objv[i+1]), &ch); +#endif if (!Tcl_UniCharIsAlpha(ch)) { continue; } |