summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-08-05 15:54:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:19 -0500
commit94e5cafff2f9eae90b4218c04eb554e0eff30316 (patch)
tree8064c00262b4f490fc27b9aed75ead0cfdad3845 /source4/script
parentb056c7ac3460db7c893527b55305d17417ae5e63 (diff)
downloadsamba-94e5cafff2f9eae90b4218c04eb554e0eff30316.tar.gz
samba-94e5cafff2f9eae90b4218c04eb554e0eff30316.tar.bz2
samba-94e5cafff2f9eae90b4218c04eb554e0eff30316.zip
r9124: Handle more types pointers to simple types.
(This used to be commit acd34c1cac151e16f5cecae8c80a01b36ccd3fc0)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/build_smb_interfaces.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/script/build_smb_interfaces.pl b/source4/script/build_smb_interfaces.pl
index 7c9bd3d365..3aacc6df55 100755
--- a/source4/script/build_smb_interfaces.pl
+++ b/source4/script/build_smb_interfaces.pl
@@ -77,7 +77,7 @@ sub print_field($$) {
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 @@ sub print_field($$) {
$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";
}
}