From 8e7b0459fe6011676a85f83cddada3b34aa4e8e9 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 4 Jul 2012 13:41:14 +0000 Subject: only use public API in loaded packages; oops\! --- win/tclWinReg.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 10437e6..565188c 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -1316,16 +1316,15 @@ SetValue( Tcl_DStringInit(&data); for (i = 0; i < objc; i++) { - TclDStringAppendObj(&data, objv[i]); + const char *bytes = Tcl_GetStringFromObj(objv[i], &length); + + Tcl_DStringAppend(&data, bytes, length); /* - * Add a null character to separate this value from the next. We - * accomplish this by growing the string by one byte. Since the - * DString always tacks on an extra null byte, the new byte will - * already be set to null. + * Add a null character to separate this value from the next. */ - Tcl_DStringSetLength(&data, Tcl_DStringLength(&data)+1); + Tcl_DStringAppend(&data, "", 1); /* NUL-terminated string */ } Tcl_WinUtfToTChar(Tcl_DStringValue(&data), Tcl_DStringLength(&data)+1, -- cgit v0.12