Artifacts Associated With Ticket 3ff0e9c3766763bf
Ticket change [f7ff519bc0] (rid 177596) by rene on 2019-12-03 15:44:22:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
There is currently no way to get the class of an object without poking in tcl oo internals. This should be possible with a simple function p.e.: Tcl_Obj * Tcl_GetClassName( Tcl_Interp * interp, Tcl_Object object) { Tcl_Object classPtr; classPtr = (Tcl_Object)(((Object *)object)->selfCls->thisPtr); if (classPtr == NULL) return NULL; return Tcl_GetObjectName(interp, classPtr); } - foundin initialized to: "all"
- is_private initialized to: "0"
- login: "rene"
- priority initialized to: "5 Medium"
- private_contact initialized to: "b01eeb7d5874b6e5a8593e7c5eb485bf20fddefb"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "rene"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "Function to get class name of object"
- type initialized to: "RFE"
Ticket change [35b2e8cb86] (rid 226531) by dkf on 2024-05-23 14:01:31:
- icomment:
I'd go for `Tcl_ObjectGetClass()` or some name like that. ``` Tcl_Class Tcl_ObjectGetClass( Tcl_Object object) { return (Tcl_Class) (((Object *) object)->selfCls); } ``` The retrieval of the object from the class and the name from that object would be done with existing API calls. Or we can add in those helpers; it will be helpful if we can work out which ones so we can do this in one go. - login: "dkf"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [e48b4650a7] (rid 229854) by dkf on 2024-08-08 10:42:15:
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "6"
Ticket change [b9153b6765] (rid 261537) by serhiy.storchaka on 2026-11-13 11:18:44:
- closedate changed to: "2461357.9713335303"
- closer changed to: "serhiy.storchaka"
- icomment:
Implemented in Tcl 9.0 by TIP 605: Tcl_GetClassOfObject returns the class of an object and Tcl_GetObjectClassName returns the name of that class.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"