diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-10-03 08:11:48 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-10-03 08:11:48 (GMT) |
commit | d7fd32ebdc04976287c78247d664efa442b3c5fe (patch) | |
tree | 15adf3c75d8eed679221308126e83de6e2bfb15d /unix/tclLoadDl.c | |
parent | 948410d3929a4818d0fe0c6b7dfd918e4a98f35f (diff) | |
parent | 301282088d6b7961c502f111c171db6e6a341ab9 (diff) | |
download | tcl-d7fd32ebdc04976287c78247d664efa442b3c5fe.zip tcl-d7fd32ebdc04976287c78247d664efa442b3c5fe.tar.gz tcl-d7fd32ebdc04976287c78247d664efa442b3c5fe.tar.bz2 |
merge trunk
Diffstat (limited to 'unix/tclLoadDl.c')
-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); } |