Index: xotcl/ChangeLog =================================================================== diff -u -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd --- xotcl/ChangeLog (.../ChangeLog) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) +++ xotcl/ChangeLog (.../ChangeLog) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) @@ -1,3 +1,7 @@ +2004-11-20 Gustaf.Neumann@wu-wien.ac.at + * fixed [self callinglevel] in nested uplevel loops + in the presence of filters, extended regression test + 2004-11-19 Uwe Zdun * fixed bug: empty non-pos args, double dash alone. Thanks to Bryan Schofield for reporting this bug. Index: xotcl/Makefile =================================================================== diff -u -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd --- xotcl/Makefile (.../Makefile) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) +++ xotcl/Makefile (.../Makefile) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile,v 1.26 2004/11/19 22:59:37 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.27 2004/11/20 18:54:34 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -120,7 +120,7 @@ PACKAGE_NAME = xotcl PACKAGE_VERSION = 1.3.3 CC = gcc -pipe -CFLAGS_DEFAULT = -O +CFLAGS_DEFAULT = -O -g CFLAGS_WARNING = -Wall -Wconversion -Wno-implicit-int CLEANFILES = *.o *.a *.so *~ core gmon.out config.* EXEEXT = Index: xotcl/doc/xo-daemon.html =================================================================== diff -u -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd --- xotcl/doc/xo-daemon.html (.../xo-daemon.html) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) +++ xotcl/doc/xo-daemon.html (.../xo-daemon.html) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) @@ -76,7 +76,7 @@ Date: - [::xotcl::rcs date {$Date: 2004/11/19 22:59:37 $}] + [::xotcl::rcs date {$Date: 2004/11/20 18:54:34 $}] Index: xotcl/doc/xo-whichPkg.html =================================================================== diff -u -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd --- xotcl/doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) +++ xotcl/doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) @@ -52,7 +52,7 @@ Date: - [::xotcl::rcs date {$Date: 2004/11/19 22:59:37 $}] + [::xotcl::rcs date {$Date: 2004/11/20 18:54:34 $}] Index: xotcl/generic/xotcl.c =================================================================== diff -u -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd --- xotcl/generic/xotcl.c (.../xotcl.c) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) +++ xotcl/generic/xotcl.c (.../xotcl.c) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) @@ -1,4 +1,4 @@ -/* $Id: xotcl.c,v 1.31 2004/11/19 22:59:37 neumann Exp $ +/* $Id: xotcl.c,v 1.32 2004/11/20 18:54:34 neumann Exp $ * * XOTcl - Extended OTcl * @@ -1737,8 +1737,12 @@ if (offset) offset--; else { - if (!deeper || Tcl_CallFrame_level(csc->currentFramePtr) != topLevel) + if (!deeper) { return csc; + } + if (csc->currentFramePtr && Tcl_CallFrame_level(csc->currentFramePtr) < topLevel) { + return csc; + } } } /* for some reasons, we could not find invocation (topLevel, destroy) */ @@ -5520,10 +5524,7 @@ char buffer[LONG_AS_STRING]; int l; buffer[0] = '#'; - /* - if (Tcl_CallFrame_callerVarPtr(csc->currentFramePtr)) { - cf = Tcl_CallFrame_callerVarPtr(csc->currentFramePtr); - }*/ + /* fprintf(stderr,"*** csc=%p\n",csc);*/ XOTcl_ltoa(buffer+1,(long)Tcl_CallFrame_level(csc->currentFramePtr),&l); resultObj = Tcl_NewStringObj(buffer,l+1); } else { Index: xotcl/tests/testx.xotcl =================================================================== diff -u -r3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123 -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd --- xotcl/tests/testx.xotcl (.../testx.xotcl) (revision 3eed8eb06e3bcc8a17de2d9d130f0caae5ea4123) +++ xotcl/tests/testx.xotcl (.../testx.xotcl) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) @@ -1,4 +1,4 @@ -#$Id: testx.xotcl,v 1.21 2004/11/19 22:59:37 neumann Exp $ +#$Id: testx.xotcl,v 1.22 2004/11/20 18:54:34 neumann Exp $ package require XOTcl namespace import -force xotcl::* @@ -3434,11 +3434,16 @@ #puts "Total = $i" return $i } + Object instproc f args {next} Test t errorCheck [t loop1] 3 "uplevel eval loop" errorCheck [t loop2] 12 "nested uplevel eval loop" + t filter f + errorCheck [t loop1] 3 "uplevel eval loop" + errorCheck [t loop2] 12 "nested uplevel eval loop" + t destroy return "PASSED [self]" }