Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d69854ed4bbb1c5284ca9ee988a7e54e7b1575cb58185552755cbf4c5438f0b4
Ticket: 3c32a3f8bd054837124c84f1725003e5a3eec028
TclOO - mixing an object
User & Date: pooryorick on 2017-11-01 20:57:39
Changes

  1. icomment:
    The problem lies in TclOO.c/ReleaseClassContents(), in a section that seems to
    be about removing a class that has been mixed into one of its instances (an
    unusual use case, to say the least):
    
    <code><verbatim>
    for(j=0 ; j<instancePtr->mixins.num ; j++) {
        Class *mixin = instancePtr->mixins.list[j];
        if (mixin == clsPtr) {
            instancePtr->mixins.list[j] = NULL;
        }
    }
    </verbatim></code>
    
    Leaving a <code>NULL<code> in the list breaks expectations.  Instead, that
    particular item should be unstitched from the list.
    
  2. login: "pooryorick"
  3. mimetype: "text/x-fossil-wiki"