Difference between revisions of "Ns TclInitInterps()"
Jump to navigation
Jump to search
m (Ns TclInitInterps moved to Ns TclInitInterps()) |
|
(No difference)
|
Latest revision as of 16:16, 3 December 2005
Ns_TclInitInterps()
Generally called during module initialisation (see Ns_ModuleInit()):
int Ns_ModuleInit(char *hServer, char *hModule) { return (Ns_TclInitInterps(hServer, MyInterpInitFuncName, NULL)); } static int MyInterpInitFuncName(Tcl_Interp *interp, void *context) { Tcl_CreateCommand(interp, "ns_myfuncname", MyFuncNameCmd, NULL, NULL); return NS_OK; } static int MyFuncNameCmd(ClientData context, Tcl_Interp *interp, int argc, char **argv) { Tcl_AppendResult(interp, "MyFuncResultData", NULL); return NS_OK; }