summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2025-06-27 08:34:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2025-06-27 08:34:44 (GMT)
commit5d75a1e6296da5f86dce945443a07af644c20c64 (patch)
treee283881942582de63a1b70c1de1a3180acb448aa
parentaf368b90499cd1842aaa79aed6a39900ea58834e (diff)
parent662d103e7d14952947a018b639531b2d899d943c (diff)
downloadtcl-5d75a1e6296da5f86dce945443a07af644c20c64.zip
tcl-5d75a1e6296da5f86dce945443a07af644c20c64.tar.gz
tcl-5d75a1e6296da5f86dce945443a07af644c20c64.tar.bz2
Merge 9.0
-rw-r--r--doc/ByteArrObj.32
-rw-r--r--doc/CrtAlias.32
-rw-r--r--doc/DictObj.32
-rw-r--r--doc/FileSystem.32
-rw-r--r--doc/ListObj.34
-rw-r--r--doc/ParseArgs.32
-rw-r--r--doc/SplitList.32
-rw-r--r--doc/SplitPath.32
-rw-r--r--doc/StringObj.32
-rw-r--r--doc/Tcl_Main.32
-rw-r--r--generic/tclBinary.c6
-rw-r--r--generic/tclNamesp.c10
-rw-r--r--generic/tclTest.c6
-rw-r--r--generic/tclThreadTest.c6
-rw-r--r--tests/exec.test2
-rw-r--r--unix/tclAppInit.c6
-rw-r--r--win/tclAppInit.c6
-rw-r--r--win/tclWinInt.h3
-rw-r--r--win/tclWinPipe.c5
19 files changed, 46 insertions, 26 deletions
diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3
index 6306591..88c9580 100644
--- a/doc/ByteArrObj.3
+++ b/doc/ByteArrObj.3
@@ -47,7 +47,7 @@ Interpreter to use for error reporting.
Points to space where the number of bytes in the array may be written.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will return
NULL for byte arrays larger than INT_MAX (which should
trigger proper error-handling), otherwise expect it to crash.
.BE
diff --git a/doc/CrtAlias.3 b/doc/CrtAlias.3
index ba2e415..2ddf59e 100644
--- a/doc/CrtAlias.3
+++ b/doc/CrtAlias.3
@@ -87,7 +87,7 @@ for an alias.
Pointer to location to store count of additional value arguments to be
passed to the alias. The location is in storage owned by the caller.
If it points to a variable which type is not \fBTcl_Size\fR, a compiler
-warning will be generated. If your extensions is compiled with -DTCL_8_API,
+warning will be generated. If your extensions is compiled with \fB-DTCL_8_API\fR,
this function will return TCL_ERROR for aliases with more than INT_MAX
value arguments, otherwise expect it to crash
.AP Tcl_Obj ***objvPtr out
diff --git a/doc/DictObj.3 b/doc/DictObj.3
index ec36d6a..0cc2e39 100644
--- a/doc/DictObj.3
+++ b/doc/DictObj.3
@@ -74,7 +74,7 @@ Points to a variable that will have the number of key/value pairs
contained within the dictionary placed within it.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will return
NULL for dictionaries larger than INT_MAX (which should
trigger proper error-handling), otherwise expect it to crash.
.AP Tcl_DictSearch *searchPtr in/out
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index 86f96e6..5a50f53 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -278,7 +278,7 @@ permissions will be set on the created file.
Filled with the number of elements in the split path.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will return
NULL for paths having more than INT_MAX elements (which should
trigger proper error-handling), otherwise expect it to crash.
.AP Tcl_Obj *basePtr in
diff --git a/doc/ListObj.3 b/doc/ListObj.3
index 6e4d0d5..9fd7091 100644
--- a/doc/ListObj.3
+++ b/doc/ListObj.3
@@ -65,7 +65,7 @@ Points to location where \fBTcl_ListObjGetElements\fR
stores the number of element values in \fIlistPtr\fR.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB\-DTCL_8_API\fR, this function will return
NULL for lists with more than INT_MAX elements (which should
trigger proper error-handling), otherwise expect it to crash.
.AP Tcl_Obj ***objvPtr out
@@ -87,7 +87,7 @@ Points to location where \fBTcl_ListObjLength\fR
stores the length of the list.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will return
TCL_ERROR for lists with more than INT_MAX elements (which should
trigger proper error-handling), otherwise expect it to crash.
.AP Tcl_Size index in
diff --git a/doc/ParseArgs.3 b/doc/ParseArgs.3
index 594f4f1..ce61808 100644
--- a/doc/ParseArgs.3
+++ b/doc/ParseArgs.3
@@ -28,7 +28,7 @@ modified to hold number of arguments left in the unprocessed argument list
stored in \fIremObjv\fR.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will return
NULL for argument lists with more than INT_MAX elements (which should
trigger proper error-handling), otherwise expect it to crash.
.AP "Tcl_Obj *const" *objv in
diff --git a/doc/SplitList.3 b/doc/SplitList.3
index d036ace..cc47f03 100644
--- a/doc/SplitList.3
+++ b/doc/SplitList.3
@@ -43,7 +43,7 @@ Pointer to a string with proper list structure.
Filled in with number of elements in \fIlist\fR.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will return
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will return
TCL_ERROR for lists with more than INT_MAX elements (which should
trigger proper error-handling), otherwise expect it to crash.
.AP "const char" ***argvPtr out
diff --git a/doc/SplitPath.3 b/doc/SplitPath.3
index 452baff..25e672d 100644
--- a/doc/SplitPath.3
+++ b/doc/SplitPath.3
@@ -30,7 +30,7 @@ File path in a form appropriate for the current platform (see the
Filled in with number of path elements in \fIpath\fR.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, argcPtr will be filled
+If your extensions is compiled with \fB-DTCL_8_API\fR, argcPtr will be filled
with -1 for paths with more than INT_MAX elements (which should
trigger proper error-handling), otherwise expect it to crash.
.AP "const char" ***argvPtr out
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index f72c6a0..f13924a 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -124,7 +124,7 @@ The location where \fBTcl_GetStringFromObj\fR will store the length
of a value's string representation.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
-If your extensions is compiled with -DTCL_8_API, this function will
+If your extensions is compiled with \fB-DTCL_8_API\fR, this function will
panic for strings with more than INT_MAX bytes/characters, otherwise
expect it to crash.
.AP "const char" *string in
diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3
index 6410450..0258294 100644
--- a/doc/Tcl_Main.3
+++ b/doc/Tcl_Main.3
@@ -34,7 +34,7 @@ Tcl_Obj *
Number of elements in \fIargv\fR.
.AP char *argv[] in
Array of strings containing command-line arguments. On Windows, when
-using -DUNICODE, the parameter type changes to wchar_t *.
+using \fB\-DUNICODE\fR, the parameter type changes to wchar_t *.
.AP char *charargv[] in
As argv, but does not change type to wchar_t.
.AP char *wideargv[] in
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 5094a88..1e68415 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -2740,13 +2740,13 @@ BinaryEncodeUu(
{
Tcl_Obj *resultObj;
unsigned char *data, *start, *cursor;
- int i, bits, index;
+ int i, bits;
unsigned int n;
int lineLength = 61;
const unsigned char SingleNewline[] = { UCHAR('\n') };
const unsigned char *wrapchar = SingleNewline;
Tcl_Size j, rawLength, offset, count = 0, wrapcharlen = sizeof(SingleNewline);
- enum { OPT_MAXLEN, OPT_WRAPCHAR };
+ enum { OPT_MAXLEN, OPT_WRAPCHAR } index;
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
if (objc < 2 || objc % 2 != 0) {
@@ -2805,8 +2805,6 @@ BinaryEncodeUu(
return TCL_ERROR;
}
break;
- default:
- TCL_UNREACHABLE();
}
}
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 5acb014..fb4ec83 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -4745,7 +4745,7 @@ NamespaceWhichCmd(
static const char *const opts[] = {
"-command", "-variable", NULL
};
- int lookupType = 0;
+ enum { OPT_COMMAND, OPT_VARIABLE } lookupType = OPT_COMMAND;
Tcl_Obj *resultPtr;
if (objc < 2 || objc > 3) {
@@ -4770,14 +4770,15 @@ NamespaceWhichCmd(
TclNewObj(resultPtr);
switch (lookupType) {
- case 0:; /* -command */
+ case OPT_COMMAND: {
Tcl_Command cmd = Tcl_GetCommandFromObj(interp, objv[objc-1]);
if (cmd != NULL) {
Tcl_GetCommandFullName(interp, cmd, resultPtr);
}
break;
- case 1:; /* -variable */
+ }
+ case OPT_VARIABLE: {
Tcl_Var var = Tcl_FindNamespaceVar(interp,
TclGetString(objv[objc-1]), NULL, /*flags*/ 0);
@@ -4785,8 +4786,7 @@ NamespaceWhichCmd(
Tcl_GetVariableFullName(interp, var, resultPtr);
}
break;
- default:
- TCL_UNREACHABLE();
+ }
}
Tcl_SetObjResult(interp, resultPtr);
return TCL_OK;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index c67ec25..e6c2a94 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -41,8 +41,14 @@
/*
* Declare external functions used in Windows tests.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
DLLEXPORT int Tcltest_Init(Tcl_Interp *interp);
DLLEXPORT int Tcltest_SafeInit(Tcl_Interp *interp);
+#ifdef __cplusplus
+}
+#endif
/*
* Dynamic string shared by TestdcallCmd and DelCallbackProc; used to collect
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 52493c1..faaf92a 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -139,7 +139,13 @@ static void ThreadFreeProc(void *clientData);
static int ThreadDeleteEvent(Tcl_Event *eventPtr,
void *clientData);
static void ThreadExitProc(void *clientData);
+#ifdef __cplusplus
+extern "C" {
+#endif
extern int Tcltest_Init(Tcl_Interp *interp);
+#ifdef __cplusplus
+}
+#endif
/*
*----------------------------------------------------------------------
diff --git a/tests/exec.test b/tests/exec.test
index fc5f1fa..ac9530f 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -805,7 +805,7 @@ test exec-22.1 {exec -encoding invalid encoding} -body {
test exec-bug-4f0b5767ac {exec App Execution Alias} -constraints haveWinget -body {
exec winget --info
-} -result "Windows Package Manager*" -match glob
+} -result "Windows*" -match glob
foreach cmdBuiltin {
assoc call cd cls color copy date del dir echo
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index 6158c99..8d967e8 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -24,8 +24,14 @@
#endif
#ifdef TCL_TEST
+#ifdef __cplusplus
+extern "C" {
+#endif
extern Tcl_LibraryInitProc Tcltest_Init;
extern Tcl_LibraryInitProc Tcltest_SafeInit;
+#ifdef __cplusplus
+}
+#endif
#endif /* TCL_TEST */
#ifdef TCL_XT_TEST
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index 339d61e..c293952 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -26,8 +26,14 @@
#endif
#ifdef TCL_TEST
+#ifdef __cplusplus
+extern "C" {
+#endif
extern Tcl_LibraryInitProc Tcltest_Init;
extern Tcl_LibraryInitProc Tcltest_SafeInit;
+#ifdef __cplusplus
+}
+#endif
#endif /* TCL_TEST */
#if defined(STATIC_BUILD)
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 3ba3c57..c37daf7 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -122,8 +122,7 @@ TclPipeThreadIsAlive(
return (pipeTI && pipeTI->state != PTI_STATE_DOWN);
};
-MODULE_SCOPE int TclPipeThreadStopSignal(TclPipeThreadInfo **pipeTIPtr,
- HANDLE wakeEvent);
+MODULE_SCOPE int TclPipeThreadStopSignal(TclPipeThreadInfo **pipeTIPtr);
MODULE_SCOPE void TclPipeThreadStop(TclPipeThreadInfo **pipeTIPtr,
HANDLE hThread);
MODULE_SCOPE void TclPipeThreadExit(TclPipeThreadInfo **pipeTIPtr);
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index a2b630a..71d1e4b 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -2052,7 +2052,7 @@ PipeClose2Proc(
if ((pipePtr->flags & PIPE_ASYNC) && inExit) {
/* give it a chance to leave honorably */
- TclPipeThreadStopSignal(&pipePtr->writeTI, pipePtr->writable);
+ TclPipeThreadStopSignal(&pipePtr->writeTI);
if (WaitForSingleObject(pipePtr->writable, 20) == WAIT_TIMEOUT) {
return EWOULDBLOCK;
@@ -3423,8 +3423,7 @@ TclPipeThreadWaitForSignal(
int
TclPipeThreadStopSignal(
- TclPipeThreadInfo **pipeTIPtr,
- HANDLE wakeEvent)
+ TclPipeThreadInfo **pipeTIPtr)
{
TclPipeThreadInfo *pipeTI = *pipeTIPtr;
HANDLE evControl;