Artifacts Associated With Ticket 949507ffffffffff
Ticket change [f47e81c687] (rid 129929) by bgriffin on 2004-05-06 21:16:41:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I pulled the following code out of tkDND: if (Tcl_GetIndexFromObj(infoPtr->interp, Tcl_GetObjResult(infoPtr->interp), Actions, "action", 0, &index) == TCL_OK) { I'm sorry I don't have a reproducable testcase for you, but, Is it reasonable and legal to pass an ObjResult object into a function this way or should the ObjResult object be dupped first? The problem is that if GetIndex reports an error, it will write to the interp result object and in this case, one of the strings appended to the result string is the result string itself (i.e. the passed in Obj!) So, is this a bug? a feature? abuse of the API? -Brian - foundin initialized to: "obsolete: 8.4.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "bgriffin"
- subsystem initialized to: "10. Objects"
- title initialized to: "ObjResult feedback loop?"
- type initialized to: "Bug"
Ticket change [d43d3173df] (rid 123411) by bgriffin on 2004-05-07 04:51:10:
- icomment:
Logged In: YES user_id=22949 I see this is the same issue as 875395. Never mind! -Brian
- login: "bgriffin"
- mimetype: "text/plain"
- username: "bgriffin"
- icomment:
Ticket change [a85b82139e] (rid 98974) by dkf on 2004-05-07 15:27:56:
- icomment:
Logged In: YES user_id=79902 The core does all sorts of tricks with assuming blank objects by default, but it is really not recommended. From time to time, I have a quick blitz to remove more instances of the anti-pattern: Tcl_SetIntObj(Tcl_GetObjResult(interp), ....) etc. Under normal builds, doing the version with "allocation" is virtually as efficient and *much* easier to make robust.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "2"
- username: "dkf"
- icomment:
Ticket change [64c76d4c93] (rid 92832) by msofer on 2004-07-08 03:17:43:
- closedate changed to: "2004-07-07T20:17:43"
- closer changed to: "msofer"
- resolution changed to: "Duplicate"
- status changed to: "Closed"