: <i>TCL 8.6.8 does not work with Tcl_SetCommandInfo on some commands</i> plus 6 other changes
by
.
D 2018-11-19T10:23:54.462
J closedate 2458441.93326924
J closer sebres
J icomment Firstly\sthe\susage\sof\sTcl_SetCommandInfo\smay\sbe\sinsufficient\sfor\sthe\sinternal\stcl\scommands\s(e.\sg.\sbecause\sthey\smay\sbe\scompiled,\setc).\r\nWith\sthis\sroutine\syou\scan\salter\sthe\scommand/proc\syou've\screated\sat\sbinary/script\slevel.\sThe\susage\sfor\stcl-internal\scommands\sis\snot\sreally\sexpected.\r\n\r\nSecondly\sTcl\s8.6\shas\smore\scompiled\scommand\sas\s8.5,\sadditionally\sTcl\s8.6\sgets\syet\sanother\sprocessor\scalled\sNRE\sto\sprovide\sstackless\sevaluation\s(see\s[https://wiki.tcl-lang.org/page/NRE|wiki::NRE]\sor\s[https://www.tcl.tk/man/tcl/TclLib/NRE.htm|NRE\smanual\spage]for\sdetails).<br/>\r\nBoth\scompiled\sand\sNRE\s(if\savailable)\sare\spreferred\sevaluations\sinside\sthe\sscript.\r\n\r\nThus\sto\screate\sa\sproper\swrapper\sfor\sa\stcl-internal\scommands\syou\sshould:<br/>\r\n-\seither\srename\sthe\soriginal\sand\screate\sa\sproxy-wrapper\scommand\s(that\scan\scall\s"renamed"\scommand\sinternally),\sor\sdelete/replace\sthe\soriginal\sif\sunwanted\sto\sinvoke\sit\sfrom\sproxy;<br/>\r\n-\sor\suse\sinternal\sstructure-type\s"Command"\s(from\stclInt.h)\sinstead\sof\s"Tcl_CmdInfo"\sto\soverwrite\sALL\sproc-handler.\sFor\sexample\sset\sof\snreProc/compileProc\sto\sNULL\swill\sforce\sTcl\sto\sprocess\scommand\sinvocation\susing\sobjProc\smethod.<br/>\r\n\r\nIf\syou\sjust\swant\sto\strace\sthe\sexecution,\sthe\sTcl_TraceCommand\sor\sTcl_CreateTrace/Tcl_CreateObjTrace\sare\sbetter\scandidates\sfor\spurposes\slike\sthis.\r\n\r\nAlso\snote\sthat\stracing\sof\sthe\sinterpreter\sas\swell\sas\snon-compiled\sexecution\swill\sdo\sslowing\sdown\sthe\stcl\sscripts,\sso\sthe\sperformance\sdegrades\ssignificantly.
J login sebres
J mimetype text/x-fossil-wiki
J resolution Invalid
J status Closed
K 9bdd5788e370acc24ddc8a57e5291832aada8e6b
U sebres
Z b82ee0d3f270f13ab042b37c30726fb2