Skip to content
Tcl Source Code History Of Ticket 0b7f66f817
Login

History Of Ticket 0b7f66f817

Artifacts Associated With Ticket 0b7f66f817

  1. Ticket change [faee9f88dc] (rid 185058) by aotto1968 on 2020-07-21 07:35:43:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      man Tcl_NewMethod
      
      Tcl_NewMethod(interp, class, nameObj, isPublic, methodTypePtr, clientData)
      
      int isPublic (in)                   A flag saying what the visibility of the method is. The only supported public values of this flag are 0 for a non-exported method, and 1 for an exported method.
      
      generic/tclOOMethod.c
      
      line 206: Tcl_NewMethod...
      int flags,                  /* Whether this is a public method. */
      
      line 252:
          if (flags) {
              mPtr->flags |= flags & (PUBLIC_METHOD | PRIVATE_METHOD);
          }
      
      line 368:
      /*  
       * Bits for the 'flags' field of the call chain.
       */ 
          
      #define PUBLIC_METHOD     0x01  /* This is a public (exported) method. */
      #define PRIVATE_METHOD    0x02  /* This is a private (class's direct instances
                                       * only) method. */
      
    5. foundin initialized to: "latest"
    6. is_private initialized to: "0"
    7. login: "aotto1968"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "ab48850598bef757668b964e7db734c443c95361"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "aotto1968"
    14. subsystem initialized to: "69. Other"
    15. title initialized to: "dukomentation"
    16. type initialized to: "Bug"
  2. Ticket change [7464c81708] (rid 185080) by jan.nijtmans on 2020-07-21 08:11:06:

    1. closedate changed to: "2459051.84104354"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Well: "The only supported public values of this flag are .."
      
      So, this means that the PRIVATE_METHOD flag value is not supported for Tcl 8.6. That doesn't mean it cannot be used, you'r just on your own if you do that.
      
      In Tcl 8.7, those flags are supported:
      <pre>
      $ man Tcl_NewMethod
      int flags (in)                      A  flag  saying  (currently)  what  the  visibility  of  the  method  is.  The  supported  public  values  of this flag are
                                                 TCL_OO_METHOD_PUBLIC (which is fixed at 1 for backward compatibility)  for  an  exported  method,  TCL_OO_METHOD_UNEXPORTED
                                                 (which is fixed at 0 for backward compatibility) for a non-exported method, and TCL_OO_METHOD_PRIVATE for a private method. │
      
      </pre>
      
      So, if you want to use this, try Tcl 8.7. I don't think it's wise to start supporting this on 8.6 and update the documentation, since the TIP adding this was only accepted for Tcl 8.7.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Out of Date"
    7. status changed to: "Closed"