Make an Ns_Set accessible through Tcl
Ns_TclEnterSet makes an Ns_Set accessible through Tcl. The new set ID is sprintf'ed directly into interp->result. It returns either NS_OK or NS_ERROR. The flags can be one or more of the following:
The set is temporary and private to the Tcl interpreter. The set ID will be automatically deleted by Ns_TclDeAllocateInterp().
The set can be accessed by any Tcl interpreter in the server and the set ID will persist beyond the interpreter's next call to Ns_TclDeAllocateInterp().
The set was dynamically allocated for use by Tcl and will be garbage-collected when the cooresponding set ID is deleted through either Ns_TclFreeSet() or Ns_TclDeAllocateInterp().
Sets created by Tcl are normally DYNAMIC and TEMPORARY unless the -persist option is used in the Tcl function when creating the set.
set = Ns_SetCreate(name);
return Ns_TclEnterSet(interp, set,
NS_TCL_SET_TEMPORARY | NS_TCL_SET_DYNAMIC);