diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-02-21 10:25:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-02-21 10:25:45 (GMT) |
commit | a29f7495fe20e757ec0f9228242764327a3f83e4 (patch) | |
tree | a7cb8c82b5a74a7d1a873366b73a4df45268ab33 /doc/AddErrInfo.3 | |
parent | c332a09603e23b0c6fe0a7267964c80bce497f1e (diff) | |
download | tcl-a29f7495fe20e757ec0f9228242764327a3f83e4.zip tcl-a29f7495fe20e757ec0f9228242764327a3f83e4.tar.gz tcl-a29f7495fe20e757ec0f9228242764327a3f83e4.tar.bz2 |
Documentation clarification, as discussed in [Bug 3482614].
Diffstat (limited to 'doc/AddErrInfo.3')
-rw-r--r-- | doc/AddErrInfo.3 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index 4087b41..e450a3e 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -108,6 +108,11 @@ by \fBTcl_GetReturnOptions\fR points to an unshared \fBTcl_Obj\fR with reference count of zero. The dictionary may be written to, either adding, removing, or overwriting any entries in it, without the need to check for a shared object. +As with any \fBTcl_Obj\fR with reference count of zero, it is up to +the caller to arrange for its disposal with \fBTcl_DecrRefCount\fR or +to a reference to it via \fBTcl_IncrRefCount\fR (or one of the many +functions that call that, notably including \fBTcl_SetObjResult\fR and +\fBTcl_SetVar2Ex\fR). .PP A typical usage for \fBTcl_GetReturnOptions\fR is to retrieve the stack trace when script evaluation returns @@ -123,6 +128,7 @@ if (code == TCL_ERROR) { Tcl_DictObjGet(NULL, options, key, &stackTrace); Tcl_DecrRefCount(key); /* Do something with stackTrace */ + Tcl_DecrRefCount(options); } .CE .PP |