From 21901763f1b2265d4cd44100b084ab75ccf8d342 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 18 Apr 2002 18:05:55 +0000 Subject: [Bug 545325 ] info level didn't report namespace eval. --- ChangeLog | 6 ++++++ generic/tclNamesp.c | 10 ++++++---- tests/info.test | 7 ++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01381bc..80c19d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-04-18 Miguel Sofer + + * generic/tclNamesp.c: + * tests/info.test: [Bug 545325 ] info level didn't report + namespace eval, bug report by Richard Suchenwirth. + 2002-04-18 Don Porter * doc/subst.n: Clarified documentation on handling unusual return diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index da0df83..eaad5df 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.29 2002/02/28 20:11:09 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.30 2002/04/18 18:05:57 msofer Exp $ */ #include "tclInt.h" @@ -2928,7 +2928,7 @@ NamespaceEvalCmd(dummy, interp, objc, objv) Tcl_Obj *CONST objv[]; /* Argument objects. */ { Tcl_Namespace *namespacePtr; - Tcl_CallFrame frame; + CallFrame frame; Tcl_Obj *objPtr; char *name; int length, result; @@ -2966,11 +2966,13 @@ NamespaceEvalCmd(dummy, interp, objc, objv) * the command(s). */ - result = Tcl_PushCallFrame(interp, &frame, namespacePtr, - /*isProcCallFrame*/ 0); + result = Tcl_PushCallFrame(interp, (Tcl_CallFrame *) &frame, + namespacePtr, /*isProcCallFrame*/ 0); if (result != TCL_OK) { return TCL_ERROR; } + frame.objc = objc; + frame.objv = objv; /* ref counts do not need to be incremented here */ if (objc == 4) { result = Tcl_EvalObjEx(interp, objv[3], 0); diff --git a/tests/info.test b/tests/info.test index 0e209fc..801df6f 100644 --- a/tests/info.test +++ b/tests/info.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.19 2002/04/18 14:12:07 dkf Exp $ +# RCS: @(#) $Id: info.test,v 1.20 2002/04/18 18:05:59 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -338,6 +338,11 @@ test info-9.9 {info level option} { proc t1 {x} {info level $x} list [catch {t1 -3} msg] $msg } {1 {bad level "-3"}} +test info-9.10 {info level option, namespaces} { + set msg [namespace eval t {info level 0}] + namespace delete t + set msg +} {namespace eval t {info level 0}} set savedLibrary $tcl_library test info-10.1 {info library option} { -- cgit v0.12