Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5bf2cfe6476a47318af0165d071e3ffbd8139ae8c270a109147d23b7a4805718
Ticket: 6e156333bcf233a26216e3ee3e94f2761e97a34b
Documentation: Contradiction in Tcl_GetSring/Tcl_GetStringFromObj vs Tcl_UpdateStringProc
User & Date: anonymous on 2019-07-22 20:00:32
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Tcl_GetString documentation (http://www.tcl.tk/man/tcl8.6/TclLib/StringObj.htm) says:
    [The object's string representation] is passed back as a writable pointer so
    that extension author creating their own Tcl_ObjType will be able to modify 
    the string representation within the Tcl_UpdateStringProc of their Tcl_ObjType.
    
    THE UPDATESTRINGPROC FIELD in http://www.tcl.tk/man/tcl8.6/TclLib/ObjectType.htm says:
    objPtr's bytes member is always NULL when it is called.
    
    This would seem to be a contradiction: if the bytes member is NULL, then 
    updateStringProc would need to be called to set it to non-null; trying to 
    invoke Tcl_GetString or Tcl_GetStringFromObj would just result in a 
    recursive call to updateStringProc -- unless the typePtr were temporarily 
    changed to a different type.
    
    Is that (temporary modification of the typePtr) the intended meaning?
    
    BTW: I don't know how to change my password on this site.
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9ab7cae6a79106af802b939550556c6a60bbac54"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "10. Objects"
  15. title changed to:
    Contradiction in Tcl_GetSring/Tcl_GetStringFromObj vs Tcl_UpdateStringProc
    
  16. type changed to: "Bug"