Re: gperl_callback_invoke userdata copy

Kevin Ryde wrote:

That's so.  Something like

    my $something = 1;
    $obj->signal_connect (sig => &my_func, $something);
    sub my_func {
      $_[-1] = 2;

Leaves the original $something unchanged.  signal_connect() copies with
newSVsv then passes that new sv to the callbacks.  I'll try to reword it
a bit.  Perhaps there's somewhere good in the main perl docs that could
be cross referenced on that sort of copy/shallow-copy/whatnot.

Ah, I forgot about the newSVsv in gperl_closure_new_with_marshaller and thus gperl_signal_connect.

Your new doc patch looks great.  Committed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]