diff options
author | dgp <dgp@users.sourceforge.net> | 2008-02-29 21:02:17 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-02-29 21:02:17 (GMT) |
commit | 538a92af4c40dae91012d0a2aacbee52a9ff86ca (patch) | |
tree | 4442cd726274b0a3f8231e11daaea173a6533e60 /generic/tclResult.c | |
parent | f971bc37c350f55dfdd2ed65cf406aa4e81feb9e (diff) | |
download | tcl-538a92af4c40dae91012d0a2aacbee52a9ff86ca.zip tcl-538a92af4c40dae91012d0a2aacbee52a9ff86ca.tar.gz tcl-538a92af4c40dae91012d0a2aacbee52a9ff86ca.tar.bz2 |
* generic/tclResult.c (Tcl_SetReturnOptions): Revised the refcount
management of Tcl_SetReturnOptions to become that of a conventional
Consumer routine. Thanks to Peter Spjuth for pointing out the
difficulties calling Tcl_SetReturnOptions with non-0-count value for
options.
* generic/tclExecute.c (INST_RETURN_STK): Revised the one caller
within Tcl itself which passes a non-0-count value to
Tcl_SetReturnOptions().
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r-- | generic/tclResult.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c index e000a19..f9ef5b6 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.45 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.46 2008/02/29 21:02:20 dgp Exp $ */ #include "tclInt.h" @@ -1494,6 +1494,7 @@ Tcl_SetReturnOptions( int objc, level, code; Tcl_Obj **objv, *mergedOpts; + Tcl_IncrRefCount(options); if (TCL_ERROR == TclListObjGetElements(interp, options, &objc, &objv) || (objc % 2)) { Tcl_ResetResult(interp); |