Skip to content
Tcl Source Code Artifact [eba97a3f0c]
Login

Artifact [eba97a3f0c]

Artifact eba97a3f0c873b28fd0a7b8b95139144cfc8b25e:

Ticket change [eba97a3f0c] - New ticket [218392ffffffffff|218392ffff] <i>Tcl_StaticPackage does not call initProc upon load.</i>. by nobody on 2000-10-26 00:57:02.
D 2000-10-26T00:57:02
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s5056\sBug\nVersion:\s8.2\nSubmitDate:\s'2000-04-13'\nLastModified:\s'2000-05-15'\nSeverity:\sMED\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sLinux-Red\sHat\nOSVersion:\sRedHat\s6.1,\sNetBSD\s1.4.2,\sSolaris\s7\nMachine:\si386,\ssun4u\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-05-15'\n\n\nName:\sMichael\sRichardson\n\nReproducibleScript:\ncreate\sa\smodule\sas\sboth\sa\sshared\sobject\sand\sstatically\slinked.\nCall\sTcl_StaticPackage\sin\sthe\sTcl_AppInit\sof\sthe\sstatic\sfunction.\nDo\sload\s""\sModule\sin\stcl.\sThe\sinitProc\sis\snot\scalled.\nLooking\sat\stclLoad.c,\sline\s124,\sit\sappears\sthat\sif\sthe\spackage\sis\salready\nloaded,\sthat\swe\sgoto\s"done",\sskipping\sthe\scode\sat\sline\s283.\sI\sdon't\ssee\sany\nother\scalls\sto\sinitProc,\sso\sI\sthink\sthat\sthis\sfunctionality\sis\sbroken.\n\nDesiredBehavior:\nI\sexpect\sthat\sinitProc\swill\sbe\scalled\swhen\sI\sdo\s'load\s""\sModule'\nI\swould\sdo\sa\spatch,\sbut\sit\sisn't\sclear\sto\sme\show\sdo\smake\ssure\sthat\sthe\sInit\nfunction\sfor\sthe\spackage\sonly\sgets\scalled\sonce.\sThe\scode\sseems\sto\sdepend\nupon\sthe\sexistence\sof\sthe\spackage\son\sthe\spackage\slist\sto\sdetermine\sthat\sthe\s\npackage\shas\sbeen\sinitialized.\n\n\nWhat\sdoes\sthe\sinit\sC\scode\sreally\slook\slike?\s\sinitProc\sshould\sbe\scalled\nat\sleast\sonce,\seven\sin\sstatic\spackages,\sif\severything\sis\sset\sup\scorrectly.\s\n--\s05/10/2000\shobbs\nUser's\scode...\n\nint\nTcl_AppInit(\sTcl_Interp\s*interp\s)\n{\n\s\sif(\sTcl_Init(\sinterp\s)\s==\sTCL_ERROR\s)\s{\n\s\s\s\sreturn\sTCL_ERROR;\n\s\s}\n\s\s\n\s\sTcl_StaticPackage(interp,\s"Beke",\s\sBeke_Init,\s\sBeke_Init);\n\s\s...\n}\n\nHow\sis\sthe\suser\scertain\sthat\sthe\scode\sisn't\scalled,\sinstead\sof\njust\sthrowing\ssome\serror?\s\sDoing\sthe\ssame\sto\ssome\stest\scode\n(tktable),\sit\sall\sworks\sas\sexpected.\s\n--\s05/15/2000\shobbs
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title Tcl_StaticPackage\sdoes\snot\scall\sinitProc\supon\sload.
J type RFE
K 218392ffffffffffffffffffffffffffffffffff
U nobody
Z edca2b04e9645676798922feefbb0384