Skip to content
Tcl Source Code History Of Ticket 1557574
Login

History Of Ticket 1557574

Artifacts Associated With Ticket 1557574

  1. Ticket change [7a64f7638b] (rid 90309) by nobody on 2006-09-13 02:02:42:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Although it is easy to create an interpreter from C code that doesn't run 
      Tcl_Init on that interpreter, an [interp] command always runs Tcl_Init on 
      the new interpreter.  Although there's TclSetPreInitScript, which can 
      override loading the library by creating a proc tclInit, there's no direct way 
      to have your own C function called when a new interpreter is created.
      
      Proposed: Tcl_SetInitProc()
      
      By default, it would be set to Tcl_Init, but calling SetInitProc would 
      override that when slave interpreters are created.  The proc that is called 
      could still call Tcl_Init itself, and the AppInitProc would presumably call 
      it's own init proc and SetInitProc as needed.
      
      An example of what this could be used for is, I want to override the exit 
      command to set a flag for a mainloop procedure to exit, rather than exit 
      the process (a TCL_EXIT return code which would make Tcl_Main exit 
      would also be needed, but that's a different subject).
      
      I can easily do that in the first interpreter I create, but a slave interpreter 
      can still execute the original exit command and the process quits instead 
      of leaving me in control.  There are, of course, many other uses for 
      something like this, I'm not looking for workarounds for any one specific 
      issue.
      
      [email protected]
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "nobody"
    10. subsystem initialized to: "38. Init - Library - Autoload"
    11. title initialized to: "Add Tcl_SetInitProc()"
    12. type initialized to: "RFE"
  2. Ticket change [83c0572e38] (rid 117432) by dgp on 2007-09-06 04:52:18:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      
      see also 1523878
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"