diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-07-07 21:39:46 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-07-07 21:39:46 (GMT) |
commit | c25e53f955ac3a82d34751ee485819e7aee3e004 (patch) | |
tree | dd0e6999d3cc94fda26a5344570dc8c417ab6d5e | |
parent | 81eebb1fe3cf4ab6f9ff196e22ab984d278db52e (diff) | |
download | tcl-c25e53f955ac3a82d34751ee485819e7aee3e004.zip tcl-c25e53f955ac3a82d34751ee485819e7aee3e004.tar.gz tcl-c25e53f955ac3a82d34751ee485819e7aee3e004.tar.bz2 |
* generic/tclCmdIL.c (InfoFrameCmd): Fixed unsafe idiom of setting
the interp result found by Don Porter.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2008-07-07 Andreas Kupries <andreask@activestate.com> + + * generic/tclCmdIL.c (InfoFrameCmd): Fixed unsafe idiom of setting + the interp result found by Don Porter. + 2008-07-07 Donal K. Fellows <donal.k.fellows@man.ac.uk> * doc/regexp.n, doc/regsub.n: Correct examples. [Bug 1982642] diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 5555c99..d895bf8 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.137.2.1 2008/06/16 20:44:31 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.137.2.2 2008/07/07 21:39:49 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1044,7 +1044,7 @@ InfoFrameCmd( int levels = (iPtr->cmdFramePtr == NULL ? 0 : iPtr->cmdFramePtr->level); - Tcl_SetIntObj(Tcl_GetObjResult(interp), levels); + Tcl_SetObjResult(interp, Tcl_NewIntObj (levels)); return TCL_OK; } else if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?number?"); |