Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 13f0da04276c8117adef30f336493afa8ecac706
Ticket: 218563ffffffffffffffffffffffffffffffffff
TclSetPreInitScript function missing
User & Date: nobody on 2000-10-26 01:02:20
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1128 Bug
    Version: 8.1b1
    SubmitDate: '1999-01-29'
    LastModified: '1999-04-05'
    Severity: SER
    Status: Released
    Submitter: welch
    ChangedBy: stanton
    OS: Windows NT
    Machine: X86
    FixedDate: '1999-04-05'
    FixedInVersion: 8.1b3
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Jan Nijtmans
    
    
    DesiredBehavior:
    
    The 'secret' TclSetPreInitScript() function from Tcl8.0.4, which
    
    is a key function for TclPro wrapper, is not implemented
    
    yet in Tcl8.1b1.
    
    
    Patch:
    
    *** generic/tclInitScript.h.origTue Jan 19 23:03:24 1999
    
    --- generic/tclInitScript.hTue Jan 19 23:05:58 1999
    
    ***************
    
    *** 45,47 ****
    
    --- 45,81 ----
    
      }\n\
    
      tclInit";
    
    
    + /*
    
    +  * A pointer to a string that holds an initialization script that if non-NULL
    
    +  * is evaluated in Tcl_Init() prior to the the built-in initialization script
    
    +  * above.  This variable can be modified by the procedure below.
    
    +  */
    
    +  
    
    + static char *          tclPreInitScript = NULL;
    
    + 
    
    + 
    
    + /*
    
    +  *----------------------------------------------------------------------
    
    +  *
    
    +  * TclSetPreInitScript --
    
    +  *
    
    +  *This routine is used to change the value of the internal
    
    +  *variable, tclPreInitScript.
    
    +  *
    
    +  * Results:
    
    +  *Returns the current value of tclPreInitScript.
    
    +  *
    
    +  * Side effects:
    
    +  *Changes the way Tcl_Init() routine behaves.
    
    +  *
    
    +  *----------------------------------------------------------------------
    
    +  */
    
    + 
    
    + char *
    
    + TclSetPreInitScript (string)
    
    +     char *string;/* Pointer to a script. */
    
    + {
    
    +     char *prevString = tclPreInitScript;
    
    +     tclPreInitScript = string;
    
    +     return(prevString);
    
    + }
    
    *** unix/tclUnixInit.c.origTue Jan 19 23:08:15 1999
    
    --- unix/tclUnixInit.cTue Jan 19 23:12:25 1999
    
    ***************
    
    *** 515,521 ****
    
      pathPtr = Tcl_NewObj();
    
          }
    
          Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY);
    
    !     return Tcl_Eval(interp, initScript);
    
      }
    
      
    
      /*
    
    --- 515,530 ----
    
      pathPtr = Tcl_NewObj();
    
          }
    
          Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY);
    
    ! 
    
    !     if (tclPreInitScript != NULL) {
    
    ! if (Tcl_Eval(interp, tclPreInitScript) == TCL_ERROR) {
    
    !     return (TCL_ERROR);
    
    ! };
    
    !     }
    
    !     if (Tcl_Eval(interp, initScript) == TCL_ERROR) {
    
    ! return TCL_ERROR;
    
    !     }
    
    !     return TCL_OK;
    
      }
    
      
    
      /*
    
    *** win/tclWinInit.c.origTue Jan 19 23:12:47 1999
    
    --- win/tclWinInit.cTue Jan 19 23:15:20 1999
    
    ***************
    
    *** 586,592 ****
    
      pathPtr = Tcl_NewObj();
    
          }
    
          Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY);
    
    !     return Tcl_Eval(interp, initScript);
    
      }
    
      
    
      /*
    
    --- 586,600 ----
    
      pathPtr = Tcl_NewObj();
    
          }
    
          Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY);
    
    !     if (tclPreInitScript != NULL) {
    
    ! if (Tcl_Eval(interp, tclPreInitScript) == TCL_ERROR) {
    
    !     return (TCL_ERROR);
    
    ! };
    
    !     }
    
    !     if (Tcl_Eval(interp, initScript) == TCL_ERROR) {
    
    ! return TCL_ERROR;
    
    !     }
    
    !     return TCL_OK;
    
      }
    
      
    
      /*
    
    
    PatchFiles:
    
    tclInitScript.h tclUnixInit.c tclWinInit.c
    
    
    
    
    The above implementation of TclSetPreInitScript() is copied from Tcl8.0.4
    
    
    
  4. foundin changed to: "obsolete: 8.1b1"
  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: "TclSetPreInitScript function missing"
  11. type changed to: "Bug"