Overview
| Artifact ID: | 13ceb6c1d01fdefd30391eb607a47f17fc8c32bfc2176860e8558be0763c81b0 |
|---|---|
| Ticket: | 3bb3bcf2da5bfe20b1ab863fd2de940bd04f4aaf
Adding support for 8.7/9.0 to Tcl.pm, Tkinter |
| User & Date: | chrstphrchvz on 2022-09-06 04:40:55 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
I would like to add support for Tcl 8.7/9.0 to Tcl.pm, a wrapper for using Tcl from Perl: [https://github.com/gisle/tcl.pm/pull/42]. My understanding is that it intends to remain compatible with Tcl 8.4. The main difficulty I have encountered so far is updating its <tt>SvFromTclObj()</tt> function for converting a given Tcl value to a Perl value of similar type. (The <tt>fromObj()</tt> function in Python’s Tkinter serves a similar purpose.) It will need to accommodate types no longer being registered in newer Tcl; it seems the workaround is to create a <tt>Tcl_Obj *</tt> of the desired type and then get its <tt>typePtr</tt>, as mentioned in TIP 484, and already done in some cases by Tkinter. One part I am still trying to understand is how to handle boolean types. This is complicated not only by some confusion on what the expected behavior on the Perl side is (e.g. [https://github.com/gisle/tcl.pm/issues/47]), but also by the various changes since Tcl 8.4. From what I can tell, Tcl so far has had a registered "boolean" type <tt>tclBooleanType</tt> added in 8.4, then renamed to <tt>oldBooleanType</tt> in 8.5, and dropped in 9.0 (and 8.7 with <tt>TCL_NO_DEPRECATED</tt>); and it has had an unregistered "booleanString" type <tt>tclBooleanType</tt> since 8.5, but which is now going to be called "boolean" in 9.0 (this was also the briefly the case for Tcl 8.7 with <tt>TCL_NO_DEPRECATED</tt> from [8b366f71d8] until being reverted seemingly without comment in [https://core.tcl-lang.org/tcl/fdiff?v1=f96e8cd9d38020dc&v2=0fa368afdf3e734c|4f6d4a2b15]). I am not aware why "booleanString" is being renamed to "boolean" other than it possibly seeming strange to have "booleanString" and no other boolean type present. Is there an issue that prevents it remaining "booleanString" for compatibility? I would be curious if there is any further advice for adapting C library code for Tcl 8.7/9.0 not already given in TIPs 484/485/600, and if anyone is aware of examples I can refer to of older C code successfully updated for 8.7/9.0. TIP 484 mentions some affected programs, but those do not appear to be actively maintained. I am not aware of Tkinter already preparing for Tcl 8.7/9.0, and Ruby tcltk seems further behind (still contains handling for Tcl 8.3). There are probably other things I should ask Tcl for help in this effort, though I’m not yet sure sure exactly what.
- foundin changed to: "trunk"
- is_private changed to: "0"
- login: "chrstphrchvz"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "chrstphrchvz"
- subsystem changed to: "10. Objects"
- title changed to: "Adding support for 8.7/9.0 to Tcl.pm"
- type changed to: "Support"