[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_TclEnterSet

Overview

Make an Ns_Set accessible through Tcl

Syntax

    int Ns_TclEnterSet(
    	Tcl_Interp				*interp,
    	Ns_Set				*set,
    	int				flags
    );

Description

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:
NS_TCL_SET_TEMPORARY: The set is temporary and private to the Tcl interpreter. The set ID will be automatically deleted by Ns_TclDeAllocateInterp().
NS_TCL_SET_PERSISTENT: The set can be accessed by any Tcl interpreter in the virtual server and the set ID will persist beyond the interpreter's next call to Ns_TclDeAllocateInterp().
NS_TCL_SET_DYNAMIC: The set was dynamically allocated for use by Tcl and will be garbage-collected when the cooresponding set ID is deleted through either Ns_TclSetFree() 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.

Example

    set = Ns_SetCreate(name);
    return Ns_TclEnterSet(interp, set,
    	NS_TCL_SET_TEMPORARY | NS_TCL_SET_DYNAMIC);

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.