summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDl.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-19 14:53:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-07-19 14:53:13 (GMT)
commit31d2eacf4146aec4f4650b0493b966660b8bcce0 (patch)
tree4a4953bb2f8f70d6a6f12617aca04042f5a2a41a /unix/tclLoadDl.c
parentc510082005ccca4d37d2716a570a380dde7f2c40 (diff)
parent2542a8f81ee6278e9e3fa9937483bd2183fc3548 (diff)
downloadtcl-31d2eacf4146aec4f4650b0493b966660b8bcce0.zip
tcl-31d2eacf4146aec4f4650b0493b966660b8bcce0.tar.gz
tcl-31d2eacf4146aec4f4650b0493b966660b8bcce0.tar.bz2
Rebase to 9.0
Diffstat (limited to 'unix/tclLoadDl.c')
-rw-r--r--unix/tclLoadDl.c12
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);