diff options
author | vincentdarley <vincentdarley@noemail.net> | 2002-07-18 15:04:50 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2002-07-18 15:04:50 (GMT) |
commit | 744c61c984bf96e9bd964a056be4c2f98cc0d4fa (patch) | |
tree | f356d5d56da72d498b37011b9e007ccb03fade54 /unix/tclLoadShl.c | |
parent | afe0ab0245891188a0632f1f3e0d9a056bf7f337 (diff) | |
download | tcl-744c61c984bf96e9bd964a056be4c2f98cc0d4fa.zip tcl-744c61c984bf96e9bd964a056be4c2f98cc0d4fa.tar.gz tcl-744c61c984bf96e9bd964a056be4c2f98cc0d4fa.tar.bz2 |
load comments and clientData replacement
FossilOrigin-Name: 9e000cc9a78336ebdde8f8c29f77a326a511042a
Diffstat (limited to 'unix/tclLoadShl.c')
-rw-r--r-- | unix/tclLoadShl.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index 14e5b2d..9baadc6 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadShl.c,v 1.10 2002/07/17 20:00:46 vincentdarley Exp $ + * RCS: @(#) $Id: tclLoadShl.c,v 1.11 2002/07/18 15:04:54 vincentdarley Exp $ */ #include <dl.h> @@ -28,17 +28,14 @@ /* *---------------------------------------------------------------------- * - * TclpLoadFile -- + * TclpDlopen -- * * Dynamically loads a binary code file into memory and returns - * the addresses of two procedures within that file, if they - * are defined. + * a handle to the new code. * * Results: * A standard Tcl completion code. If an error occurs, an error - * message is left in the interp's result. *proc1Ptr and *proc2Ptr - * are filled in with the addresses of the symbols given by - * *sym1 and *sym2, or NULL if those symbols can't be found. + * message is left in the interp's result. * * Side effects: * New code suddenly appears in memory. @@ -85,6 +82,21 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr) return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * TclpFindSymbol -- + * + * Looks up a symbol, by name, through a handle associated with + * a previously loaded piece of code (shared library). + * + * Results: + * Returns a pointer to the function associated with 'symbol' if + * it is found. Otherwise returns NULL and may leave an error + * message in the interp's result. + * + *---------------------------------------------------------------------- + */ Tcl_PackageInitProc* TclpFindSymbol(interp, loadHandle, symbol) Tcl_Interp *interp; @@ -133,15 +145,15 @@ TclpFindSymbol(interp, loadHandle, symbol) */ void -TclpUnloadFile(clientData) - ClientData clientData; /* ClientData returned by a previous call - * to TclpLoadFile(). The clientData is +TclpUnloadFile(loadHandle) + TclLoadHandle loadHandle; /* loadHandle returned by a previous call + * to TclpDlopen(). The loadHandle is * a token that represents the loaded * file. */ { shl_t handle; - handle = (shl_t) clientData; + handle = (shl_t) loadHandle; shl_unload(handle); } |