Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b4ad0b2c2de304aa021598e29529b44ba9501426
Ticket: 2965424fffffffffffffffffffffffffffffffff
Tcl_OOInitStubs has no version parameter
User & Date: nijtmans on 2010-03-08 13:08:51
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Compare the following:
       Tcl_InitStubs(interp, "8.5", 0)
    with
       Tcl_OOInitStubs(interp)
    
    The version parameter of XX_InitStubs means the
    lowest version supported by this extension. However,
    in TclOO this value is already filled in being TCLOO_VERSION,
    which is the "compiled-against" version.
    
    The problem with this is, when someone compiles an extension
    using TCLOO_VERSION = "0.6.3", but runs it with Tcl 8.6b1,
    the XXInitStubs call will  fail, even though it should run perfectly.
    
    There is a difference between the "lowest supported version",
    and the "compiled against" version. It should be possible to
    compile a TclOO extesion against TclOO 0.6.3 and run it
    using TclOO 0.6.2: As long as no 0.6.3-specific features are
    used (and the extension developer is the only one knowing
    this), everything should be fine.
    
    More specific, I suggest to change:
    #define Tcl_OOInitStubs(interp) \
    Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION,0)
    to
    #define Tcl_OOInitStubs(interp, version) \
    Tcl_PkgRequire((interp),"TclOO", version, 0)
    Maybe we should even have an "exact'
    parameter, just as the other *StubInit functions. 
    
    This needs to be coordinated with Itcl and tdbc,
    because it introduces a source incompatiblility!
    Binary compatibility is not affected, except for
    the "exact" parameter!
    
    B.T.W: Tdbc_InitStubs has the same problem, but
    Itcl_InitStubs is O.K.
    B.T.W.: Personally, I don't mind very much about the
    "exact' parameter, but I could imagine the desire
    to keep it exactly the same as Tcl.
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "7 High"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nijtmans"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "Tcl_OOInitStubs has no version parameter"
  12. type changed to: "Bug"