rem: (void) CreateInterp(&itPtr); if (servPtr != NULL) { itPtr->servPtr = servPtr; NsTclAddServerCmds(itPtr->interp, itPtr); RunTclTraces(itPtr, NS_TCL_TRACE_CREATE); if (UpdateInterp(itPtr) != TCL_OK) { Ns_TclLogError(itPtr->interp); }
add: (void) CreateInterp(&itPtr, server); RunTclTraces(itPtr, NS_TCL_TRACE_CREATE); if (UpdateInterp(itPtr) != TCL_OK) { Ns_TclLogError(itPtr->interp);
context: PopInterp(char *server){    static Ns_Cs lock;    NsServer *servPtr;    NsInterp *itPtr;    Tcl_HashEntry *hPtr;    /*     * Verify the server.  NULL (i.e., no server) is valid but     * a non-null, unknown server is an error.     */    if (server == NULL) {	servPtr = NULL;    } else {	servPtr = NsGetServer(server);	if (servPtr == NULL) {	    return NULL;	}    }    /*     * Pop the first interp off the list of availabe interps for     * the given virtual server on this thread.  If none exists,     * create and initialize a new interp.     */    hPtr = GetCacheEntry(servPtr);    itPtr = Tcl_GetHashValue(hPtr);    if (itPtr != NULL) {	Tcl_SetHashValue(hPtr, itPtr->nextPtr);    } else {    	if (nsconf.tcl.lockoninit) {	    Ns_CsEnter(&lock);    	}	(void) CreateInterp(&itPtr);	if (servPtr != NULL) {    	    itPtr->servPtr = servPtr;    	    NsTclAddServerCmds(itPtr->interp, itPtr);    	    RunTclTraces(itPtr, NS_TCL_TRACE_CREATE);    	    if (UpdateInterp(itPtr) != TCL_OK) {		Ns_TclLogError(itPtr->interp);    	    }	}    	if (nsconf.tcl.lockoninit) {	    Ns_CsLeave(&lock);    	}    }    itPtr->nextPtr = NULL;    /*     * Clear any pending async cancel message.     */    (void) Tcl_AsyncInvoke(itPtr->interp, TCL_OK);    /*     * Run allocation traces and evaluate the ns_init proc which by     * default updates the interp state with ns_ictl if necessary.     */    RunTclTraces(itPtr, NS_TCL_TRACE_ALLOCATE);    if (Tcl_EvalEx(itPtr->interp, "ns_init", -1, 0) != TCL_OK) {	Ns_TclLogError(itPtr->interp);    }    return itPtr;}