* Provide close2proc function to prevent tcl9 from crashing.
Tcl 9 does not test if the close2Proc function pointer is non-null,
but calls it unconditionally:
https://github.com/tcltk/tcl/blob/core-9-0-3/generic/tclIO.c#L384
So we need to provide a non-null function pointer for our code
to not crash with Tcl9.
Use the same implementation as the previous close channel
had.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
* Use non-deprecated trace add variable syntax.
In modern tcl, `trace variable` is now i`trace add variable`,
and `"rw"` should be spelled out as `{read write}`
There were backwards compatible forms in Tcl 8.x but now loudly
complains in Tcl 9
Signed-off-by: Henner Zeller <h.zeller@acm.org>
* Use `Tcl_Size` for all tcl functions returning sizes.
This is the type the Tcl-API provides in its prototypes and
starting from Tcl9 this typedef actually changes from `int` to `long`,
so will no longer compile when passing an `int*`.
So whenever we get a return value of this type, use the
correct typedef to declare the variable. This makes it forward and
backward compatible.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
* Address review comments: compare with `read`/`write` not `r`, `w`
Signed-off-by: Henner Zeller <h.zeller@acm.org>
---------
Signed-off-by: Henner Zeller <h.zeller@acm.org>
commit b08f24685f52d242985c1c1f48c5b3821728d355
Author: James Cherry <cherry@parallaxsw.com>
Date: Thu Jan 2 15:18:46 2025 -0800
tcl9 conditional support
Signed-off-by: James Cherry <cherry@parallaxsw.com>
commit bc0ebaa856196d09ea95cbd4e12e4d88b8a8d13e
Author: James Cherry <cherry@parallaxsw.com>
Date: Thu Jan 2 11:33:46 2025 -0800
tcl9 partial support
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>