diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-08 08:59:32 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-08 08:59:32 (GMT) |
commit | a00c70241d676e238f275f3cd0265f2c5470ee7d (patch) | |
tree | ff66eb52b929bb532fe52f8cac03ce16ce0a8781 /doc/AddErrInfo.3 | |
parent | 9c3e75d3d4c2a5b80155880c80b8f204cf88c896 (diff) | |
parent | 4b85ca90cba7edb9a10caead17ffa8d407e1e2b3 (diff) | |
download | tcl-a00c70241d676e238f275f3cd0265f2c5470ee7d.zip tcl-a00c70241d676e238f275f3cd0265f2c5470ee7d.tar.gz tcl-a00c70241d676e238f275f3cd0265f2c5470ee7d.tar.bz2 |
merge from trunk
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 |