blob: d5bac559a1ad32a8f1b752b058f80bd3b469d241 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
--- Gimp.pm.orig Sat Dec 1 07:35:04 2001
+++ Gimp.pm Thu Apr 11 18:01:20 2002
@@ -392,6 +392,7 @@
sub callback {
my $type = shift;
my @cb;
+ my @res;
if ($type eq "-run") {
local $function = shift;
local $in_run = 1;
@@ -405,9 +406,7 @@
);
}
die_msg __"required callback 'run' not found\n" unless @cb;
- my @res;
for (@cb) { @res = &$_ }
- return wantarray ? @res : $res[0];
} elsif ($type eq "-net") {
local $in_net = 1;
_initialized_callback;
@@ -420,7 +419,7 @@
);
}
die_msg __"required callback 'net' not found\n" unless @cb;
- for (@cb) { &$_ }
+ for (@cb) { @res = &$_ }
} elsif ($type eq "-query") {
local $in_query = 1;
_initialized_callback;
@@ -431,7 +430,7 @@
);
}
die_msg __"required callback 'query' not found\n" unless @cb;
- for (@cb) { &$_ }
+ for (@cb) { @res = &$_ }
} elsif ($type eq "-quit") {
local $in_quit = 1;
{
@@ -440,8 +439,9 @@
@{$callback{quiet}},
);
}
- for (@cb) { &$_ }
+ for (@cb) { @res = &$_ }
}
+ return (wantarray) ? @res : $res[0];
}
sub register_callback($$) {
|