From: Jan N. <nij...@us...> - 2013-02-28 09:00:52
|
2013/2/27 Porter, Don <don...@ni...>: > Any changes required > to Tk for no other purpose than to make it compile > against the "novem" branch in Tcl belong on a > "novem-support" branch in Tk. They can move to > Tk trunk when "novem" moves to Tcl trunk and > not before. This "novem-support" branch already exists for Tk. At the moment, when compiled against 8.6 headers, it runs with novem (9.0a0). But in order to do that, it contains some 'hacks', which better solutions should be searched for, And it contains some experiments, (like removal of Tcl_RegisterObjType), which still needs to be TIP'ed. The only source incompatbilities I encountered where the use of VOID, STRINGIFY, JOIN and EXTERN macros, and the use of Tcl_VarEval. Tcl_VarEval is deprecated, so Tk should not use that. Therefore I plan to eliminate all calls to Tcl_VarEval in Tk, hopefully that doesn't raise any objections. Other things Tk's "novem-support" branch contains is replacing all "package require Tcl 8.6" with "package require Tcl 8.6-". Of course, that can only be backported as soon as Tcl 9.0 is released, and Tk 8.6 is actually known to run with it. So, how to further benefit from this? One possibility (my suggestion) is: <http://core.tcl.tk/tcl/info/3b51901dfc> With this in place, Tk's "novem-support" branch could be simplified a lot. Explanation: - Tcl_PkgPresent up to Tcl_UpVar are just thin wrappers around Tcl_PkgPresent2 up to Tcl_UpVar2. I see no caveats using macro's here at all. - The Tcl_Eval, Tcl_GlobalEval, Tcl_SaveResult, Tcl_RestoreResult and Tcl_DiscardResult do the same as their function counterpart, except that interp->result is not saved/restored. For extensions which don't access interp->result that's OK, but who knows there still are... Therefore I would put an ifdef TCL_NO_DEPRECATED around it. - The Tcl_AddErrorInfo/Tcl_AddObjErrorInfo macro's are somewhat less efficient as their functions counterparts. They are only used in the error case, so I would say "who cares!". But still, better be careful. I think this should be TIP'ed. And maybe there are more functions like this, which stub-table entries can be removed in "novem" (9.0) without losing anything. Regards, Jan Nijtmans |