Skip to content
Tcl Source Code History Of Ticket 1791190fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1791190fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1791190fffffffffffffffffffffffffffffffff

  1. Ticket change [9170694014] (rid 120614) by dkf on 2007-09-09 19:19:44:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      [20:15]apwdkf_, as the first implementation round of itcl is done, I would like to come back to the public C-API interfaces I would like to have. I have pasted them here for discussion with you: http://paste.tclers.tk/379
      
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dkf"
    10. subsystem initialized to: "None"
    11. title initialized to: "TclOO: extra interfaces for apw"
    12. type initialized to: "Patch"
  2. Add attachment "extra.c" [6963a280fc] (rid 103241) by dkf on 2007-09-10 02:19:44.

  3. Ticket change [74c1e432db] (rid 105263) by dkf on 2007-09-10 02:19:44:

    1. icomment:
      
      
      File Added - 244854: extra.c
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [863d354639] (rid 131465) by dkf on 2007-10-02 05:18:26:

    1. subsystem changed to: "35. TclOO Package"
  5. Ticket change [fb4db1db42] (rid 92035) by dkf on 2007-12-30 22:35:15:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: YES
      
      Tcl_Method
      Tcl_NewProcMethod(
          Tcl_Interp *interp,         /* The interpreter containing the object. */
          Tcl_Object oPtr,            /* The object to modify. */
          TclOO_PreCallProc preCallPtr,
          TclOO_PostCallProc postCallPtr,
          Tcl_ProcErrorProc errProc,
          ClientData clientData,
          Tcl_Obj *nameObj,           /* The name of the method, which must not be
                                       * NULL. */
          Tcl_Obj *argsObj,           /* The formal argument list for the method,
                                       * which must not be NULL. */
          Tcl_Obj *bodyObj,           /* The body of the method, which must not be
                                       * NULL. */
          int flags,                  /* Whether this is a public method. */
          ClientData *clientData2)
      {
          ProcedureMethod *pmPtr;
          Tcl_Method method;
      
          method = (Tcl_Method)TclOONewProcMethod(interp, (Object *)oPtr, flags,
                  nameObj, argsObj, bodyObj, &pmPtr);
          pmPtr->flags = flags & USE_DECLARER_NS;
          pmPtr->preCallProc = preCallPtr;
          pmPtr->postCallProc = postCallPtr;
          pmPtr->errProc = errProc;
          pmPtr->clientData = clientData;
          if (clientData2 != NULL) {
              *clientData2 = pmPtr;
          }
          return method;
      }
      Tcl_Method
      Tcl_NewProcClassMethod(
          Tcl_Interp *interp,         /* The interpreter containing the class. */
          Tcl_Class clsPtr,           /* The class to modify. */
          TclOO_PreCallProc preCallPtr,
          TclOO_PostCallProc postCallPtr,
          Tcl_ProcErrorProc errProc,
          ClientData clientData,
          Tcl_Obj *nameObj,           /* The name of the method, which may be NULL;
                                       * if so, up to caller to manage storage
                                       * (e.g., because it is a constructor or
                                       * destructor). */
          Tcl_Obj *argsObj,           /* The formal argument list for the method,
                                       * which may be NULL; if so, it is equivalent
                                       * to an empty list. */
          Tcl_Obj *bodyObj,           /* The body of the method, which must not be
                                       * NULL. */
          int flags,                  /* Whether this is a public method. */
          ClientData *clientData2)
      {
          ProcedureMethod *pmPtr;
          Method *method;
      
          method = TclOONewProcClassMethod(interp, (Class *)clsPtr, flags,
                  nameObj, argsObj, bodyObj, &pmPtr);
          pmPtr->flags = flags & USE_DECLARER_NS;
          pmPtr->preCallProc = preCallPtr;
          pmPtr->postCallProc = postCallPtr;
          pmPtr->errProc = errProc;
          pmPtr->clientData = clientData;
          if (clientData2 != NULL) {
              *clientData2 = pmPtr;
          }
          return (Tcl_Method)method;
      }
      #define PUBLIC_METHOD     0x01  /* This is a public (exported) method. */
      #define PRIVATE_METHOD    0x02  /* This is a private (class's direct instances
                                       * only) method. */
      #define USE_DECLARER_NS   0x80
      /*
       * ----------------------------------------------------------------------
       *
       * Tcl_PublicObjectCmd, Tcl_PrivateObjectCmd --
       *
       * ----------------------------------------------------------------------
       */
      int
      Tcl_PublicObjectCmd(
          ClientData clientData,
          Tcl_Interp *interp,
          Tcl_Class clsPtr,
          int objc,
          Tcl_Obj *const *objv)
      {
          Object *oPtr = (Object *)clientData;
          int result;
      
          result = TclOOObjectCmdCore(oPtr, interp, objc, objv, PUBLIC_METHOD,
                  &oPtr->publicContextCache, (Class *)clsPtr);
          return result;
      }
      
      int
      Tcl_PrivateObjectCmd(
          ClientData clientData,
          Tcl_Interp *interp,
          Tcl_Class clsPtr,
          int objc,
          Tcl_Obj *const *objv)
      {
          Object *oPtr = (Object *)clientData;
          int result;
      
          result = TclOOObjectCmdCore(oPtr, interp, objc, objv, PRIVATE_METHOD,
                  &oPtr->publicContextCache, (Class *)clsPtr);
          return result;
      }
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [35ed8516d0] (rid 107028) by dkf on 2007-12-30 22:35:43:

    1. priority changed to: "6"
  7. Ticket change [8c81708917] (rid 127752) by dkf on 2008-01-06 05:56:47:

    1. closedate changed to: "2008-01-05T22:56:47"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      Originator: YES
      
      Accepted as three functions:
        TclOOInvokeObject in tclOO.c (approx Tcl_PublicObjectCmd and Tcl_PrivateObjectCmd rolled into one, with fewer type hazards)
        TclOONewProcClassMethodEx and TclOONewProcInstanceMethodEx in tclOOMethod.c (Tcl_NewProcClassMethod and Tcl_NewProcMethod respectively with minor type signature changes for sanity)
      
      All functions are in the private interface for now since they expose concepts (especially a "start class") and types (some of those callbacks) that are not public.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Accepted"
    7. status changed to: "Closed"
    8. username: "dkf"