.
D 2000-10-26T00:43:40
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s861\sBug\nVersion:\s8.1a2\nSubmitDate:\s'1998-11-25'\nLastModified:\s'1998-12-08'\nSeverity:\sSER\nStatus:\sClosed\nSubmitter:\spat\nChangedBy:\sstanton\nRelatedBugIDs:\s786\nOS:\sAll\nOSVersion:\sNA\nMachine:\sNA\nFixedDate:\s'2000-10-25'\nFixedInVersion:\sNA\nClosedDate:\s'1998-12-08'\n\n\nDate:\sMon,\s2\sNov\s1998\s11:59:45\s-0800\s(PST)\nTo:\[email protected]\nCc:\[email protected]\nSubject:\sTclEvalObj\sdoes\snot\swork\nFrom:\[email protected]\n\nTcl\s8.1a2\sBug\n\nemail:\s\[email protected]\nSupport:\s\sNone\nSeverity:\s\s2\nOperatingSystem:\s\sOther\nOperatingSystemVersion:\s\sSCO\sUnix,\sAIX\nCustomShell:\s\sNone\nSynopsis:\s\sTclEvalObj\sdoes\snot\swork\n\nReproducibleScript:\n#include\s<stdio.h>\n#include\s<stdlib.h>\n#include\s<string.h>\n#include\s<tcl.h>\n\n#define\sSTRING1\s"puts\s\\"hello\sthere\\";\sset\sa\s\\"hi\\";\sset\sb\s\\"there\\";\sset\sc\s\\"$a\n\s$b\\"\s"\n\nvoid\smain(void)\n{\nTcl_Obj\s*ftn1;\nTcl_Interp\s*Interp;\s\s\s//\smain\scommand\sinterp\n\n\s\s\s\sif\s(\s(Interp=Tcl_CreateInterp())\s==\sNULL)\n\s\s\s\s\s\s{\n\s\s\s\s\s\sfprintf(stderr,"Tcl_CreateInterp\sfailed\\n");\n\s\s\s\s\s\s}\n\n\s\s\s\sif\s(\s(ftn1=Tcl_NewStringObj(STRING1,strlen(STRING1)))\s==\sNULL)\n\s\s\s\s\s\sfprintf(stderr,"Tcl_NewStringObj\sfailed");\n\n\s\s\s\sif\s(Tcl_EvalObj(Interp,ftn1,0)\s!=\sTCL_OK)\n\s\s\s\s\s\s{\n\s\s\s\s\s\sfprintf(stderr,\s"code\sblock\sfailed\\n");\n\s\s\s\s\s\s}\n\s\s\s\sprintf("Result\s[%s]\\n",Tcl_GetStringFromObj(Tcl_GetObjResult(Interp),NULL));\n\s\s\s\sif\s(Tcl_EvalObj(Interp,ftn1,0)\s!=\sTCL_OK)\n\s\s\s\s\s\s{\n\s\s\s\s\s\sfprintf(stderr,\s"code\sblock\sfailed\\n");\n\s\s\s\s\s\s}\n\s\s\s\sprintf("Result\s[%s]\\n",Tcl_GetStringFromObj(Tcl_GetObjResult(Interp),NULL));\n\s\s\s\sif\s(Tcl_EvalObj(Interp,ftn1,0)\s!=\sTCL_OK)\n\s\s\s\s\s\s{\n\s\s\s\s\s\sfprintf(stderr,\s"code\sblock\sfailed\\n");\n\s\s\s\s\s\s}\n\s\s\s\sprintf("Result[%s]\\n",\sTcl_GetStringFromObj(Tcl_GetObjResult(Interp),NULL));\n}\n\nObservedBehavior:\nThe\sTclEvalObj\sonly\sexecutes\sthe\sTclObject\sonce,\nSubsequent\sTclEvalObj\sexecutions\sfail\son\sthat\sTclObject.\nIf\sthere\sare\smany\sTclEvalObj\son\smultiple\sTclObject\sexecuting\nmultiple\stimes,\sthe\sprograms\susually\scrashes.\nThis\scode\sruns\sfine\sand\sis\svery\sstable\sin\sTcl\s8.0.3\n\nDesiredBehavior:\nThe\sTclObject\sfrom\swhat\sI\sunderstand\sis\ssupposed\sto\nstore\sa\sbyte\scode\srepresentation\sof\sthe\sASCII\scommands\nafter\sthe\sfirst\sexecution\sof\sthe\scommand.\s\sSubsequent\sexecution\nshould\sbe\ssignificantly\sfaster\swhen\susing\sthe\sbyte\scode.\nThe\swork\saround\sis\sto\suse\sTclEval\sinstead\sof\sTclEvalObj\swhich\nslows\sdown\sthe\sperformance\ssignificantly.\n\n\n\n
J foundin obsolete:\s8.1a2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 10.\sObjects
J title TclEvalObj\sdoes\snot\swork
J type Bug
K 217788ffffffffffffffffffffffffffffffffff
U nobody
Z ab6c0688c19089bd9f317ff93c7641c7