From 7537f9c9bb78992850a641973a8df818d2fcaf25 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Oct 2010 07:54:59 +0200 Subject: [PATCH] pidl:Python: don't generate functions with pipe elements metze --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index dfacfb33525..db2d79d2f64 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -12,7 +12,7 @@ use strict; use Parse::Pidl qw(warning fatal error); use Parse::Pidl::Typelist qw(hasType resolveType getType mapTypeName expandAlias); use Parse::Pidl::Util qw(has_property ParseExpr unmake_str); -use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred is_charset_array); +use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsPipe is_charset_array); use Parse::Pidl::CUtil qw(get_value_of get_pointer_to); use Parse::Pidl::Samba4 qw(ArrayDynamicallyAllocated); use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv); @@ -667,6 +667,15 @@ sub Interface($$$) next if has_property($d, "nopython"); next if has_property($d, "todo"); + my $skip = 0; + foreach my $e (@{$d->{ELEMENTS}}) { + if (ContainsPipe($e, $e->{LEVELS}[0])) { + $skip = 1; + last; + } + } + next if $skip; + my $prettyname = $d->{NAME}; $prettyname =~ s/^$interface->{NAME}_//; -- 2.34.1