summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-11 20:36:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-11 20:36:47 (GMT)
commit6b095954a1ca589409f43ac81e16b65727ddbbcb (patch)
treea7d0798827525cc13dbcdbc8d76cfebeac16425b
parent6cd305a23929b3f7c41c64fbbb552c9c579dd39d (diff)
parent1b1f3ea6b7141d2f2ef93704c60fc61a40fc597a (diff)
downloadtcl-6b095954a1ca589409f43ac81e16b65727ddbbcb.zip
tcl-6b095954a1ca589409f43ac81e16b65727ddbbcb.tar.gz
tcl-6b095954a1ca589409f43ac81e16b65727ddbbcb.tar.bz2
Merge 8.7
-rw-r--r--.github/workflows/linux-build.yml1
-rw-r--r--generic/tcl.h14
-rw-r--r--tests/io.test59
3 files changed, 36 insertions, 38 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
index 0bcb51f..d3c5094 100644
--- a/.github/workflows/linux-build.yml
+++ b/.github/workflows/linux-build.yml
@@ -8,7 +8,6 @@ jobs:
strategy:
matrix:
cfgopt:
- - ""
- "CFLAGS=-DTCL_NO_DEPRECATED=1"
defaults:
run:
diff --git a/generic/tcl.h b/generic/tcl.h
index 101ae0b..f17d43e 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -680,7 +680,7 @@ typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp,
struct Tcl_Obj *const *objv);
typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, size_t objc,
- struct Tcl_Obj *const objv[]);
+ struct Tcl_Obj *const *objv);
typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData);
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
struct Tcl_Obj *dupPtr);
@@ -909,17 +909,17 @@ typedef struct Tcl_CallFrame {
typedef struct Tcl_CmdInfo {
int isNativeObjectProc; /* 1 if objProc was registered by a call to
- * Tcl_CreateObjCommand; 0 otherwise.
- * Tcl_SetCmdInfo does not modify this
- * field. */
+ * Tcl_CreateObjCommand; 2 if objProc was registered by
+ * a call to Tcl_CreateObjCommand2; 0 otherwise.
+ * Tcl_SetCmdInfo does not modify this field. */
Tcl_ObjCmdProc *objProc; /* Command's object-based function. */
- ClientData objClientData; /* ClientData for object proc. */
+ void *objClientData; /* ClientData for object proc. */
Tcl_CmdProc *proc; /* Command's string-based function. */
- ClientData clientData; /* ClientData for string proc. */
+ void *clientData; /* ClientData for string proc. */
Tcl_CmdDeleteProc *deleteProc;
/* Function to call when command is
* deleted. */
- ClientData deleteData; /* Value to pass to deleteProc (usually the
+ void *deleteData; /* Value to pass to deleteProc (usually the
* same as clientData). */
Tcl_Namespace *namespacePtr;/* Points to the namespace that contains this
* command. Note that Tcl_SetCmdInfo will not
diff --git a/tests/io.test b/tests/io.test
index 49cec51..3d6b0da 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -8952,58 +8952,57 @@ test io-74.1 {[104f2885bb] improper cache validity check} -setup {
removeFile io-74.1
} -returnCodes error -match glob -result {can not find channel named "*"}
-# Note: the following tests 75.1 to 75.3 are in preparation for TCL 9.0, where
-# those should result in an error result
+# The following tests 75.1 to 75.3 exercice strict or tolerant channel
+# encoding.
+# TCL 8.7 only offers tolerant channel encoding, what is tested here.
test io-75.1 {multibyte encoding error read results in raw bytes} -setup {
- set fn [makeFile {} io-75.1]
+ set fn [makeFile {} io-75.1]
set f [open $fn w+]
fconfigure $f -encoding binary
- # In UTF-8, a byte 0xCx starts a multibyte sequence and must be followed
- # by a byte > 0x7F. This is violated to get an invalid sequence.
- puts -nonewline $f "A\xC0\x40"
- flush $f
- seek $f 0
- fconfigure $f -encoding utf-8 -buffering none
+ # In UTF-8, a byte 0xCx starts a multibyte sequence and must be followed
+ # by a byte > 0x7F. This is violated to get an invalid sequence.
+ puts -nonewline $f "A\xC0\x40"
+ flush $f
+ seek $f 0
+ fconfigure $f -encoding utf-8 -buffering none
} -body {
- read $f
+ read $f
} -cleanup {
- close $f
- removeFile io-75.1
+ close $f
+ removeFile io-75.1
} -returnCodes ok -result "A"
-# for TCL 9.0, the result is error
test io-75.2 {unrepresentable character write passes and is replaced by ?} -setup {
- set fn [makeFile {} io-75.2]
+ set fn [makeFile {} io-75.2]
set f [open $fn w+]
fconfigure $f -encoding iso8859-1
} -body {
- # the following command gets in result error in TCL 9.0
- puts -nonewline $f "A\u2022"
- flush $f
- seek $f 0
- read $f
+ puts -nonewline $f "A\u2022"
+ flush $f
+ seek $f 0
+ read $f
} -cleanup {
- close $f
- removeFile io-75.2
+ close $f
+ removeFile io-75.2
} -returnCodes ok -result "A"
# Incomplete sequence test.
# This error may IMHO only be detected with the close.
# But the read already returns the incomplete sequence.
test io-75.3 {incomplete multibyte encoding read is ignored} -setup {
- set fn [makeFile {} io-75.3]
+ set fn [makeFile {} io-75.3]
set f [open $fn w+]
fconfigure $f -encoding binary
- puts -nonewline $f "A\xC0"
- flush $f
- seek $f 0
- fconfigure $f -encoding utf-8 -buffering none
+ puts -nonewline $f "A\xC0"
+ flush $f
+ seek $f 0
+ fconfigure $f -encoding utf-8 -buffering none
} -body {
- set d [read $f]
- close $f
- set d
+ set d [read $f]
+ close $f
+ set d
} -cleanup {
- removeFile io-75.3
+ removeFile io-75.3
} -returnCodes ok -result "A\xC0"
# ### ### ### ######### ######### #########