summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-12-01 00:43:52 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-12-10 02:53:35 +0000
commitfbe402edf55cc4dda8820645c7c4e20862969803 (patch)
tree36ba49c0ddd6011e4bf15a1b0fb453d929650b40 /pidl
parent51a11afecf590a26b784c1d2e484829330efa44f (diff)
downloadsamba-fbe402edf55cc4dda8820645c7c4e20862969803.tar.gz
pidl s4::Python: silence warnings
- do not redeclare variables in the same scope. - use $1 instead of \1, which perl just prefers. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 6f5bc69f3b8..84d4dade512 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -38,7 +38,7 @@ sub PrettifyTypeName($$)
{
my ($name, $basename) = @_;
- $basename =~ s/^.*\.([^.]+)$/\1/;
+ $basename =~ s/^.*\.([^.]+)$/$1/;
$name =~ s/^$basename\_//;
@@ -190,7 +190,6 @@ sub PythonElementGetSet($$$$$$) {
$self->indent;
$self->pidl("$cname *object = ($cname *)pytalloc_get_ptr(py_obj);");
my $mem_ctx = "pytalloc_get_mem_ctx(py_obj)";
- my $l = $e->{LEVELS}[0];
my $nl = GetNextLevel($e, $l);
if ($l->{TYPE} eq "POINTER" and
not ($nl->{TYPE} eq "ARRAY" and ($nl->{IS_FIXED} or is_charset_array($e, $nl))) and
@@ -1479,9 +1478,9 @@ sub Interface($$$)
$self->pidl("");
- my $signature = "\"$interface->{NAME}_abstract_syntax()\\n\"";
+ $signature = "\"$interface->{NAME}_abstract_syntax()\\n\"";
- my $docstring = $self->DocString($interface, $interface->{NAME}."_syntax");
+ $docstring = $self->DocString($interface, $interface->{NAME}."_syntax");
if ($docstring) {
$docstring = "$signature$docstring";