summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDyld.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclLoadDyld.c')
-rw-r--r--unix/tclLoadDyld.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 9eefd91..e220525 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLoadDyld.c,v 1.9 2002/07/17 20:00:46 vincentdarley Exp $
+ * RCS: @(#) $Id: tclLoadDyld.c,v 1.10 2002/07/18 15:04:53 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -21,17 +21,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.
+ * Dynamically loads a binary code file into memory and returns
+ * a handle to the new code.
*
* Results:
* A standard Tcl completion code. If an error occurs, an error
- * message is left in the interpreter'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 interpreter's result.
*
* Side effects:
* New code suddenly appears in memory.
@@ -72,6 +69,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;
@@ -124,13 +136,13 @@ 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. */
{
- NSUnLinkModule(clientData, FALSE);
+ NSUnLinkModule(loadHandle, FALSE);
}
/*