Overview
| Artifact ID: | b4ebf5ebab0c550c95a74cbef075b8e517fd4394 |
|---|---|
| Ticket: | 4955f5d8a4dce006e063f924bc9709f7850ecb6a
tailcall splicing spot vs. raw TclInvokeObjectCommand |
| User & Date: | ferrieux on 2014-05-12 22:42:27 |
Changes
- comment changed to:
When called at level 1 in Tcl_Eval (the old, string-based one), tailcall panics: tailcall cannot find the right splicing spot: should not happen! By level 1 I mean: in a proc directly called by Tcl_Eval: proc f {} {tailcall g} proc g {} {puts GGG} /* in C */ Tcl_Eval(interp,"f"); At levels 2 and above, everything is fine: proc h {} f /* in C */ Tcl_Eval(interp,"h"); Note that this needle was in the haystack of a Tk embedding scenario: "lablTk", which is a prominent Tk binding for OCaml. https://groups.google.com/d/msg/comp.lang.tcl/HWROy01ZrXY/ElUbGyWvg44J It turns out that lablTk, being older than 8.x, only calls the string-based API; it also turns out that in Unix, the color picker and other similar nonnative modal dialogs have a level-1 tailcall: # in tk.tcl if {![llength [info commands tk_chooseColor]]} { proc ::tk_chooseColor {args} { tailcall ::tk::dialog::color:: {*}$args } } - login: "ferrieux"
- mimetype: "text/plain"