Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fffbbf8e977b97e99e4f8abd6e47c3721e96ccb1
Ticket: 3029891fffffffffffffffffffffffffffffffff
Functions that don't belong in the stub table
User & Date: nijtmans on 2010-07-15 09:44:48
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    As follow-up of #1055668, it's clear that Tcl_Main
    does not belong in the stub table, but there are
    more like that:
    In Tcl, the following functions are only meant to be used
    in tclAppInit.c, and are problematic when compiled with
    USE_TCL_STUBS:  Tcl_FindExecutable and
    Tcl_StaticPackage
    
    In Tk: Tk_MainEx, Tk_Init, Tk_SafeInit and
    Tk_CreateConsoleWindow
    
    Then there are 3 functions in Tcl that can be
    used from tclAppInit.c, and are used through
    the stub table as well: Tcl_CreateInterp,
    Tcl_Init and Tcl_SetVar. Currently there is
    no other way than #undef TCL_USE_STUBS
    in xxxAppInit.c, but I suggest to redefine the
    stub macros a little bit as below. This way,
    we can use (Tcl_CreateInterp)() when we
    don't want to use stubs and Tcl_CreateInterp()
    otherwise. Apart from that, everything functions
    as before.
    
    Best would be to remove the said functions
    from the stub table, but less dangerous is just
    disable the stub usage. That can be done by
    putting the following at the end of tclDecls.h:
    
    #undef Tcl_CreateInterp
    #undef Tcl_FindExecutable
    #undef Tcl_Init
    #undef Tcl_SetVar
    #undef Tcl_StaticPackage
    #if defined(USE_TCL_STUBS)
    #   define Tcl_CreateInterp() (tclStubsPtr->tcl_CreateInterp())
    #   define Tcl_Init(interp) (tclStubsPtr->tcl_Init(interp))
    #   define Tcl_SetVar(interp, varName, newValue, flags) \
    (tclStubsPtr->tcl_SetVar(interp, varName, newValue, flags))
    #endif
    
    At the end of tkDecls.h:
    #undef Tk_MainEx
    #undef Tk_Init
    #undef Tk_SafeInit
    #undef Tk_CreateConsoleWindow
    
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nijtmans"
  10. subsystem changed to: "50. Embedding Support"
  11. title changed to: "Functions that don't belong in the stub table"
  12. type changed to: "Bug"