Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f9965db6c0ee671855e8a831c8ab097dafa53a1232a3a83d36f240d375659e05
Ticket: b5bd08df8d61b4ea9bf0cc885f790b367c430a9f
The "int" type registration should be restored.
User & Date: marc_culler on 2024-07-04 01:10:19
Changes

  1. icomment:
    @jan: I rewrote part of _tkinter.c using Tcl_GetNumberFromObj() and it
    worked great.  I agree that you could call this the "correct" way.  Except
    for one thing, which I don't understand.  Why did you only do part of the job?
    Why aren't there constants TCL_STRING, TCL_LIST, TCL_DICT etc, and
    why isn't there a Tcl_GetValueFromObj() which uses those constands?
    
    It works fine to return a void* pointer to the internal data of the object
    and set an integer variable to indicate what the object type is.  A switch
    on the value of that integer is efficient enough (even if it means testing 
    twice) and makes for clean code.  The addresses of the core Tcl_ObjType
    structs can be private to the TclObj.c file, which is appropriate.
    
    If there was a Tcl_GetValueFromObj then as far as I can tell tkinter
    would have no need to use typePtrs, and no need for type registration.
    
  2. login: "marc_culler"
  3. mimetype: "text/plain"
  4. username: "Marc Culler"