summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c8
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;
}