summaryrefslogtreecommitdiffstats
path: root/win/tkWinInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-10 21:03:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-10 21:03:59 (GMT)
commitbd2618f68e0532440f3e927439e16c62f3a54d09 (patch)
tree1633caca9c01f0f5582942d71d7435b014635f83 /win/tkWinInit.c
parent66faab2bdc539d97fbb7a3834e8271555a36759d (diff)
downloadtk-bd2618f68e0532440f3e927439e16c62f3a54d09.zip
tk-bd2618f68e0532440f3e927439e16c62f3a54d09.tar.gz
tk-bd2618f68e0532440f3e927439e16c62f3a54d09.tar.bz2
Eliminate on Windows all usages of Tcl_WinUtfToTChar() and Tcl_WinTCharToUtf(). Proving the point of this TIP.
Diffstat (limited to 'win/tkWinInit.c')
-rw-r--r--win/tkWinInit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index 780888a..9add471 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.c
@@ -199,7 +199,8 @@ TkWin32ErrorObj(
}
#ifdef _UNICODE
- Tcl_WinTCharToUtf(lpBuffer, wcslen(lpBuffer) * sizeof (WCHAR), &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_UniCharToUtfDString(lpBuffer, wcslen(lpBuffer), &ds);
errPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
#else