Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ca61af88e89fb9f5801a652a858a9cfcc76e0cb1
Ticket: 217893ffffffffffffffffffffffffffffffffff
shells and custom Stubs tables
User & Date: nobody on 2000-10-26 00:45:32
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2489 RFE
    Version: 8.2b1
    SubmitDate: '1999-08-03'
    LastModified: '1999-12-09'
    Severity: SER
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    RelatedBugIDs: 2517
    OS: Windows NT
    OSVersion: 4.0 sp5
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '1999-12-09'
    
    
    Name:
    David Gravereaux
    
    Comments:
    Create a Stubs table for your own extension.  Then make another
        extension based from the first using it's Stub table.  Then make a shell
        for that one and look closely at the architecture.  Stubs falls to
        pieces at level 2.  Removing the implicit link to tclxx.dll for the
        shell will solve this completely.
    
    DesiredBehavior:
    The use of Stubs tables in extensions has a limited growth.
        
        I recently worked on [incr Tcl] giving it's own Stubs table so I could
        use it in 8.1+ and discovered a very bad architecure problem that needs
        attention.
        
        When using a custom Stubs table to create a second extension, a shell
        cannot be created because of a circular dependency around
        Tcl_PkgRequireEx.  The shell itself is linked to the tclXX.dll as an
        import for implicit linking at load-time.  The problem is that the
        <pkg>StubsLib.c (of the first extension) was properly compiled with
        -DUSE_TCL_STUBS so the second extension could use it's functions.  Yet,
        when linking a shell, there is no tclStubsPtr variable that the redefine
        of Tcl_PkgRequireEx can resolve to.  Nor is it shown in tclAppInit.c
        (the shell template) how this situation is supposed to be managed.
        
        If shells are not supposed to use custom Stubs tables and link as an
        import, then ALL extensions will have to reside in Tcl's bin directory.
        
        If shells are to use custom Stubs tables (and they sure should for the
        benifits), then a solution to the circularity problem of how to handle
        the Tcl_PkgRequireEx call for the extension's <pkg>stubs.lib should be
        looked into.
        
        Compiling the first's <pkg>StubLib.c without the USE_TCL_STUBS define
        just for the shell link would work, but this still leads back to method
        that shells are connected to tcl as being incorrect for growth.
        
        Personally, I'm in favor of a dynamic loading mechanism so that tclsh
        uses the Tcl Stubs table.
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.2b1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "shells and custom Stubs tables"
  11. type changed to: "Bug"