Overview
| Artifact ID: | b5f48cfa70c4170b97be8bcd25a3ac81c90884fc |
|---|---|
| Ticket: | 218401ffffffffffffffffffffffffffffffffff
Types without Info is a dreadful waste |
| User & Date: | nobody on 2000-10-26 00:57:08 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "10. Objects"
- title changed to: "Types without Info is a dreadful waste"
- type changed to: "Bug"