Overview
| Artifact ID: | 5dd9a99286b458fd8304b71f2295ffd8334e5779 |
|---|---|
| Ticket: | 2507159fffffffffffffffffffffffffffffffff
Tcl_Command validity management |
| User & Date: | dgp on 2009-01-15 02:08:23 |
Changes
- icomment:
One idea how callers might deal with the current situation. Rather than directly store a Tcl_Command, arrange to store an unshared Tcl_Obj and use Tcl_GetCommandFromObj() to manipulate it into the "cmdName" Tcl_ObjType. The intrep management builtin to that Tcl_ObjType will take care of the Command refCounts to keep the struct alive. Whenever the Tcl_Command value is needed, another call to Tcl_GetCommandFromObj() will fetch it. When really done with the value, just Tcl_DecrRefCount to make the Tcl_Obj and its intrep go away. There's probably still some ugliness on how to handle renames. Hmmm....
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"