diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-28 13:33:38 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-28 13:33:38 (GMT) |
| commit | 6abc29a3f20a3aeeed99bb70b4e1cdbfef293a4f (patch) | |
| tree | f1eb1ce4c4c632ed76bcef7e3614b1c30500a632 /unix/tclLoadDl.c | |
| parent | 813a5e93acee11fd4652683370c0c7b781b9b353 (diff) | |
| parent | b815eeaea11da76d03de06dd072020a67df50849 (diff) | |
| download | tcl-6abc29a3f20a3aeeed99bb70b4e1cdbfef293a4f.zip tcl-6abc29a3f20a3aeeed99bb70b4e1cdbfef293a4f.tar.gz tcl-6abc29a3f20a3aeeed99bb70b4e1cdbfef293a4f.tar.bz2 | |
Rebase to 9.0. Error-message improvement
Diffstat (limited to 'unix/tclLoadDl.c')
| -rw-r--r-- | unix/tclLoadDl.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 0913698..743e94f 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -108,7 +108,11 @@ TclpDlopen( Tcl_DString ds; const char *fileName = TclGetString(pathPtr); - native = Tcl_UtfToExternalDString(NULL, fileName, TCL_INDEX_NONE, &ds); + if (Tcl_UtfToExternalDStringEx(interp, NULL, fileName, TCL_INDEX_NONE, 0, &ds, NULL) != TCL_OK) { + Tcl_DStringFree(&ds); + return TCL_ERROR; + } + native = Tcl_DStringValue(&ds); /* * Use (RTLD_NOW|RTLD_LOCAL) as default, see [Bug #3216070] */ @@ -179,7 +183,11 @@ FindSymbol( * the underscore. */ - native = Tcl_UtfToExternalDString(NULL, symbol, TCL_INDEX_NONE, &ds); + if (Tcl_UtfToExternalDStringEx(interp, NULL, symbol, TCL_INDEX_NONE, 0, &ds, NULL) != TCL_OK) { + Tcl_DStringFree(&ds); + return NULL; + } + native = Tcl_DStringValue(&ds); proc = dlsym(handle, native); /* INTL: Native. */ if (proc == NULL) { Tcl_DStringInit(&newName); |
