summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-04 07:09:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-04 07:09:40 (GMT)
commit9dee089fa2567d307056363c20eb69c53b4e1655 (patch)
treef601a0cf95af6e9aeea8f330063f37565515f418 /generic/tclZlib.c
parent6de91b6b7d469c5f8d511700b75689df23e43fd1 (diff)
parentd3104ac52bdca1849c62445954323c841fcd5009 (diff)
downloadtcl-9dee089fa2567d307056363c20eb69c53b4e1655.zip
tcl-9dee089fa2567d307056363c20eb69c53b4e1655.tar.gz
tcl-9dee089fa2567d307056363c20eb69c53b4e1655.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index c96594d..a4ce05b 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -766,9 +766,8 @@ Tcl_ZlibStreamInit(
goto error;
}
Tcl_DStringInit(&cmdname);
- Tcl_DStringAppend(&cmdname, "::tcl::zlib::streamcmd_", -1);
- Tcl_DStringAppend(&cmdname, Tcl_GetString(Tcl_GetObjResult(interp)),
- -1);
+ TclDStringAppendLiteral(&cmdname, "::tcl::zlib::streamcmd_");
+ TclDStringAppendObj(&cmdname, Tcl_GetObjResult(interp));
if (Tcl_GetCommandInfo(interp, Tcl_DStringValue(&cmdname),
&cmdinfo) == 1) {
Tcl_SetResult(interp,
@@ -3337,10 +3336,7 @@ ZlibTransformGetOption(
Tcl_DStringAppendElement(dsPtr, Tcl_GetString(tmpObj));
Tcl_DecrRefCount(tmpObj);
} else {
- int len;
- const char *str = Tcl_GetStringFromObj(tmpObj, &len);
-
- Tcl_DStringAppend(dsPtr, str, len);
+ TclDStringAppendObj(dsPtr, tmpObj);
Tcl_DecrRefCount(tmpObj);
return TCL_OK;
}
@@ -3698,7 +3694,7 @@ ResultCopy(
*/
memcpy(buf, Tcl_DStringValue(&cd->decompressed), have);
- Tcl_DStringSetLength(&cd->decompressed, 0);
+ TclDStringClear(&cd->decompressed);
return have;
}
}