Overview
| Artifact ID: | f8f70f9b47e1305c4ec46254c4a0dd5de867f074 |
|---|---|
| Ticket: | 3084489fffffffffffffffffffffffffffffffff
Serious issue: Tcl_DuplicateObj isn't making a copy? |
| User & Date: | ferrieux on 2010-10-10 20:10:21 |
Changes
- icomment:
Indeed that's an mk bug, but we have to admit that the Tcl core does nasty tricks with lists. Indeed, the List internal repr has its own level of refcounting, and the dupProc of the List type uses this to do as little work as reasonable: it only shares the internal rep, upping the refcount ! A secondary consequence is that (!Tcl_IsShared) does not allow to modify in place; the deeper test on listRepPtr->refCount is needed... As a result, all functions that do copy-on-write on lists *must* use more explicit duplication at the deeper level of intreps, eg by calling NewListIntRep. None of this is discussed in ListObj." by the way :(
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"