summaryrefslogtreecommitdiffstats
path: root/doc/StringObj.3
diff options
context:
space:
mode:
authorandy <andrew.m.goth@gmail.com>2014-06-04 21:45:29 (GMT)
committerandy <andrew.m.goth@gmail.com>2014-06-04 21:45:29 (GMT)
commit852f44abf1e24dce23b456d6cfa857bb5649300e (patch)
treeda8480903a40a55052793065fbae1fe245096132 /doc/StringObj.3
parent963ac8c936a669b6d0d9769e53dcd4ff161a9866 (diff)
downloadtcl-852f44abf1e24dce23b456d6cfa857bb5649300e.zip
tcl-852f44abf1e24dce23b456d6cfa857bb5649300e.tar.gz
tcl-852f44abf1e24dce23b456d6cfa857bb5649300e.tar.bz2
Add missing calls to Tcl_DecrRefCount() in string object man page examples.
Diffstat (limited to 'doc/StringObj.3')
-rw-r--r--doc/StringObj.35
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index d81f23d..cf8f6d3 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -293,6 +293,7 @@ of \fBTcl_Format\fR with functionality equivalent to:
Tcl_Obj *newPtr = \fBTcl_Format\fR(interp, format, objc, objv);
if (newPtr == NULL) return TCL_ERROR;
\fBTcl_AppendObjToObj\fR(objPtr, newPtr);
+\fBTcl_DecrRefCount\fR(newPtr);
return TCL_OK;
.CE
.PP
@@ -337,7 +338,9 @@ Compile-time protection may be provided by some compilers.
of \fBTcl_ObjPrintf\fR with functionality equivalent to
.PP
.CS
-\fBTcl_AppendObjToObj\fR(objPtr, \fBTcl_ObjPrintf\fR(format, ...));
+Tcl_Obj *newPtr = \fBTcl_ObjPrintf\fR(format, ...);
+\fBTcl_AppendObjToObj\fR(objPtr, newPtr);
+\fBTcl_DecrRefCount\fR(newPtr);
.CE
.PP
but with greater convenience and efficiency when the appending