summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-19 16:31:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-19 16:31:21 (GMT)
commit7ee3cf1eefe8f83ea1e5a48fd3b8c0d01803f3b9 (patch)
tree9cabc949cdcf731cfdfb80d5a7554dded03e004c /generic
parent5d3696a737a0d6cbfc1c3eda16547cff2f9078d7 (diff)
downloadtk-7ee3cf1eefe8f83ea1e5a48fd3b8c0d01803f3b9.zip
tk-7ee3cf1eefe8f83ea1e5a48fd3b8c0d01803f3b9.tar.gz
tk-7ee3cf1eefe8f83ea1e5a48fd3b8c0d01803f3b9.tar.bz2
More use of Tcl_WinTCharToUtf() in stead of Tcl_UniCharToUtfDString(), making Tk less sensitive to the value of TCL_UTF_MAX (either 3, 4, or 6)
Diffstat (limited to 'generic')
-rw-r--r--generic/tkMain.c4
-rw-r--r--generic/tkSelect.c2
2 files changed, 1 insertions, 5 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 3600142..b80ce4d 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -84,9 +84,6 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
* encoding to UTF-8).
*/
-#if defined(UNICODE) && (TCL_UTF_MAX <= 4)
-# define NewNativeObj Tcl_NewUnicodeObj
-#else /* !UNICODE || (TCL_UTF_MAX > 4) */
static inline Tcl_Obj *
NewNativeObj(
TCHAR *string,
@@ -107,7 +104,6 @@ NewNativeObj(
Tcl_DStringFree(&ds);
return obj;
}
-#endif /* !UNICODE || (TCL_UTF_MAX > 4) */
/*
* Declarations for various library functions and variables (don't want to
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index fcfd323..8ba0c5f 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -26,7 +26,7 @@ typedef struct {
int charOffset; /* The offset of the next char to retrieve. */
int byteOffset; /* The expected byte offset of the next
* chunk. */
- char buffer[TCL_UTF_MAX]; /* A buffer to hold part of a UTF character
+ char buffer[4]; /* A buffer to hold part of a UTF character
* that is split across chunks. */
char command[1]; /* Command to invoke. Actual space is
* allocated as large as necessary. This must