diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-04 13:41:14 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-04 13:41:14 (GMT) |
commit | ea8dfc429f89bd1332ea57a3494d9dde638296fa (patch) | |
tree | d4d7483235952e765ef7d6320705567fc1a9f650 /win | |
parent | afcb6fb00b921c929e09627a60fbcd16d77ac565 (diff) | |
download | tcl-ea8dfc429f89bd1332ea57a3494d9dde638296fa.zip tcl-ea8dfc429f89bd1332ea57a3494d9dde638296fa.tar.gz tcl-ea8dfc429f89bd1332ea57a3494d9dde638296fa.tar.bz2 |
only use public API in loaded packages; oops\!
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinReg.c | 11 |
1 files 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, |