diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/hammer/gui.c | 3 | ||||
-rw-r--r-- | shared/toxy/scriptlet.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/shared/hammer/gui.c b/shared/hammer/gui.c index 131ddfe..ec6add7 100644 --- a/shared/hammer/gui.c +++ b/shared/hammer/gui.c @@ -199,7 +199,8 @@ static void hammergui_setup(void) /* Protect against pdCmd being called (via "Canvas <Destroy>" binding) during Tcl_Finalize(). FIXME this should be a standard exit handler. */ sys_gui("proc hammergui_exithook {cmd op} {proc pd {} {}}\n"); - sys_gui("trace add execution exit enter hammergui_exithook\n"); + sys_gui("if {[info tclversion] >= 8.4} {\n\ + trace add execution exit enter hammergui_exithook}\n"); sys_gui("proc hammergui_ispatcher {cv} {\n"); sys_gui(" if {[string range $cv 0 1] == \".x\""); diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c index a2f5ee0..192eaa6 100644 --- a/shared/toxy/scriptlet.c +++ b/shared/toxy/scriptlet.c @@ -471,8 +471,12 @@ void scriptlet_qpush(t_scriptlet *sp) sys_gui(sp->s_buffer); *tail = 0; sprintf(buf, "\ - trace add variable ::toxy::reply write \"::toxy::doreply %s\"\n\ - ::toxy::query}\n", sp->s_rptarget->s_name); + if {[info tclversion] < 8.4} {\n\ + trace variable ::toxy::reply w \"::toxy::doreply %s\"\n\ + } else {\n\ + trace add variable ::toxy::reply write \"::toxy::doreply %s\"\n\ + }\n\ + ::toxy::query}\n", sp->s_rptarget->s_name, sp->s_rptarget->s_name); sys_gui(buf); } } |