Overview
| Artifact ID: | d6549d64dab8c65fd4263da032a9f451a6886539 |
|---|---|
| Ticket: | 3169173fffffffffffffffffffffffffffffffff
crosstalk between arrays |
| User & Date: | sehmann on 2011-02-01 02:02:39 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
It seems like there is some sort of cross talk between arrays. we are trying to upgrade our system from 8.4.9 to 8.5.9 and this is a blocker. proc test {} { array set foo "" array set bar "" set foo(b) a set bar(a) b foreach i [array names bar] { puts "$i : [otype $i]" } set l {} foreach {i j} [array get foo] { foreach k $j { lappend k $l } } foreach i [array names bar] { puts "$i : [otype $i]" } } test Output: a : string a : list array names is returning an element that is a list! Does not happen if we don't use the "test" proc. otype is a C function we wrote to print the type of the object and is implemented like this: if ( obj->typePtr ) { char* typeName = obj->typePtr->name; Tcl_SetResult(interp, typeName, TCL_VOLATILE); } else if ( obj->bytes ) { Tcl_SetResult(interp, (char*)"string", TCL_STATIC); } else { Tcl_SetResult(interp, (char*)"unknown", TCL_STATIC); } - foundin changed to: "obsolete: 8.5.9"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "sehmann"
- subsystem changed to: "10. Objects"
- title changed to: "crosstalk between arrays"
- type changed to: "Bug"