Menu

#242 ProcedureMethod clientData support

4.0*
open
None
5
2013-03-15
2013-03-15
Don Porter
No

Itcl calls the Tcl internal routines
TclOONewProcMethod() and passes to them
a clientData argument. The value passed
in is an (ItclMemberFunc *).

The Tcl_Method machinery in tclMethod.cc
provides (poorly) for setting up callbacks
to manage the cloning and deleting of this
clientData value. Itcl is not yet making use
of these callbacks. For a while I thought this
contributed to bug 240, but it had a fix without
needing to set up deletion callbacks to achieve
it. However, I don't see how Itcl can really get
away without handling the clone callback. The
default behavior is for both the original and
the clone to hold the same clientData, which in
this case would be pointers to the same shared
ItclMemberFunc struct, which holds fields almost
certain to be incorrect for the new clone.
Once clone callbacks go in, delete callbacks
will probably be needed to.

I would expect the bugginess speculated about
in this ticket to show up whenever someone
attempts to call [oo::copy] on an Itcl object.

Discussion

  • Don Porter

    Don Porter - 2013-03-15

    Apparently I'm supposed to be entering comments
    here in some sort of markup langauge.

    I did not do that. I entered plain text.

    Yeah, let's make reporting bugs more of a chore.
    That's a good idea.

     
  • Don Porter

    Don Porter - 2013-03-15
    Plain *text* **ya** ***jerks***!!!
    
     

Log in to post a comment.