Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8cce4be67b4a8fe93ed5542f96c5c1877a725e1d
Ticket: 1016167fffffffffffffffffffffffffffffffff
[after] overwrites its imports
User & Date: dgp on 2004-08-26 01:30:06
Changes

  1. icomment:
    
    
    File Added - 99158: 1016167.patch
    
    Logged In: YES 
    user_id=80530
    
    
    Attached patch corrects this specific
    instance of the bug.
    
    Note that it makes use of the
    internal routine TclGetOriginalCommand
    to do so.
    
    Another fix would be to store [after]'s
    data directy in an Interp field, rather than
    in assocData and clientData (would also
    require internals privilege).
    
    Only fix that would be available to 
    extensions would be to arrange for
    the Tcl_CreateObjCommand call
    that creates [after] to pass in a real
    ClientData value that allows space
    for mods on the fly.  That fix would
    also take care of any other 
    C-based wrappers, that, like [namespace
    import], lead to the result of
    Tcl_GetCommandFromObj(objv[0]) not
    being the struct that holds the current
    clientData.  There appears to be no
    generally reliable way for a Tcl_ObjCmdProc
    to get at the Tcl_CmdInfo of the command
    currently being dispatched.  In order to
    write to the ClientData, it needs to be
    originally set up with space to write on.
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"