mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r3998: allow const arrays (see next commit to drsuapi.idl)
metze
(This used to be commit 7264a2227d
)
This commit is contained in:
parent
3558d8b40d
commit
ee0d68dc30
@ -208,11 +208,15 @@ sub HeaderTypedefProto($)
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
# parse a typedef
|
||||
# parse a const
|
||||
sub HeaderConst($)
|
||||
{
|
||||
my($const) = shift;
|
||||
$res .= "#define $const->{NAME}\t( $const->{VALUE} )\n";
|
||||
if (!defined($const->{ARRAY_LEN})) {
|
||||
$res .= "#define $const->{NAME}\t( $const->{VALUE} )\n";
|
||||
} else {
|
||||
$res .= "#define $const->{NAME}\t $const->{VALUE}\n";
|
||||
}
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -65,6 +65,14 @@ const: 'const' identifier identifier '=' anytext ';'
|
||||
"NAME" => $_[3],
|
||||
"VALUE" => $_[5]
|
||||
}}
|
||||
| 'const' identifier identifier array_len '=' anytext ';'
|
||||
{{
|
||||
"TYPE" => "CONST",
|
||||
"DTYPE" => $_[2],
|
||||
"NAME" => $_[3],
|
||||
"ARRAY_LEN" => $_[4],
|
||||
"VALUE" => $_[6],
|
||||
}}
|
||||
;
|
||||
|
||||
|
||||
@ -227,6 +235,7 @@ anytext: #empty
|
||||
| anytext '/' anytext { "$_[1]$_[2]$_[3]" }
|
||||
| anytext '+' anytext { "$_[1]$_[2]$_[3]" }
|
||||
| anytext '(' commalisttext ')' anytext { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
|
||||
| anytext '{' commalisttext '}' anytext { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
|
||||
;
|
||||
|
||||
identifier: IDENTIFIER
|
||||
|
Loading…
Reference in New Issue
Block a user