Overview
| Artifact ID: | 10dab1630982fa9bee2f941405de1516b225943b |
|---|---|
| Ticket: | 1988779fffffffffffffffffffffffffffffffff
Tcl_SetStringObj called with shared object |
| User & Date: | vasiljevic on 2008-06-12 11:19:11 |
Changes
- icomment:
Logged In: YES user_id=95086 Originator: NO I personally do not care as long as it works. I believe this pattern is left in the code by mistake as I tried to change that behaviour long time ago. And, I haven't sucked it out of my finger. This stood (perhaps still stays) in the Tcl docs as a preffered way how to handle result object. Do not ask me where and when I read that. I can't remember. I just now I read that and wrote it accodring to the recomendation, just to find out that this brought lots of problems down the road. So I wholesale changed all my code to scrap those out. Obviously in the threading extension there are places where this is still used. I will go thru and remove all those parts. Instead of Tcl_SetStringObj(Tcl_GetObjResult(interp), resultPtr->result, -1); it will read Tcl_SetObjResult(interp, Tcl_NewStringObj(resultPtr->result, -1)); The original "idea" was that the former should save us the need to create new Tcl_Obj as Tcl result should already point to a good one. And that one should not be shared. This is sometimes not true for whatever reasons, I do not know. Thanks for the report. Zoran
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"