From: SourceForge.net <no...@so...> - 2009-09-30 03:11:39
|
Bugs item #2857044, was opened at 2009-09-11 14:22 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2857044&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Don Porter (dgp) Assigned to: Nobody/Anonymous (nobody) Summary: freeIntRepProc audit Initial Comment: Brief discussion on chat concluded that the freeIntRepProc of any Tcl_ObjType ought to set the typePtr field to NULL so that the Tcl_Obj is not left in an inconsistent state. At least some freeIntRepProc's in the core fail to meet this expectation. Search and destroy. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2009-09-29 23:11 Message: Tcl sources updated. Tk still needs a look. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-09-14 12:43 Message: Adding it to the TclFreeIntRep macro is a fine idea too, but can only help the callers of the macro. Since the macro is private, the only callers ought to be within Tcl itself. For the sake of extensions, we still need each freeIntRepProc to do its own housekeeping as well. Yes, this is a gap in the interface. We ought to have a public routine that plays this role. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2009-09-14 04:00 Message: Agreed, but shouln't that be the responsibility of the TclFreeIntRep macro? Currently, a lot of TclFreeIntRep calls are followed by setting (objPtr)->typePtr to NULL! The freeIntRepProc is not supposed to be called directly, so doing it in TclFreeIntRep has the advantage that it works for freeIntRep functions outside of the core as well. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2857044&group_id=10894 |