Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ed8e1316c9a997e4b6cfb480768517f562b8fb34
Ticket: 1890579fffffffffffffffffffffffffffffffff
CMethod API for TclOO methods (similar to ProcedureMethod)
User & Date: wiede on 2008-02-10 12:37:12
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    For itcln-ng and maybe also for others it would be nice to allow C-implemented functions to be used a method implementation.
    
    Right now there is the ProcedureMethod interface (besides others) for adding methods to TclOO objects and classes. I think it would be very helpful to have a similar CMethod interface.
    
    The interface should be very similar to Procedure Method in that instead of Tcl_Obj *bodyObj there is a Tcl_ObjCmdProc *cMethod as a parameter to the functions of that API. The rest of all the necessary API functions should be identical (very similar) to the ProcedureMethod API functions.
    
    Instead of TclProcCompileProc(...) and TclObjInterpProcCore(...)there is a call to (cmPtr->cMethodPtr)(...) 
    
    For the script level I think it is not mandatory to have interfaces.
    
    Just for info:
    Itcl-ng uses a Register_CProc API to make the registration of functions with signature Tcl_ObjCmdProc available. And at the script level there is a cmethod additional interface for connecting script level method names with registered C-level methods. 
    
    I have a prototype implementation (in the itcl-ng sources) running, which has a lot of redundant duplicate code from file tclOOMethod.c. So I think that part would better fit there.
    
    Donal, as I know you like to implement it your way, I think the description here is enough for you, otherwise please let me know.
    
  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:
    CMethod API for TclOO methods (similar to ProcedureMethod)
    
  12. type changed to: "RFE"