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

History Of Ticket 2082583fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 2082583fffffffffffffffffffffffffffffffff

  1. Ticket change [988633d2d2] (rid 110616) by nobody on 2008-08-29 15:10:12:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl: 8.6a3
      Linux debsam 2.6.18-6-k7 #1 SMP Mon Aug 18 09:20:26 UTC 2008 i686 GNU/Linux
      
      This don't work:
      ---- begin mydo.c ----
      #include <tcl.h>
      #include <tclOO.h>
      
      int
      do_call (
               ClientData        clientData,
               Tcl_Interp*       interp,
               Tcl_ObjectContext objContext,
               int               objc,
               Tcl_Obj* const    objv[]
            ) {
         Tcl_SetResult (interp, "do", TCL_VOLATILE);
         return TCL_OK;
      };
      
      int
      Mydo_Init (Tcl_Interp* interp) {
         Tcl_Obj*    ooClassName;
         Tcl_Object  ooClassObject;
         Tcl_Class   ooClass;
         Tcl_Object  newClassObject;
         Tcl_Class   newClass;
         Tcl_Obj*    doMethodName;
         Tcl_Method  doMethod;
         Tcl_MethodType doMethodType = { TCL_OO_METHOD_VERSION_CURRENT, "do", do_call, NULL, NULL };
      
         ooClassName = Tcl_NewStringObj ("oo::class", -1);
         ooClassObject = Tcl_GetObjectFromObj (interp, ooClassName);
         ooClass = Tcl_GetObjectAsClass (ooClassObject);
         newClassObject = Tcl_NewObjectInstance (interp, ooClass, "MyClass", NULL, 0, NULL, 0);
         newClass    = Tcl_GetObjectAsClass (newClassObject);
         doMethodName = Tcl_NewStringObj ("do", -1);
         doMethod = Tcl_NewMethod (interp, newClass, doMethodName, 1, &doMethodType, NULL);
         return TCL_OK;
      }
      
      ----- begin make ----
      gcc -shared -Wl,-soname,libmydo.so $(TCL_CFLAGS) $(TCL_LIBS) -o libmydo.so mydo.c
      
      ---- begin mydo.tcl ----
      
      puts "load ./libmydo.so"
      load ./libmydo.so
      
      puts "MyClass create obj"
      MyClass create obj
      
      puts "set do \[obj do\]"
      set do [obj do];# here is a problem
      
      puts do=$do
      ---- end mydo.tcl ----
      
      It work, if I change 'doMethodType' to:
      "static Tcl_MethodType doMethodType = { ..."
      
      Perhaps, Tcl_NewMethod sould use internal a copy of Tcl_MethodType and not work with original?
      
      [email protected]
      
    4. foundin initialized to: "obsolete: 8.6a3"
    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: "nobody"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "Tcl_NewMethod memory (un)allocation"
    12. type initialized to: "Bug"
  2. Ticket change [5d4a26f7f0] (rid 115439) by dkf on 2008-08-29 22:34:56:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      What on earth is wrong with just using a static structure? The method type descriptor really is something I'd not expect to be changing during the life of a program.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [db4c584b2f] (rid 107935) by nobody on 2008-08-30 03:50:53:

    1. icomment:
      Logged In: NO 
      
      My mistake. This can be closed. This isn't a bug.
      
      The poiner to 'Tcl_ObjectMetadataType*' is the unique key of every metadata, and not somewhat other.
      
      [email protected]
      
      
      
    2. login: "[email protected]"
    3. mimetype: "text/plain"
    4. username: "[email protected]"
  4. Ticket change [41c168b055] (rid 116242) by dkf on 2008-09-02 22:57:42:

    1. closedate changed to: "2008-09-02T15:57:42"
    2. closer changed to: "dkf"
    3. resolution changed to: "Wont Fix"
    4. status changed to: "Closed"