Skip to content
Tcl Source Code Artifact [7a64f7638b]
Login

Artifact [7a64f7638b]

Artifact 7a64f7638b0136301663d9649a792c73a7d4be2b:

Ticket change [7a64f7638b] - New ticket [1557574fffffffff|1557574fff] <i>Add Tcl_SetInitProc()</i>. by nobody on 2006-09-13 02:02:42.
D 2006-09-13T02:02:42
J assignee dgp
J cmimetype text/plain
J comment Although\sit\sis\seasy\sto\screate\san\sinterpreter\sfrom\sC\scode\sthat\sdoesn't\srun\s\nTcl_Init\son\sthat\sinterpreter,\san\s[interp]\scommand\salways\sruns\sTcl_Init\son\s\nthe\snew\sinterpreter.\s\sAlthough\sthere's\sTclSetPreInitScript,\swhich\scan\s\noverride\sloading\sthe\slibrary\sby\screating\sa\sproc\stclInit,\sthere's\sno\sdirect\sway\s\nto\shave\syour\sown\sC\sfunction\scalled\swhen\sa\snew\sinterpreter\sis\screated.\n\nProposed:\sTcl_SetInitProc()\n\nBy\sdefault,\sit\swould\sbe\sset\sto\sTcl_Init,\sbut\scalling\sSetInitProc\swould\s\noverride\sthat\swhen\sslave\sinterpreters\sare\screated.\s\sThe\sproc\sthat\sis\scalled\s\ncould\sstill\scall\sTcl_Init\sitself,\sand\sthe\sAppInitProc\swould\spresumably\scall\s\nit's\sown\sinit\sproc\sand\sSetInitProc\sas\sneeded.\n\nAn\sexample\sof\swhat\sthis\scould\sbe\sused\sfor\sis,\sI\swant\sto\soverride\sthe\sexit\s\ncommand\sto\sset\sa\sflag\sfor\sa\smainloop\sprocedure\sto\sexit,\srather\sthan\sexit\s\nthe\sprocess\s(a\sTCL_EXIT\sreturn\scode\swhich\swould\smake\sTcl_Main\sexit\s\nwould\salso\sbe\sneeded,\sbut\sthat's\sa\sdifferent\ssubject).\n\nI\scan\seasily\sdo\sthat\sin\sthe\sfirst\sinterpreter\sI\screate,\sbut\sa\sslave\sinterpreter\s\ncan\sstill\sexecute\sthe\soriginal\sexit\scommand\sand\sthe\sprocess\squits\sinstead\s\nof\sleaving\sme\sin\scontrol.\s\sThere\sare,\sof\scourse,\smany\sother\suses\sfor\s\nsomething\slike\sthis,\sI'm\snot\slooking\sfor\sworkarounds\sfor\sany\sone\sspecific\s\nissue.\n\[email protected]
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 38.\sInit\s-\sLibrary\s-\sAutoload
J title Add\sTcl_SetInitProc()
J type RFE
K 1557574fffffffffffffffffffffffffffffffff
U nobody
Z 4736bf5683b0f368521f22f2d3c84b47