Re: gperl_callback_invoke userdata copy
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: gperl_callback_invoke userdata copy
- Date: Sat, 20 Sep 2008 12:56:23 +0200
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.
--
-Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]