diff options
author | vincentdarley <vincentdarley@noemail.net> | 2001-08-30 08:53:13 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2001-08-30 08:53:13 (GMT) |
commit | 0a869d9ec691af644dcea5c22ae9a6ef6b3600fb (patch) | |
tree | cf952115d99a903d3c817b01278505ed6aaff55d /mac/tclMacLoad.c | |
parent | ae04acdf71b78c227a384109d001ad75dd83d8f8 (diff) | |
download | tcl-0a869d9ec691af644dcea5c22ae9a6ef6b3600fb.zip tcl-0a869d9ec691af644dcea5c22ae9a6ef6b3600fb.tar.gz tcl-0a869d9ec691af644dcea5c22ae9a6ef6b3600fb.tar.bz2 |
filesystem
FossilOrigin-Name: 63ee4e7a09d028fa707389d63a2bdc197a342ce1
Diffstat (limited to 'mac/tclMacLoad.c')
-rw-r--r-- | mac/tclMacLoad.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mac/tclMacLoad.c b/mac/tclMacLoad.c index daf87ca..fd355ae 100644 --- a/mac/tclMacLoad.c +++ b/mac/tclMacLoad.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: tclMacLoad.c,v 1.4 1999/10/15 04:47:12 jingham Exp $ + * RCS: @(#) $Id: tclMacLoad.c,v 1.5 2001/08/30 08:53:15 vincentdarley Exp $ */ #include <CodeFragments.h> @@ -99,7 +99,7 @@ typedef struct CfrgItem CfrgItem; int TclpLoadFile( Tcl_Interp *interp, /* Used for error reporting. */ - char *fileName, /* Name of the file containing the desired + Tcl_Obj *pathPtr, /* Name of the file containing the desired * code. */ char *sym1, char *sym2, /* Names of two procedures to look up in * the file's symbol table. */ @@ -122,7 +122,6 @@ TclpLoadFile( UInt32 length = kCFragGoesToEOF; char packageName[255]; Str255 errName; - Tcl_DString ds; char *native; /* @@ -134,9 +133,8 @@ TclpLoadFile( Tcl_UtfToLower(packageName); *(Tcl_UtfAtIndex(packageName, Tcl_NumUtfChars(packageName, -1) - 5)) = 0; - native = Tcl_UtfToExternalDString(NULL, fileName, -1, &ds); + native = Tcl_FSGetNativePath(pathPtr); err = FSpLocationFromPath(strlen(native), native, &fileSpec); - Tcl_DStringFree(&ds); if (err != noErr) { Tcl_SetResult(interp, "could not locate shared library", TCL_STATIC); @@ -199,8 +197,9 @@ TclpLoadFile( kLoadCFrag, &connID, &dummy, errName); if (err != fragNoErr) { p2cstr(errName); - Tcl_AppendResult(interp, "couldn't load file \"", fileName, - "\": ", errName, (char *) NULL); + Tcl_AppendResult(interp, "couldn't load file \"", + Tcl_GetString(pathPtr), + "\": ", errName, (char *) NULL); return TCL_ERROR; } |