summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2002-07-22 16:57:47 (GMT)
committervincentdarley <vincentdarley>2002-07-22 16:57:47 (GMT)
commitb39f34de9807e5ba4c36539d29795fd971b72abf (patch)
tree1f9f319166b40cfef0ca01389dcb06b397137202
parentdf9190aa43ec6f65886c402aa9d5ade8a57cd6be (diff)
downloadtcl-b39f34de9807e5ba4c36539d29795fd971b72abf.zip
tcl-b39f34de9807e5ba4c36539d29795fd971b72abf.tar.gz
tcl-b39f34de9807e5ba4c36539d29795fd971b72abf.tar.bz2
removed load-related clientData, made filesystem static
-rw-r--r--generic/tclIOUtil.c10
-rw-r--r--generic/tclTest.c23
2 files changed, 15 insertions, 18 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 27f32b4..e7ac3a2 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.63 2002/07/22 16:51:48 vincentdarley Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.64 2002/07/22 16:57:47 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -2526,8 +2526,12 @@ Tcl_FSLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr,
if (*handlePtr == NULL) {
return TCL_ERROR;
}
- *proc1Ptr = TclpFindSymbol(interp, *handlePtr, sym1);
- *proc2Ptr = TclpFindSymbol(interp, *handlePtr, sym2);
+ if (sym1 != NULL) {
+ *proc1Ptr = TclpFindSymbol(interp, *handlePtr, sym1);
+ }
+ if (sym2 != NULL) {
+ *proc2Ptr = TclpFindSymbol(interp, *handlePtr, sym2);
+ }
return retVal;
} else {
Tcl_Filesystem *copyFsPtr;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 1928dc7..2c952e8 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.54 2002/07/08 10:11:22 vincentdarley Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.55 2002/07/22 16:57:47 vincentdarley Exp $
*/
#define TCL_TEST
@@ -364,10 +364,8 @@ static int TestReportCopyDirectory _ANSI_ARGS_ ((Tcl_Obj *src,
static int TestReportRemoveDirectory _ANSI_ARGS_ ((Tcl_Obj *path,
int recursive, Tcl_Obj **errorPtr));
static int TestReportLoadFile _ANSI_ARGS_ ((Tcl_Interp *interp,
- Tcl_Obj *fileName, CONST char *sym1,
- CONST char *sym2, Tcl_PackageInitProc **proc1Ptr,
- Tcl_PackageInitProc **proc2Ptr,
- ClientData *clientDataPtr,
+ Tcl_Obj *fileName,
+ Tcl_LoadHandle *handlePtr,
Tcl_FSUnloadFileProc **unloadProcPtr));
static Tcl_Obj * TestReportLink _ANSI_ARGS_ ((Tcl_Obj *path,
Tcl_Obj *to, int linkType));
@@ -5828,17 +5826,12 @@ TestReportChdir(dirName)
return Tcl_FSChdir(TestReportGetNativePath(dirName));
}
static int
-TestReportLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr,
- clientDataPtr, unloadProcPtr)
+TestReportLoadFile(interp, fileName,
+ handlePtr, unloadProcPtr)
Tcl_Interp *interp; /* Used for error reporting. */
Tcl_Obj *fileName; /* Name of the file containing the desired
* code. */
- CONST char *sym1, *sym2; /* Names of two procedures to look up in
- * the file's symbol table. */
- Tcl_PackageInitProc **proc1Ptr, **proc2Ptr;
- /* Where to return the addresses corresponding
- * to sym1 and sym2. */
- ClientData *clientDataPtr; /* Filled with token for dynamically loaded
+ Tcl_LoadHandle *handlePtr; /* Filled with token for dynamically loaded
* file which will be passed back to
* (*unloadProcPtr)() to unload the file. */
Tcl_FSUnloadFileProc **unloadProcPtr;
@@ -5847,8 +5840,8 @@ TestReportLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr,
* this file. */
{
TestReport("loadfile",fileName,NULL);
- return Tcl_FSLoadFile(interp, TestReportGetNativePath(fileName), sym1, sym2,
- proc1Ptr, proc2Ptr, clientDataPtr, unloadProcPtr);
+ return Tcl_FSLoadFile(interp, TestReportGetNativePath(fileName), NULL, NULL,
+ NULL, NULL, handlePtr, unloadProcPtr);
}
static Tcl_Obj *
TestReportLink(path, to, linkType)