summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadShl.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-19 08:59:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-19 08:59:56 (GMT)
commitc444c608df624587909b00a2dd705639d77ee3c5 (patch)
treed032c10b4c13ff0c84ac17479550d303371f0a9c /unix/tclLoadShl.c
parente3a6968b93006d08f0e1dd834826e5f4b37fbd1a (diff)
parent2e4dede38726df20d789751af9b335c2b4ab6e96 (diff)
downloadtcl-c444c608df624587909b00a2dd705639d77ee3c5.zip
tcl-c444c608df624587909b00a2dd705639d77ee3c5.tar.gz
tcl-c444c608df624587909b00a2dd705639d77ee3c5.tar.bz2
Merge 9.0
Diffstat (limited to 'unix/tclLoadShl.c')
-rw-r--r--unix/tclLoadShl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c
index 0889c21..63e9328 100644
--- a/unix/tclLoadShl.c
+++ b/unix/tclLoadShl.c
@@ -31,13 +31,13 @@ static void UnloadFile(Tcl_LoadHandle handle);
* to the new code.
*
* Results:
- * A standard Tcl completion code. If an error occurs, an error message
+ * A standard Tcl completion code. If an error occurs, an error message
* is left in the interp's result.
*
* Side effects:
* New code suddenly appears in memory.
*
- *----------------------------------------------------------------------
+ *---------------------------------------------------------------------------
*/
int
@@ -86,7 +86,11 @@ TclpDlopen(
Tcl_DString ds;
- 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);
handle = shl_load(native, BIND_DEFERRED|BIND_VERBOSE|DYNAMIC_PATH, 0L);
Tcl_DStringFree(&ds);
}