Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b5f48cfa70c4170b97be8bcd25a3ac81c90884fc
Ticket: 218401ffffffffffffffffffffffffffffffffff
Types without Info is a dreadful waste
User & Date: nobody on 2000-10-26 00:57:08
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 5294 RFE
    Version: 8.3
    SubmitDate: '2000-04-28'
    LastModified: '2000-05-17'
    Severity: MED
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: All
    FixedDate: '2000-10-25'
    ClosedDate: '2000-05-17'
    
    
    Name:
    Graham Swallow
    
    DesiredBehavior:
    What is the use of defining your own type, but not being able to
    add your own information, in the objects type record?
    obj->typePtr->*  should look like this
    
    typedef struct Tcl_ObjType {
        char *name; 
        Tcl_FreeInternalRepProc *freeIntRepProc;
        Tcl_DupInternalRepProc *dupIntRepProc;
        Tcl_UpdateStringProc *updateStringProc;
        Tcl_SetFromAnyProc *setFromAnyProc;
    // add these
    ClientData ExtnMgr; // MUST be unique pointer
    ClientDataItem_Type_Info; // no free requred
    } Tcl_ObjType;
    
    Both might be NULL for core components, or extensions,
    
    ExtnMgr must be unique (or null), and has no usefulness except for
    if( ExtnMgr == MyExtnMgr )  {
    // its worth looking at the Item_type_info->*
    // and the format there is *my* format
    }
    
    Item_type_Info belongs to my extension manager, it is the useful part.
    It gives info on a per-type basis. 
    
    Without this being a part of obj->typePtr, I have to use some slow/clumsy mechanism.
    
    Changes to the Tcl Core:
    redefine that struct
    and init it NULL in RegisterObj
    add RegisterObjWithoutClearingExtnFields
    plus future "RegisterObj" wont clear fields after 9.0 
    
    ExtnMgr "must be" a pointer so that is is guaranteed to be unique (or null)
    but it remains as opaque ClientData to all other extensions. No delete required ?
    
    Graham
    
    
    
    It was pointed out in discussion on the newsgroup that use of
    extended objects provides the necessary functionality:
      http://x34.deja.com/=dnc/getdoc.xp?AN=616571207 
    -- 05/17/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "10. Objects"
  10. title changed to: "Types without Info is a dreadful waste"
  11. type changed to: "Bug"