summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Typelist.pm3
-rwxr-xr-xsource4/pidl/tests/typelist.pl4
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Typelist.pm b/source4/pidl/lib/Parse/Pidl/Typelist.pm
index 8e311554bc..e635411f3c 100644
--- a/source4/pidl/lib/Parse/Pidl/Typelist.pm
+++ b/source4/pidl/lib/Parse/Pidl/Typelist.pm
@@ -138,7 +138,8 @@ sub is_scalar($)
return 1 if (ref($type) eq "HASH" and $type->{TYPE} eq "SCALAR");
if (my $dt = getType($type)) {
- return is_scalar($dt->{DATA}) if ($dt->{TYPE} eq "TYPEDEF");
+ return is_scalar($dt->{DATA}) if ($dt->{TYPE} eq "TYPEDEF" or
+ $dt->{TYPE} eq "DECLARE");
return 1 if ($dt->{TYPE} eq "SCALAR" or $dt->{TYPE} eq "ENUM" or
$dt->{TYPE} eq "BITMAP");
}
diff --git a/source4/pidl/tests/typelist.pl b/source4/pidl/tests/typelist.pl
index e538cb2e0d..376bd208f0 100755
--- a/source4/pidl/tests/typelist.pl
+++ b/source4/pidl/tests/typelist.pl
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use Test::More tests => 50;
+use Test::More tests => 52;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
@@ -55,6 +55,8 @@ is(0, is_scalar("nonexistant"));
is(1, is_scalar({TYPE => "ENUM"}));
is(0, is_scalar({TYPE => "STRUCT"}));
is(1, is_scalar({TYPE => "TYPEDEF", DATA => {TYPE => "ENUM" }}));
+is(1, is_scalar("mytypedef"));
+is(1, is_scalar({TYPE => "DECLARE", DATA => {TYPE => "ENUM" }}));
is(1, scalar_is_reference("string"));
is(0, scalar_is_reference("uint32"));