Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/CallDel.3 @ 25

Last change on this file since 25 was 25, checked in by landauf, 18 years ago

added tcl to libs

File size: 2.2 KB
Line 
1'\"
2'\" Copyright (c) 1993 The Regents of the University of California.
3'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4'\"
5'\" See the file "license.terms" for information on usage and redistribution
6'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7'\"
8'\" RCS: @(#) $Id: CallDel.3,v 1.6 2007/12/13 15:22:30 dgp Exp $
9'\"
10.so man.macros
11.TH Tcl_CallWhenDeleted 3 7.0 Tcl "Tcl Library Procedures"
12.BS
13.SH NAME
14Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interpreter is deleted
15.SH SYNOPSIS
16.nf
17\fB#include <tcl.h>\fR
18.sp
19\fBTcl_CallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
20.sp
21\fBTcl_DontCallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
22.SH ARGUMENTS
23.AS Tcl_InterpDeleteProc clientData
24.AP Tcl_Interp *interp in
25Interpreter with which to associated callback.
26.AP Tcl_InterpDeleteProc *proc in
27Procedure to call when \fIinterp\fR is deleted.
28.AP ClientData clientData in
29Arbitrary one-word value to pass to \fIproc\fR.
30.BE
31
32.SH DESCRIPTION
33.PP
34\fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by
35\fBTcl_DeleteInterp\fR if/when \fIinterp\fR is deleted at some future
36time.  \fIProc\fR will be invoked just before the interpreter
37is deleted, but the interpreter will still be valid at the
38time of the call.
39\fIProc\fR should have arguments and result that match the
40type \fBTcl_InterpDeleteProc\fR:
41.CS
42typedef void Tcl_InterpDeleteProc(
43        ClientData \fIclientData\fR,
44        Tcl_Interp *\fIinterp\fR);
45.CE
46The \fIclientData\fR and \fIinterp\fR parameters are
47copies of the \fIclientData\fR and \fIinterp\fR arguments given
48to \fBTcl_CallWhenDeleted\fR.
49Typically, \fIclientData\fR points to an application-specific
50data structure that \fIproc\fR uses to perform cleanup when an
51interpreter is about to go away.
52\fIProc\fR does not return a value.
53.PP
54\fBTcl_DontCallWhenDeleted\fR cancels a previous call to
55\fBTcl_CallWhenDeleted\fR with the same arguments, so that
56\fIproc\fR will not be called after all when \fIinterp\fR is
57deleted.
58If there is no deletion callback that matches \fIinterp\fR,
59\fIproc\fR, and \fIclientData\fR then the call to
60\fBTcl_DontCallWhenDeleted\fR has no effect.
61
62.SH KEYWORDS
63callback, delete, interpreter
Note: See TracBrowser for help on using the repository browser.