CallDel.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1993 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: CallDel.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
- '"
- .so man.macros
- .TH Tcl_CallWhenDeleted 3 7.0 Tcl "Tcl Library Procedures"
- .BS
- .SH NAME
- Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted - Arrange for callback when interpreter is deleted
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- fBTcl_CallWhenDeletedfR(fIinterpfR, fIprocfR, fIclientDatafR)
- .sp
- fBTcl_DontCallWhenDeletedfR(fIinterpfR, fIprocfR, fIclientDatafR)
- .SH ARGUMENTS
- .AS Tcl_InterpDeleteProc clientData
- .AP Tcl_Interp *interp in
- Interpreter with which to associated callback.
- .AP Tcl_InterpDeleteProc *proc in
- Procedure to call when fIinterpfR is deleted.
- .AP ClientData clientData in
- Arbitrary one-word value to pass to fIprocfR.
- .BE
- .SH DESCRIPTION
- .PP
- fBTcl_CallWhenDeletedfR arranges for fIprocfR to be called by
- fBTcl_DeleteInterpfR if/when fIinterpfR is deleted at some future
- time. fIProcfR will be invoked just before the interpreter
- is deleted, but the interpreter will still be valid at the
- time of the call.
- fIProcfR should have arguments and result that match the
- type fBTcl_InterpDeleteProcfR:
- .CS
- typedef void Tcl_InterpDeleteProc(
- ClientData fIclientDatafR,
- Tcl_Interp *fIinterpfR);
- .CE
- The fIclientDatafR and fIinterpfR parameters are
- copies of the fIclientDatafR and fIinterpfR arguments given
- to fBTcl_CallWhenDeletedfR.
- Typically, fIclientDatafR points to an application-specific
- data structure that fIprocfR uses to perform cleanup when an
- interpreter is about to go away.
- fIProcfR does not return a value.
- .PP
- fBTcl_DontCallWhenDeletedfR cancels a previous call to
- fBTcl_CallWhenDeletedfR with the same arguments, so that
- fIprocfR won't be called after all when fIinterpfR is
- deleted.
- If there is no deletion callback that matches fIinterpfR,
- fIprocfR, and fIclientDatafR then the call to
- fBTcl_DontCallWhenDeletedfR has no effect.
- .SH KEYWORDS
- callback, delete, interpreter