Overview
Artifact ID: | de53f700917d20876acdf2df0fa7ff138ba251d4 |
---|---|
Ticket: | 5edbc4a9f40bd2cfce24e291fc57dea51b7f1a50
It's not possible to manipulate complex data structures inside procs |
User & Date: | sebres 2015-09-04 08:24:08 |
Changes
- closedate changed to: "2457269.85009866"
- closer changed to: "sebres"
- icomment:
> it's not possible to make manipulations in place What did you mean here under manipulations? That is expected in tcl, that some "static" code objects has a refCount greater as 1, despite you see this object only once, because of interp/namespace literals, code compiling etc. Guaranteed refCount = 1 you're going to get, if it will be created and returned to interpreter inside any command, and will be used nowhere otherwise. Example: proc test {} { puts [::tcl::unsupported::representation [linsert {} end 1 2 3]] puts [::tcl::unsupported::representation [string tolower DATA]] } Furthermore you can always create a duplicate with refCount = 1, using function Tcl_DuplicateObj. Manipulation of object with refCount > 1 is allowed also, for example change to your own Tcl_ObjType (internal representation), but only if it string representation will be not changed or can be always regenerated to the same within your own Tcl_ObjType. An example for such "complex data structures" are objects contains file/channel/database "handles" etc. So long it's not clear as a bug, I will close this issue as invalid. Please provide more info if expected.
- login: "sebres"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"