summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-24 22:14:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-24 22:14:08 (GMT)
commitd074c70e9eb90a11545b4bf3bd4cb6d6bbc8acac (patch)
treef56abe49e9a4e6d5fea60704e89a59974360faf5 /generic/tclUtil.c
parent8e98a96cb905e5eae722169271333e367ba0c9ab (diff)
downloadtcl-d074c70e9eb90a11545b4bf3bd4cb6d6bbc8acac.zip
tcl-d074c70e9eb90a11545b4bf3bd4cb6d6bbc8acac.tar.gz
tcl-d074c70e9eb90a11545b4bf3bd4cb6d6bbc8acac.tar.bz2
Remove TclSetProcessGlobalValue() "encoding" parameter: it should always be NULL
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 0fcecbf..e2c96a9 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -4121,8 +4121,7 @@ FreeProcessGlobalValue(
void
TclSetProcessGlobalValue(
ProcessGlobalValue *pgvPtr,
- Tcl_Obj *newValue,
- Tcl_Encoding encoding)
+ Tcl_Obj *newValue)
{
const char *bytes;
Tcl_HashTable *cacheMap;
@@ -4144,7 +4143,7 @@ TclSetProcessGlobalValue(
}
bytes = TclGetString(newValue);
pgvPtr->numBytes = newValue->length;
- Tcl_UtfToExternalDStringEx(NULL, encoding, bytes, pgvPtr->numBytes,
+ Tcl_UtfToExternalDStringEx(NULL, NULL, bytes, pgvPtr->numBytes,
TCL_ENCODING_PROFILE_TCL8, &ds, NULL);
pgvPtr->numBytes = Tcl_DStringLength(&ds);
pgvPtr->value = (char *)Tcl_Alloc(pgvPtr->numBytes + 1);
@@ -4153,7 +4152,7 @@ TclSetProcessGlobalValue(
if (pgvPtr->encoding) {
Tcl_FreeEncoding(pgvPtr->encoding);
}
- pgvPtr->encoding = encoding;
+ pgvPtr->encoding = NULL;
/*
* Fill the local thread copy directly with the Tcl_Obj value to avoid
@@ -4277,6 +4276,8 @@ TclGetProcessGlobalValue(
* This function stores the absolute pathname of the executable file
* (normally as computed by TclpFindExecutable).
*
+ * Starting with Tcl 9.0, encoding parameter is not used any more.
+ *
* Results:
* None.
*
@@ -4289,9 +4290,9 @@ TclGetProcessGlobalValue(
void
TclSetObjNameOfExecutable(
Tcl_Obj *name,
- Tcl_Encoding encoding)
+ TCL_UNUSED(Tcl_Encoding))
{
- TclSetProcessGlobalValue(&executableName, name, encoding);
+ TclSetProcessGlobalValue(&executableName, name);
}
/*