Tcl Source Code

View Ticket
Login
Ticket UUID: 524802
Title: TclDecrRefCount macro op order
Type: Bug Version: None
Submitter: msofer Created on: 2002-03-02 15:32:19
Subsystem: 10. Objects Assigned To: msofer
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-03-06 22:06:02
Resolution: Accepted Closed By: msofer
    Closed on: 2002-03-06 15:06:02
Description:
The TclDecrRefCount macro first clears the string rep,
then the internal rep. This is

(a) different from the operation of Tcl_DecrRefCount
(TclFreeObj), that clears the internal rep first.

(b) dangerous, as some object type's internal rep might
well have a reference to its string rep.

Enclosed a patch that restores the correct order.
User Comments: msofer added on 2002-03-06 22:06:02:
Logged In: YES 
user_id=148712

Committed.

msofer added on 2002-03-02 22:32:19:

File Added - 18706: tclInt.h.diff

Attachments: