diff options
author | dkf <dkf@noemail.net> | 2012-08-11 21:24:22 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2012-08-11 21:24:22 (GMT) |
commit | 8e0b54ce6725832cc2243ae9d24d6d805e3c0444 (patch) | |
tree | 27fde8f62082347078d925d76441498acc190a4a /unix/tclLoadShl.c | |
parent | d9614c16c9e26645796f3d1dbe5ccf9ec6c454ed (diff) | |
parent | b2f2b265564f268eace1e78f7d47c678463e7db6 (diff) | |
download | tcl-8e0b54ce6725832cc2243ae9d24d6d805e3c0444.zip tcl-8e0b54ce6725832cc2243ae9d24d6d805e3c0444.tar.gz tcl-8e0b54ce6725832cc2243ae9d24d6d805e3c0444.tar.bz2 |
merge trunk
FossilOrigin-Name: edaf160c8efd1236beccc961cc9ca7cbca45f836
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); } |