Author: tpot Date: 2005-08-05 15:54:11 +0000 (Fri, 05 Aug 2005) New Revision: 9124
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9124 Log: Handle more types pointers to simple types. Modified: branches/SAMBA_4_0/source/script/build_smb_interfaces.pl Changeset: Modified: branches/SAMBA_4_0/source/script/build_smb_interfaces.pl =================================================================== --- branches/SAMBA_4_0/source/script/build_smb_interfaces.pl 2005-08-05 15:53:04 UTC (rev 9123) +++ branches/SAMBA_4_0/source/script/build_smb_interfaces.pl 2005-08-05 15:54:11 UTC (rev 9124) @@ -77,7 +77,7 @@ my $f = shift; my $suffix = shift; - my $type = "UNKNOWN"; + my $type = $f->{TYPE}; if ($f->{TYPE} eq "char" and $f->{POINTERS} == 1) { $type = "string"; @@ -88,8 +88,16 @@ $type =~ s/_t$//; } + my $deref = "&"; + if ($f->{POINTERS} == 1 && $type ne "string") { + $deref = ""; + } + foreach my $x (@{$f->{NAME}}) { - print FILE "\tNDR_CHECK(ejs_pull_$type(ejs, v, \"$x\", &r->$suffix.$x));\n"; + if ($f->{POINTERS} > 0) { + print FILE "\t// alloc $x?\n"; + } + print FILE "\tNDR_CHECK(ejs_pull_$type(ejs, v, \"$x\", ${deref}r->$suffix.$x));\n"; } }