Commit 39bcc588 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: use if defined $proc->{outargs} not if exists $proc->{outargs}

in app.pl and lib.pl because pdbgen copies this stuff round so
generically that it always exists. Fixes a ton of perl warnings.
parent f3b7d234
......@@ -67,7 +67,7 @@ sub declare_args {
local $result = "";
foreach (@_) {
my @args = @{$proc->{$_}} if exists $proc->{$_};
my @args = @{$proc->{$_}} if (defined $proc->{$_});
foreach (@args) {
my ($type, $name) = &arg_parse($_->{type});
......@@ -104,7 +104,7 @@ sub marshal_inargs {
my $result = "";
my %decls;
my @inargs = @{$proc->{inargs}} if exists $proc->{inargs};
my @inargs = @{$proc->{inargs}} if (defined $proc->{inargs});
foreach (@inargs) {
my($pdbtype, @typeinfo) = &arg_parse($_->{type});
......@@ -132,7 +132,7 @@ sub marshal_outargs {
my $proc = shift;
my $result;
my $argc = 0;
my @outargs = @{$proc->{outargs}} if exists $proc->{outargs};
my @outargs = @{$proc->{outargs}} if (defined $proc->{outargs});
if ($success) {
$result = <<CODE;
......@@ -569,8 +569,8 @@ sub generate {
my $proc = $main::pdb{$name};
my $out = \%{$out{$proc->{group}}};
my @inargs = @{$proc->{inargs}} if exists $proc->{inargs};
my @outargs = @{$proc->{outargs}} if exists $proc->{outargs};
my @inargs = @{$proc->{inargs}} if (defined $proc->{inargs});
my @outargs = @{$proc->{outargs}} if (defined $proc->{outargs});
my $help = $proc->{help};
......
......@@ -78,8 +78,8 @@ sub generate {
my $proc = $main::pdb{$name};
my $out = \%{$out{$proc->{group}}};
my @inargs = @{$proc->{inargs}} if exists $proc->{inargs};
my @outargs = @{$proc->{outargs}} if exists $proc->{outargs};
my @inargs = @{$proc->{inargs}} if (defined $proc->{inargs});
my @outargs = @{$proc->{outargs}} if (defined $proc->{outargs});
my $funcname = "gimp_$name"; my $wrapped = "";
my %usednames;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment