diff options
Diffstat (limited to 'doc/unload.n')
-rw-r--r-- | doc/unload.n | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/unload.n b/doc/unload.n index 82c4f4a..0a8e99b 100644 --- a/doc/unload.n +++ b/doc/unload.n @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH unload n 8.5 Tcl "Tcl Built-In Commands" .so man.macros .BS @@ -45,7 +45,7 @@ never report an error. \fB\-keeplibrary\fR . This switch will prevent \fBunload\fR from issuing the operating system call -that will unload the library from the process. +that will unload the library from the process. .TP \fB\-\|\-\fR . @@ -88,8 +88,11 @@ detached from the process. .SS "UNLOAD HOOK PROTOTYPE" .PP The unload procedure must match the following prototype: +.PP .CS -typedef int Tcl_PackageUnloadProc(Tcl_Interp *\fIinterp\fR, int \fIflags\fR); +typedef int \fBTcl_PackageUnloadProc\fR( + Tcl_Interp *\fIinterp\fR, + int \fIflags\fR); .CE .PP The \fIinterp\fR argument identifies the interpreter from which the @@ -106,7 +109,7 @@ the library is used by other interpreters), \fBTCL_UNLOAD_DETACH_FROM_INTERPRETER\fR will be defined. However, if the library is used only by the target interpreter and the library will be detached from the application as soon as the unload procedure returns, -the \fIflags\fR argument will be set to \fBTCL_UNLOAD_DETACH_FROM_PROCESS\fR. +the \fIflags\fR argument will be set to \fBTCL_UNLOAD_DETACH_FROM_PROCESS\fR. .SS NOTES .PP The \fBunload\fR command cannot unload libraries that are statically @@ -142,12 +145,16 @@ library is still loaded), it may be dangerous to use \fBunload\fR on such a library (as the library will be completely detached from the application while some interpreters will continue to use it). .SH EXAMPLE +.PP If an unloadable module in the file \fBfoobar.dll\fR had been loaded using the \fBload\fR command like this (on Windows): +.PP .CS load c:/some/dir/foobar.dll .CE +.PP then it would be unloaded like this: +.PP .CS \fBunload\fR c:/some/dir/foobar.dll .CE @@ -160,3 +167,6 @@ without having to shut down the overall Tcl process. info sharedlibextension, load(n), safe(n) .SH KEYWORDS binary code, unloading, safe interpreter, shared library +.\" Local Variables: +.\" mode: nroff +.\" End: |