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 | 2e71ce4f918d9e64c12fbd378f93bfb0bc93db49 (patch) | |
tree | 2ddea922f10ab56caca709e4cedca323eeb8f2af | |
parent | 0bfd4d207fe04b66ff55434b82155b999c6a7a3d (diff) | |
parent | 1365d5dfb2e603dd60110cae31172da00d07a47a (diff) | |
download | tcl-2e71ce4f918d9e64c12fbd378f93bfb0bc93db49.zip tcl-2e71ce4f918d9e64c12fbd378f93bfb0bc93db49.tar.gz tcl-2e71ce4f918d9e64c12fbd378f93bfb0bc93db49.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); } |