Skip to content
Tcl Source Code Artifact [b563407f82]
Login

Artifact [b563407f82]

Artifact b563407f82970fd9712cdc44b3047314223153ef:

Ticket change [b563407f82] - New ticket [3084489fffffffff|3084489fff] <i>Serious issue: Tcl_DuplicateObj isn&#39;t making a copy?</i>. by anonymous on 2010-10-10 00:43:20.
D 2010-10-10T00:43:20
J assignee msofer
J cmimetype text/plain
J comment http://mkextensions.sourceforge.net/mkGeneric13.htm\spackage\sprovides\sC\scommands\scalled\slminus\sand\slinter.\s\sUnder\sTcl\s8.4\sthe\scommands\swork\sas\sexpected.\s\sUnder\sTcl\s8.5.7\s(running\sin\sAOLserver\s4.5\son\sWindows,\shave\snot\stested\son\sany\sother\splatform),\sproviding\sa\spure\stcl\slist\s(no\sstring\srep)\sas\san\sargument\sto\slminus\swill\sresult\sin\shaving\sthe\soriginal\slist's\slist\sstructure\sresorted.\s\s(In\sthe\sscenario\sin\swhich\sI\sdiscovered\sthis,\sI\sactually\ssee\sthe\sstring\srep\sretain\sthe\soriginal\ssequence\seven\sas\slist\scommands\sreturn\sdata\sin\sdifferent\ssequence\sfrom\sits\sstring\srep\sbut\sI\sdon't\shave\sa\ssimple\stest\scase\sfor\sthat\sside-effect).\n\nAs\sfar\sas\sI\scan\stell\sby\slooking\sat\sthe\ssource\sfor\sthis\scommand,\sthe\sfirst\sthing\sit\sdoes\sis\sTcl_DuplicateObj\s(arvg[1])\s(it\suses\sa\s_DOB\smacro)\sand\sthen\sperforms\sits\ssort\soperation\son\sthe\sresulting\sobject.\n\nHere\sis\sTcl\scode\syou\scan\suse\sto\sreplicate\sthis\sproblem:\nset\slistA\s[list\sc\sb\sa]\nset\slistB\s[list\sc\sb\sa\sz]\nlminus\s$listB\s$listA\nlindex\s$listA\s0\n-\swill\sreturn\sa\sinstead\sof\sc\n\nAgain\slists\smust\sbe\spure.\sIf\syou\sdo\sset\slistA\s"c\sb\sa",\sthe\sproblem\sdoes\snot\soccur.\n\nFeel\sfree\sto\semail\sto\[email protected]\swith\sany\squestions
J foundin obsolete:\s8.5.7
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J subsystem 10.\sObjects
J title Serious\sissue:\sTcl_DuplicateObj\sisn't\smaking\sa\scopy?
J type Bug
K 3084489fffffffffffffffffffffffffffffffff
U 
Z b896335673dee5344d10628d10f30db9