diff options
author | dgp <dgp@users.sourceforge.net> | 2012-08-28 13:04:52 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-08-28 13:04:52 (GMT) |
commit | f574e8789221eb4b0605558d910d72503c25da69 (patch) | |
tree | 2ddea922f10ab56caca709e4cedca323eeb8f2af | |
parent | ecd5a8ed960d4cb3a9b0c87b4452037f72e395a9 (diff) | |
parent | e7975ff335f51d429c79b128209d33f7808f3782 (diff) | |
download | tcl-f574e8789221eb4b0605558d910d72503c25da69.zip tcl-f574e8789221eb4b0605558d910d72503c25da69.tar.gz tcl-f574e8789221eb4b0605558d910d72503c25da69.tar.bz2 |
merge trunk
-rw-r--r-- | unix/tclLoadDl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index f8fe6d3..a48aa23 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -176,8 +176,14 @@ FindSymbol( } Tcl_DStringFree(&ds); if (proc == NULL && interp != NULL) { + const char *errorStr = dlerror(); + + if (!errorStr) { + errorStr = "unknown"; + } + Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "cannot find symbol \"%s\": %s", symbol, dlerror())); + "cannot find symbol \"%s\": %s", symbol, errorStr)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); } |