Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6568d0267c2813ad7c643fd2f434deb0068904a3
Ticket: 1871041fffffffffffffffffffffffffffffffff
additional optional callback for access checking
User & Date: wiede on 2008-01-14 12:25:59
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    This request is just some thoughts I had for beeing able to speed up itcl-ng, so maybe the solution is completely different than I am suggesting. I have not yet implemented/tried the stuff described here.
    
    The access checking rules for itcl functions are as follows (from the Itcl source code):
    
    Itcl_CanAccess()
    Checks to see if a class member can be accessed from a particular namespace context.  Public things can always be accessed.  Protected things can be accessed if the "from" namespace appears in the inheritance hierarchy of the class namespace.  Private things can be accessed only if the "from" namespace is the same as the class that contains them.
    
    Returns 1/0 indicating true/false.
    
    Itcl_CanAccessFunc()
    
    Checks to see if a member function with the specified protection level can be accessed from a particular namespace context.  This follows the same rules enforced by Itcl_CanAccess, but adds one special case:  If the function is a protected method, and if the current context is a base class that has the same method, then access is allowed.
    
    Returns 1/0 indicating true/false.
    
    
    As I don't think it makes sense to directly implement these rules in tclOOCall AddMethodToCallChain, I think it would be better to have an optional callback (on a per class base) to do the additional checking.
    
    This would help to avoid additional code and later checking when calling the function in itcl (as it is done at the moment)
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "wiede"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "additional optional callback for access checking"
  12. type changed to: "RFE"