diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2012-10-17 13:52:24 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2012-10-17 13:52:24 (GMT) |
| commit | 04782eab120a606268adc178123351651d077506 (patch) | |
| tree | 118f7c7682cdbaf9666f25c8fae9b7e912d55892 /unix/tclLoadShl.c | |
| parent | 39204becf7d9c9bbb42d8bc22e3bc4f1ff98173e (diff) | |
| parent | 52fd0ba94b36e5f21e5eac6e8f64bd20b216579d (diff) | |
| download | tcl-04782eab120a606268adc178123351651d077506.zip tcl-04782eab120a606268adc178123351651d077506.tar.gz tcl-04782eab120a606268adc178123351651d077506.tar.bz2 | |
merge trunk
Diffstat (limited to 'unix/tclLoadShl.c')
| -rw-r--r-- | unix/tclLoadShl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index eddd80a..7b80bcc 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -22,14 +22,14 @@ #endif #include "tclInt.h" - -/* Static functions defined within this file */ -static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, - const char* symbol); -static void -UnloadFile(Tcl_LoadHandle handle); +/* + * Static functions defined within this file. + */ +static void * FindSymbol(Tcl_Interp *interp, + Tcl_LoadHandle loadHandle, const char *symbol); +static void UnloadFile(Tcl_LoadHandle handle); /* *---------------------------------------------------------------------- @@ -100,8 +100,9 @@ TclpDlopen( } if (handle == NULL) { - Tcl_AppendResult(interp, "couldn't load file \"", fileName, "\": ", - Tcl_PosixError(interp), (char *) NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't load file \"%s\": %s", + fileName, Tcl_PosixError(interp))); return TCL_ERROR; } newHandle = ckalloc(sizeof(*newHandle)); @@ -136,7 +137,7 @@ FindSymbol( { Tcl_DString newName; Tcl_PackageInitProc *proc = NULL; - shl_t handle = (shl_t)(loadHandle->clientData); + shl_t handle = (shl_t) loadHandle->clientData; /* * Some versions of the HP system software still use "_" at the beginning @@ -155,9 +156,9 @@ FindSymbol( Tcl_DStringFree(&newName); } if (proc == NULL && interp != NULL) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "cannot find symbol\"", symbol, "\": ", - Tcl_PosixError(interp), NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "cannot find symbol \"%s\": %s", + symbol, Tcl_PosixError(interp))); } return proc; } @@ -186,9 +187,8 @@ UnloadFile( * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { - shl_t handle; + shl_t handle = (shl_t) loadHandle->clientData; - handle = (shl_t) (loadHandle -> clientData); shl_unload(handle); ckfree(loadHandle); } |
