Skip to content
Tcl Source Code Artifact [031961fccd]
Login

Artifact [031961fccd]

Artifact 031961fccd6f43a166d4795041271c5df468b2a0:

Ticket change [031961fccd] - Ticket [624919ffffffffff|624919ffff] <i>info exists fails on long array names</i> status still Closed with 4 other changes by nobody on 2002-10-21 22:49:03.
D 2002-10-21T22:49:03
J icomment Logged\sIn:\sNO\s\n\nYeah,\sworked\sfor\sme\son\swhat\sI\scould\stype\sin,\stoo,\sbut\sthe\sbug\s\npersists.\sI\sdid\ssome\smore\sdigging.\sHere's\sthe\sscenario.\nThe\soffending\sarray\sarguments\shave\sembedded\snulls\sat\sthe\s\nend.\sThe\sobjects\sare\screated\sin\sC:\ndicomDumpObject(\s...tcl\sargs\s...)\s{\nchar\sbuffer[8192];\nTcl_Obj\s*theSize,\s*element,\s*theTagd,\s*theTagl,\s\n*elementsize,\s*theList,\s*theString;\nsprintf(buffer,"");\nelement\s=\sTcl_NewStringObj(buffer,\sstrlen(buffer));\ntheString\s=\sTcl_NewStringObj("ELEMENTLIST",\s-1);\ntheList\s=\sTcl_NewListObj(1,\s&theString);\nstringLength\s=\selementItem->element.length;\nstrncpy((char\s*)scratch,\selementItem->element.d.string,\s\nstringLength);\nscratch[stringLength]\s=\s'\\0';\nTcl_AppendToObj(element,(char\s*)scratch,stringLength);\nTcl_ListObjAppendElement(NULL,theList,element);\nTcl_SetObjResult(interp,theList);\nreturn(TCL_OK);\n}\n\nThere\sare\sother\sitems\sin\sthe\slist,\ssuch\sthat\sthe\sentire\slist\sis\s\nputarray\sformat,\sso\sto\sread\sthe\sobjects\sinto\sTCL,\sI\suse:\narray\sset\sa\s[dicomDumpObject\s$o]\nThis\spopulates\sthe\sarray\scorrectly,\sbut\sthe\ssubscripts\sthat\s\ncontain\sappended\snulls\sfail\swhen\susing\s[info\sexists\sa($v)].\n\nYes,\sthe\sstring\sarray\snames\sare\sASN\svalues,\sprobably\smuch\s\nlike\sLDAP.\n\nThis\sprocedure\suses\sTCL\sfrom\send\sto\send,\safter\sthe\svalues\s\nare\scopied\sin\susing\sTcl_AppendToObj,\swhich\saccording\sto\sthe\s\nman\spage,\shandles\salmost\sanything.\n\n-Mahlon\n\n\n
J login nobody
J mimetype text/plain
J username nobody
K 624919ffffffffffffffffffffffffffffffffff
U nobody
Z ca2b5e86d3c80acf9781e19558a008df