Skip to content
Tcl Source Code History Of Ticket 540378ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 540378ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 540378ffffffffffffffffffffffffffffffffff

  1. Ticket change [15d2b67bd6] (rid 124627) by dgp on 2002-04-06 23:45:57:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      >From "Paul Duffin" <[email protected]>
      
      
      One thing that you can do in the meantime is make a
      slight modification
      to the Tcl_InitStubs function in tclStubLib.c which
      will allow you a
      lot of flexibility in how you do this.
      
      As you know Tcl_InitStubs initialises the global
      pointer tclStubPtr
      so that it points to Tcl's stub table. At the moment it
      uses the stub
      table pointer which is stored in the Interp structure,
      this should be
      changed to use the stub table pointer which is returned
      from
      Tcl_PkgRequireEx instead.
      
      This minor and totally compatible change needs to be
      done immediately
      as the Tcl_InitStubs function is embedded inside
      extensions so
      extensions will need to be rebuilt for the change to
      take effect.
      
      The benefit of doing this is that it would be possible
      to have multiple
      versions of the Tcl stub table in use at the same time,
      you could have
      an 8.1 version (because 8.0 does not have a stub table,
      :-( ), a 9.0
      version and a 10.0 version all at the same time.
      
      The only restriction on the table structure is that
      those functions
      which are used by Tcl_InitStubs (Tcl_PkgRequireEx) need
      to be in the
      same place in all the structures. You can totally
      restructure the
      rest of the table(s) to suit your needs. The backward
      compatible
      stub tables can be provided by dynamically loadable
      extensions.
      
      To enable this would obviously need some modifications
      to the
      package mechanism as it stands to allow multiple
      versions of a
      package to be loaded at one time, or at least allow
      compatability
      versions of a package to be loaded as well as the
      current version.
      These issues can be resolved at your leisure but the
      change to
      Tcl_InitStubs (and all the other _InitStubs functions)
      needs to
      be done now, otherwise you will not have the choice.
      
      Instead of
      
      char *
      Tcl_InitStubs (interp, version, exact)
          Tcl_Interp *interp;
          char *version;
          int exact;
      {
          char *actualVersion;
          TclStubs *tmp;
      
          if (!tclStubsPtr) {
      tclStubsPtr = HasStubSupport(interp);
      if (!tclStubsPtr) {
                  return NULL;
              }
          }
      
          actualVersion = Tcl_PkgRequireEx(interp, "Tcl",
      version, exact,
          (ClientData *) &tmp);
          if (actualVersion == NULL) {
      tclStubsPtr = NULL;
      return NULL;
          }
      
          if (tclStubsPtr->hooks) {
      tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
      tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
      tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
          } else {
      tclPlatStubsPtr = NULL;
      tclIntStubsPtr = NULL;
      tclIntPlatStubsPtr = NULL;
          }
      
          return actualVersion;
      }
      
      you need
      
      char *
      Tcl_InitStubs (interp, version, exact)
          Tcl_Interp *interp;
          char *version;
          int exact;
      {
          char *actualVersion;
      
          if (!tclStubsPtr) {
      tclStubsPtr = HasStubSupport(interp);
      if (!tclStubsPtr) {
                  return NULL;
              }
          }
      
          actualVersion = Tcl_PkgRequireEx(interp, "Tcl",
      version, exact,
          (ClientData *) &tclStubsPtr);
          if (actualVersion == NULL) {
      tclStubsPtr = NULL;
      return NULL;
          }
      
          if (tclStubsPtr->hooks) {
      tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
      tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
      tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
          } else {
      tclPlatStubsPtr = NULL;
      tclIntStubsPtr = NULL;
      tclIntPlatStubsPtr = NULL;
          }
      
          return actualVersion;
      }
      
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "39. Package Manager"
    10. title initialized to: "init stubs from PkgRequire, not interp"
    11. type initialized to: "RFE"
  2. Ticket change [4a6aa31e50] (rid 126533) by dgp on 2007-10-24 22:48:44:

    1. assignee changed to: "jenglish"
    2. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      jenglish, it appears that your
      2005-11-20 commit to tclStubLib.c
      had the effect of satisfying this
      Feature Request.  Can you confirm?
      
      That would indicate this feature
      is available in all stable Tcl
      releases 8.4.12 or later.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  3. Ticket change [d2f46720b7] (rid 113612) by jenglish on 2007-11-12 13:47:38:

    1. closedate changed to: "2007-11-12T06:47:38"
    2. closer changed to: "jenglish"
    3. icomment:
      Logged In: YES 
      user_id=68433
      Originator: NO
      
      Confirmed.
      
      
    4. login: "jenglish"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "jenglish"
  4. Ticket change [e90039b551] (rid 104736) by jenglish on 2010-04-03 05:24:22:

    1. icomment:
      Since this has recently come up again, I hasten to add: this is Not A Good Idea.
      
      Explicitly: the meat of the original FR is:
      
      |  The benefit of doing this is that it would be possible to have multiple versions 
      | of the Tcl stub table in use at the same time.
      
      This Is Not A Good Idea.
      
      Just because we *can* do something doesn't mean we *should*.
      
      There is no  "benefit" to having multiple versions of the Tcl stub table available in a single process.  In fact I'd go so far as to say that anybody who seriously wants this purportedly proposed misfeature is just begging to be thrown into the bottom of the pit of what is affectionately known as "DLL Hell" for the sole purpose of digging themselves a brand new, deeper and more painful level.
      
      That would be a Bad Idea.
      
      
    2. login: "jenglish"
    3. mimetype: "text/plain"
    4. username: "jenglish"