Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9226dd2f90a00cd1aa8cd2f350292e2d75fb6078
Ticket: 465213d1715f9e2c0eba602a7f802ec4ea11d246
Tcl_NewMethod() documentation error
User & Date: dgp on 2015-06-19 15:54:10
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    The documentation for Tcl_NewMethod:
    
           Tcl_Method
           Tcl_NewMethod(interp, class, nameObj, isPublic,
                         methodTypePtr, clientData)
    
    ...
    
           int isPublic (in)                   A boolean flag saying  whether  the
                                               method is to be exported.
    
    
    seems to be mistaken.
    
    The implementation of Tcl_NewMethod() calls its third argument "flags"
    and it pulls from "flags" the particular bit settings PUBLIC_METHOD
    and PRIVATE_METHOD for storing in the new Method struct .
    
    The upshot is that passing the values 1 or 2 or 3 which as booleans
    are all the same "true" value, actually will result in different
    behaviors, some potentially seriously broken.
    
    Either the documented interface or the implementation should be
    chosen to survive, with the other adjusted as needed.  If the interface
    is revised, the bit definitions will need exporting.
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "dgp"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "dgp"
  13. subsystem changed to: "35. TclOO Package"
  14. title changed to: "Tcl_NewMethod() documentation error"
  15. type changed to: "Bug"