Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | * tests/interp.test: * generic/tclInterp.c (AliasObjCmd): Changed so aliases are invoked at current scope in the target interpreter instead of at the global scope. This was an incompatibility introduced in 8.1 that is being removed. [Bug: 1153, 1556] |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | core-8-1-branch-old |
Files: | files | file ages | folders |
SHA1: |
27603c3b069d07d206fd8ed3627634a3 |
User & Date: | stanton 1999-03-26 02:24:45.000 |
Context
1999-03-26
| ||
19:13 | -now all test files that skip tests by returning early (which ideally they shouldn't do) call ::t... check-in: 4c4431ec5e user: hershey tags: core-8-1-branch-old | |
02:24 | * tests/interp.test: * generic/tclInterp.c (AliasObjCmd): Changed so aliases are invoked at current ... check-in: 27603c3b06 user: stanton tags: core-8-1-branch-old | |
00:29 | "genWinImage.tcl" is now a bit more informative about what it created. Minor tweak to "tcl.wse.in" t... check-in: c7c062771e user: suresh tags: core-8-1-branch-old | |
Changes
Changes to generic/tclInterp.c.
1 2 3 4 5 6 7 8 9 10 11 | /* * tclInterp.c -- * * This file implements the "interp" command which allows creation * and manipulation of Tcl interpreters from within Tcl scripts. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /* * tclInterp.c -- * * This file implements the "interp" command which allows creation * and manipulation of Tcl interpreters from within Tcl scripts. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclInterp.c,v 1.1.2.11 1999/03/26 02:24:45 stanton Exp $ */ #include <stdio.h> #include "tclInt.h" #include "tclPort.h" /* |
︙ | ︙ | |||
1402 1403 1404 1405 1406 1407 1408 | * in the target interp's global namespace. */ Tcl_ListObjGetElements(NULL, aliasPtr->prefixPtr, &prefc, &prefv); cmdPtr = Tcl_NewListObj(prefc, prefv); Tcl_ListObjReplace(NULL, cmdPtr, prefc, 0, objc - 1, objv + 1); Tcl_ListObjGetElements(NULL, cmdPtr, &cmdc, &cmdv); | | | 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 | * in the target interp's global namespace. */ Tcl_ListObjGetElements(NULL, aliasPtr->prefixPtr, &prefc, &prefv); cmdPtr = Tcl_NewListObj(prefc, prefv); Tcl_ListObjReplace(NULL, cmdPtr, prefc, 0, objc - 1, objv + 1); Tcl_ListObjGetElements(NULL, cmdPtr, &cmdc, &cmdv); result = TclObjInvoke(targetInterp, cmdc, cmdv, TCL_INVOKE_NO_TRACEBACK); Tcl_DecrRefCount(cmdPtr); ((Interp *) targetInterp)->numLevels--; /* * Check if we are at the bottom of the stack for the target interpreter. |
︙ | ︙ |
Changes to tests/interp.test.
1 2 3 4 5 6 7 8 9 10 11 12 | # This file tests the multiple interpreter facility of Tcl # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # This file tests the multiple interpreter facility of Tcl # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: interp.test,v 1.1.2.9 1999/03/26 02:24:46 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] } # The set of hidden commands is platform dependent: |
︙ | ︙ | |||
2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | # This test dumps core in Tcl 8.0.3! test interp-30.1 {deletion of aliases inside namespaces} { set i [interp create] $i alias ns::cmd list $i alias ns::cmd {} } {} # cleanup foreach i [interp slaves] { interp delete $i } ::tcltest::cleanupTests return | > > > > > > > > > > > > > > > > > > < < < < < < < < < < < < | 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 | # This test dumps core in Tcl 8.0.3! test interp-30.1 {deletion of aliases inside namespaces} { set i [interp create] $i alias ns::cmd list $i alias ns::cmd {} } {} test interp-31.1 {alias invocation scope} { proc mySet {varName value} { upvar 1 $varName localVar set localVar $value } interp alias {} myNewSet {} mySet proc testMyNewSet {value} { myNewSet a $value return $a } catch {unset a} set result [testMyNewSet "ok"] rename testMyNewSet {} rename mySet {} set result } ok # cleanup foreach i [interp slaves] { interp delete $i } ::tcltest::cleanupTests return |