.
D 2000-10-26T00:51:53
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s756\sRFE\nVersion:\s8.0.3\nSubmitDate:\s'1998-10-22'\nLastModified:\s'1999-12-14'\nSeverity:\sMED\nStatus:\sClosed\nSubmitter:\sadmin\nChangedBy:\shobbs\nOS:\sAll\nOSVersion:\sNA\nMachine:\sNA\nFixedDate:\s'2000-10-25'\nFixedInVersion:\sNA\nClosedDate:\s'1999-12-14'\n\n\n#include\s<stdio.h>\n#include\s<stdlib.h>\n#include\s<tcl.h>\n\n/*\n**\sThis\ssmall\sprogram\sdemonstrates\swhat\sI\sbelieve\sto\sbe\sa\sbug\sin\sthe\n**\sTcl\sobject\sroutines.\s\sI'm\sassuming\sthat\sit\swas\sintended\sthat\sthe\n**\sobject\sroutines\scan\sbe\sused\s"external"\sto\sTcl\s(i.e.,\swithout\n**\shaving\sto\sinitialize\san\sinterpreter).\s\sThis\sis\suseful\sbecause\n**\sit\sallows\snon-Tcl\sprograms\sto\sgenerate\sTcl-format\slists\sthat\n**\smay\sbe\sused\sas\sinput\sto\sTcl\sprograms.\s\sWhen\scompiled\sand\srun\sas\n**\swritten,\sthis\sprogram\sworks\sfine.\s\sHowever,\sif\sthe\scall\sto\n**\sTcl_GetObjType()\sis\sremoved,\sthe\sprogram\sseg.\sfaults\n**\s(access\sviolation).\n**\n**\sI'd\sappreciate\sit\sif\syou\swould\sconsider\smaking\sa\schange\sto\sthe\n**\score\ssources\sto\scorrect\sthis\sat\ssome\spoint.\n**\n**\sthanks,\n**\n**\sRoy\sLane,\sCompaq\s([email protected])\n**\n**\s(p.s.,\sI'm\susing\sthe\s8.0.3\sversion\sof\sthe\sTcl\ssources)\n*/\n\nmain()\n\n{\n\s\s\s\sTcl_Obj*\slist;\n\n\s\s\s\s/*\n\s\s\s\s**\sA\scall\sto\sTcl_GetObjType()\sis\srequired\sto\sset\sup\sthe\s"type\n\s\s\s\s**\stable"\sused\sby\sobjects\sin\sorder\sto\suse\sthe\slist\sroutines\n\s\s\s\s**\sindependent\sof\sa\sTcl\sinterpreter.\s\sThis\sreally\sis\sa\skludge\n\s\s\s\s**\swork-around\sI\sfigured\sout\safter\slooking\sat\sthe\scode.\s\sThe\n\s\s\s\s**\sobject\sroutines\sshould\sbe\smodified\sso\sthat\sthey\smake\ssure\n\s\s\s\s**\sthe\s"type\stable"\sis\sproperly\sinitialized.\n\s\s\s\s*/\n\n\s\s\s\sTcl_GetObjType("");\n\n\s\s\s\slist\s=\sTcl_NewListObj(0,\s0);\n\n\s\s\s\sTcl_ListObjAppendElement(0,\slist,\sTcl_NewStringObj("test$name",\s-1));\n\n\s\s\s\sTcl_ListObjAppendElement(0,\slist,\sTcl_NewStringObj("mbox_name",\s-1));\n\n\s\s\s\sTcl_ListObjAppendElement(0,\slist,\sTcl_NewStringObj("5\s2",\s-1));\n\n\s\s\s\sTcl_ListObjAppendElement(0,\slist,\sTcl_NewStringObj("",\s-1));\n\n\s\s\s\sprintf("'%s'\\n",\sTcl_GetStringFromObj(list,\s0));\n\n\s\s\s\sTcl_DecrRefCount(list);\n\n\s\s\s\sreturn\s(EXIT_SUCCESS);\n}\n\n\nThere\sare\sonly\sa\shandful\sof\sroutines\s"blessed"\sto\sbe\sused\sbefore\sTcl\sis\sinitialized,\sand\sthese\sare\snot\sa\smong\sthem.\s\s-brent\n--\nSee\sBrent's\snote\sabove.\s\sWhen\sinterfacing\swith\sTcl,\sa\scertain\nlevel\sof\sinitialization\sis\srequired\sfor\sTcl\sto\soperate\sproperly.\s\n--\s12/14/1999\shobbs\n\n
J foundin obsolete:\s8.0.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 10.\sObjects
J title bug\sin\sTcl\sobject\sroutines:\sremove\sTcl_GetObjType\scall,\sand\s
J type Bug
K 218005ffffffffffffffffffffffffffffffffff
U nobody
Z 53ce1db0310350d227ed79b0d64550b7