Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: eb503f31e6698e2bdd490284395ed7aca00aa5ea66ed3d7e0ae16ac6cd780371
Ticket: 16fe1b5807820bb9705b460959f459989ec06404
namespace ensemble command named ":" is mistakenly given the empty string as its name
User & Date: pooryorick on 2017-11-18 21:04:04
Changes

  1. icomment:
    Fixed in [b433ae397cddec65].
    
    The issue was that <code>namespace.c/NsEnsembleImplementationCmdNR</code>,
    which is responsible for resolving aned evaluating namespace ensemble commands,
    [https://core.tcl.tk/tcl/artifact?ln=1735&name=9cf6780328312995|calls
    BuildEnsembleConfig] , which
    [https://core.tcl.tk/tcl/artifact?ln=2640&name=9cf6780328312995|slaps together]
    a fully-qualified name for an exported command.
    
    I modified <code>BuildEnsembleConfig</code>
    [https://core.tcl.tk/tcl/artifact?ln=2671,2679=on&name=e41dd54b9eb45fca|to stop
    building up fully-qualified names], and then modified
    <code>NsEnsembleImplementationCmdNR</code>
    [https://core.tcl.tk/tcl/artifact?ln=1924,1925&name=e41dd54b9eb45fca|to use the
    namespace for comand lookup] rather than using a fully-qualified name.
    
    On the "front end", I relieved <code>TclProcObjCmd</code>
    [https://core.tcl.tk/tcl/artifact?ln=144-145&name=0be3006f576cb9aa|of the
    duty of slapping together a fully-qualified name], and created
    [https://core.tcl.tk/tcl/artifact?ln=8213-8226&name=e33d6838e61d9a4f|tclNRCreateCommandInNs]
    for it to call instead of calling <code>tclNRCreateCommand</code>, which
    doesn't accept a namespace.  This in turn required the creation of
    [https://core.tcl.tk/tcl/artifact?ln=2288&name=e33d6838e61d9a4f|tclCreateObjectCommandInNs],
    and
    [https://core.tcl.tk/tcl/artifact?ln=2237&name=e33d6838e61d9a4f|Tcl_CreateObjCommand]
    becomes a thin wrapper over that.
    
    [https://core.tcl.tk/tcl/artifact?ln=2427&name=d80559c9d6db894d|TclEnsureNamespace]
    is a new utility command that, given a namespace, either returns that
    namespace, or if that namespace is in a deleted state, returns a new namespace
    in its place.
    
  2. login: "pooryorick"
  3. mimetype: "text/x-fossil-wiki"