83 lines
3.0 KiB
Groff
83 lines
3.0 KiB
Groff
'\"
|
|
'\" Copyright (c) 1993 The Regents of the University of California.
|
|
'\" All rights reserved.
|
|
'\"
|
|
'\" Permission is hereby granted, without written agreement and without
|
|
'\" license or royalty fees, to use, copy, modify, and distribute this
|
|
'\" documentation for any purpose, provided that the above copyright
|
|
'\" notice and the following two paragraphs appear in all copies.
|
|
'\"
|
|
'\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
|
|
'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
'\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
|
'\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
'\"
|
|
'\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
|
'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
'\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
'\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
|
'\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
'\"
|
|
'\" $Header: /user6/ouster/tcl/man/RCS/CallDel.3,v 1.3 93/09/09 16:49:23 ouster Exp $ SPRITE (Berkeley)
|
|
'\"
|
|
.so man.macros
|
|
.HS Tcl_CallWhenDeleted tclc 7.0
|
|
.BS
|
|
.SH NAME
|
|
.na
|
|
Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interpreter is deleted
|
|
.ad
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\fB#include <tcl.h>\fR
|
|
.sp
|
|
\fBTcl_CallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
|
|
.sp
|
|
\fBTcl_DontCallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
|
|
.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 \fIinterp\fR is deleted.
|
|
.AP ClientData clientData in
|
|
Arbitrary one-word value to pass to \fIproc\fR.
|
|
.BE
|
|
|
|
.SH DESCRIPTION
|
|
.PP
|
|
\fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by
|
|
\fBTcl_DeleteInterp\fR if/when \fIinterp\fR is deleted at some future
|
|
time. \fIProc\fR will be invoked just before the interpreter
|
|
is deleted, but the interpreter will still be valid at the
|
|
time of the call.
|
|
\fIProc\fR should have arguments and result that match the
|
|
type \fBTcl_InterpDeleteProc\fR:
|
|
.nf
|
|
.RS
|
|
typedef int Tcl_InterpDeleteProc(
|
|
.RS
|
|
ClientData \fIclientData\fR,
|
|
Tcl_Interp *\fIinterp\fR);
|
|
.RE
|
|
.RE
|
|
.fi
|
|
The \fIclientData\fP and \fIinterp\fR parameters are
|
|
copies of the \fIclientData\fP and \fIinterp\fR arguments given
|
|
to \fBTcl_CallWhenDeleted\fR.
|
|
Typically, \fIclientData\fR points to an application-specific
|
|
data structure that \fIproc\fR uses to perform cleanup when an
|
|
interpreter is about to go away.
|
|
\fIProc\fR does not return a value.
|
|
.PP
|
|
\fBTcl_DontCallWhenDeleted\fR cancels a previous call to
|
|
\fBTcl_CallWhenDeleted\fR with the same arguments, so that
|
|
\fIproc\fR won't be called after all when \fIinterp\fR is
|
|
deleted.
|
|
If there is no deletion callback that matches \fIinterp\fR,
|
|
\fIproc\fR, and \fIclientData\fR then the call to
|
|
\fBTcl_DontCallWhenDeleted\fR has no effect.
|
|
|
|
.SH KEYWORDS
|
|
callback, delete, interpreter
|