[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Jan 5 03:11:02 MST 2011
The branch, master has been updated
via d89e762 pidl:Samba4/Python: avoid ';;' in generated C code.
via 2e45cd1 pidl:Samba4/Python: fix segfault when setting pointers to scalars.
via 2868fc8 pidl: regenerate lib/Parse/Pidl/Expr.pm from expr.yp
via c1c9e4a pidl: sync idl.yp with the CPP changes
via d9fd1f6 talloc: change version to 2.0.5 after a critical bugfix
from 6f51a1f talloc: fixed a use after free error
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d89e7622407539786af72ea05dd1de7de9154228
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 5 10:08:08 2011 +0100
pidl:Samba4/Python: avoid ';;' in generated C code.
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Wed Jan 5 11:10:34 CET 2011 on sn-devel-104
commit 2e45cd15ec4719b87e45db5e4a5c43dc1432936f
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 5 10:05:47 2011 +0100
pidl:Samba4/Python: fix segfault when setting pointers to scalars.
metze
commit 2868fc8a91c5ba410cb004aa56084dd906da4177
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 5 09:26:02 2011 +0100
pidl: regenerate lib/Parse/Pidl/Expr.pm from expr.yp
metze
commit c1c9e4a1c8fc8c38f8996e760da34976b97cfb6c
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 5 09:24:22 2011 +0100
pidl: sync idl.yp with the CPP changes
This is taken from commit 21b0d5e3b10711e6ce3bfad0c1ee2da09a60e232.
metze
commit d9fd1f684a718806cf6a03bc60b8651a50d63530
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 5 10:23:54 2011 +0100
talloc: change version to 2.0.5 after a critical bugfix
metze
-----------------------------------------------------------------------
Summary of changes:
.../ABI/{talloc-2.0.2.sigs => talloc-2.0.5.sigs} | 0
lib/talloc/wscript | 2 +-
pidl/idl.yp | 10 ++-
pidl/lib/Parse/Pidl/Expr.pm | 72 ++++++++++----------
pidl/lib/Parse/Pidl/Samba4/Python.pm | 5 +-
5 files changed, 49 insertions(+), 40 deletions(-)
copy lib/talloc/ABI/{talloc-2.0.2.sigs => talloc-2.0.5.sigs} (100%)
Changeset truncated at 500 lines:
diff --git a/lib/talloc/ABI/talloc-2.0.2.sigs b/lib/talloc/ABI/talloc-2.0.5.sigs
similarity index 100%
copy from lib/talloc/ABI/talloc-2.0.2.sigs
copy to lib/talloc/ABI/talloc-2.0.5.sigs
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index b4cb84b..e7cf83d 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
APPNAME = 'talloc'
-VERSION = '2.0.4'
+VERSION = '2.0.5'
blddir = 'bin'
diff --git a/pidl/idl.yp b/pidl/idl.yp
index 30247f9..0062859 100644
--- a/pidl/idl.yp
+++ b/pidl/idl.yp
@@ -653,11 +653,17 @@ sub parse_file($$)
my $saved_delim = $/;
undef $/;
my $cpp = $ENV{CPP};
+ my $options = "";
if (! defined $cpp) {
- $cpp = "cpp";
+ if (defined $ENV{CC}) {
+ $cpp = "$ENV{CC}";
+ $options = "-E";
+ } else {
+ $cpp = "cpp";
+ }
}
my $includes = join('',map { " -I$_" } @$incdirs);
- my $data = `$cpp -D__PIDL__$includes -xc "$filename"`;
+ my $data = `$cpp $options -D__PIDL__$includes -xc "$filename"`;
$/ = $saved_delim;
return parse_string($data, $filename);
diff --git a/pidl/lib/Parse/Pidl/Expr.pm b/pidl/lib/Parse/Pidl/Expr.pm
index 1230a71..24581d2 100644
--- a/pidl/lib/Parse/Pidl/Expr.pm
+++ b/pidl/lib/Parse/Pidl/Expr.pm
@@ -1127,7 +1127,7 @@ sub new {
[#Rule 2
'exp', 1,
sub
-#line 24 "./../pidl/expr.yp"
+#line 24 "expr.yp"
{ "\"$_[1]\"" }
],
[#Rule 3
@@ -1139,199 +1139,199 @@ sub
[#Rule 5
'exp', 2,
sub
-#line 30 "./../pidl/expr.yp"
+#line 30 "expr.yp"
{ "~$_[2]" }
],
[#Rule 6
'exp', 3,
sub
-#line 32 "./../pidl/expr.yp"
+#line 32 "expr.yp"
{ "$_[1] + $_[3]" }
],
[#Rule 7
'exp', 3,
sub
-#line 34 "./../pidl/expr.yp"
+#line 34 "expr.yp"
{ "$_[1] - $_[3]" }
],
[#Rule 8
'exp', 3,
sub
-#line 36 "./../pidl/expr.yp"
+#line 36 "expr.yp"
{ "$_[1] * $_[3]" }
],
[#Rule 9
'exp', 3,
sub
-#line 38 "./../pidl/expr.yp"
+#line 38 "expr.yp"
{ "$_[1] % $_[3]" }
],
[#Rule 10
'exp', 3,
sub
-#line 40 "./../pidl/expr.yp"
+#line 40 "expr.yp"
{ "$_[1] < $_[3]" }
],
[#Rule 11
'exp', 3,
sub
-#line 42 "./../pidl/expr.yp"
+#line 42 "expr.yp"
{ "$_[1] > $_[3]" }
],
[#Rule 12
'exp', 3,
sub
-#line 44 "./../pidl/expr.yp"
+#line 44 "expr.yp"
{ "$_[1] | $_[3]" }
],
[#Rule 13
'exp', 3,
sub
-#line 46 "./../pidl/expr.yp"
+#line 46 "expr.yp"
{ "$_[1] == $_[3]" }
],
[#Rule 14
'exp', 3,
sub
-#line 48 "./../pidl/expr.yp"
+#line 48 "expr.yp"
{ "$_[1] <= $_[3]" }
],
[#Rule 15
'exp', 3,
sub
-#line 50 "./../pidl/expr.yp"
+#line 50 "expr.yp"
{ "$_[1] => $_[3]" }
],
[#Rule 16
'exp', 3,
sub
-#line 52 "./../pidl/expr.yp"
+#line 52 "expr.yp"
{ "$_[1] << $_[3]" }
],
[#Rule 17
'exp', 3,
sub
-#line 54 "./../pidl/expr.yp"
+#line 54 "expr.yp"
{ "$_[1] >> $_[3]" }
],
[#Rule 18
'exp', 3,
sub
-#line 56 "./../pidl/expr.yp"
+#line 56 "expr.yp"
{ "$_[1] != $_[3]" }
],
[#Rule 19
'exp', 3,
sub
-#line 58 "./../pidl/expr.yp"
+#line 58 "expr.yp"
{ "$_[1] || $_[3]" }
],
[#Rule 20
'exp', 3,
sub
-#line 60 "./../pidl/expr.yp"
+#line 60 "expr.yp"
{ "$_[1] && $_[3]" }
],
[#Rule 21
'exp', 3,
sub
-#line 62 "./../pidl/expr.yp"
+#line 62 "expr.yp"
{ "$_[1] & $_[3]" }
],
[#Rule 22
'exp', 5,
sub
-#line 64 "./../pidl/expr.yp"
+#line 64 "expr.yp"
{ "$_[1]?$_[3]:$_[5]" }
],
[#Rule 23
'exp', 2,
sub
-#line 66 "./../pidl/expr.yp"
+#line 66 "expr.yp"
{ "~$_[1]" }
],
[#Rule 24
'exp', 2,
sub
-#line 68 "./../pidl/expr.yp"
+#line 68 "expr.yp"
{ "not $_[1]" }
],
[#Rule 25
'exp', 3,
sub
-#line 70 "./../pidl/expr.yp"
+#line 70 "expr.yp"
{ "$_[1] / $_[3]" }
],
[#Rule 26
'exp', 2,
sub
-#line 72 "./../pidl/expr.yp"
+#line 72 "expr.yp"
{ "-$_[2]" }
],
[#Rule 27
'exp', 2,
sub
-#line 74 "./../pidl/expr.yp"
+#line 74 "expr.yp"
{ "&$_[2]" }
],
[#Rule 28
'exp', 3,
sub
-#line 76 "./../pidl/expr.yp"
+#line 76 "expr.yp"
{ "$_[1]^$_[3]" }
],
[#Rule 29
'exp', 3,
sub
-#line 78 "./../pidl/expr.yp"
+#line 78 "expr.yp"
{ "($_[2])" }
],
[#Rule 30
'possible_pointer', 1,
sub
-#line 82 "./../pidl/expr.yp"
+#line 82 "expr.yp"
{ $_[0]->_Lookup($_[1]) }
],
[#Rule 31
'possible_pointer', 2,
sub
-#line 84 "./../pidl/expr.yp"
+#line 84 "expr.yp"
{ $_[0]->_Dereference($_[2]); "*$_[2]" }
],
[#Rule 32
'var', 1,
sub
-#line 88 "./../pidl/expr.yp"
+#line 88 "expr.yp"
{ $_[0]->_Use($_[1]) }
],
[#Rule 33
'var', 3,
sub
-#line 90 "./../pidl/expr.yp"
+#line 90 "expr.yp"
{ $_[0]->_Use("$_[1].$_[3]") }
],
[#Rule 34
'var', 3,
sub
-#line 92 "./../pidl/expr.yp"
+#line 92 "expr.yp"
{ "($_[2])" }
],
[#Rule 35
'var', 3,
sub
-#line 94 "./../pidl/expr.yp"
+#line 94 "expr.yp"
{ $_[0]->_Use("*$_[1]"); $_[1]."->".$_[3] }
],
[#Rule 36
'func', 4,
sub
-#line 99 "./../pidl/expr.yp"
+#line 99 "expr.yp"
{ "$_[1]($_[3])" }
],
[#Rule 37
'opt_args', 0,
sub
-#line 104 "./../pidl/expr.yp"
+#line 104 "expr.yp"
{ "" }
],
[#Rule 38
@@ -1349,7 +1349,7 @@ sub
[#Rule 42
'args', 3,
sub
-#line 118 "./../pidl/expr.yp"
+#line 118 "expr.yp"
{ "$_[1], $_[3]" }
]
],
@@ -1357,7 +1357,7 @@ sub
bless($self,$class);
}
-#line 121 "./../pidl/expr.yp"
+#line 121 "expr.yp"
package Parse::Pidl::Expr;
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 60352ae..d6eab12 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -1000,6 +1000,9 @@ sub ConvertObjectFromPythonLevel($$$$$$$$)
# then this is where we would need to allocate it
if ($l->{POINTER_TYPE} eq "ref") {
$self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
+ } elsif ($nl->{TYPE} eq "DATA" and Parse::Pidl::Typelist::is_scalar($nl->{DATA_TYPE})
+ and not Parse::Pidl::Typelist::scalar_is_reference($nl->{DATA_TYPE})) {
+ $self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
} else {
$self->pidl("$var_name = NULL;");
}
@@ -1029,7 +1032,7 @@ sub ConvertObjectFromPythonLevel($$$$$$$$)
$self->pidl("} else {");
$self->indent;
$self->pidl("PyErr_Format(PyExc_TypeError, \"Expected string or unicode object, got %s\", Py_TYPE($py_var)->tp_name);");
- $self->pidl("$fail;");
+ $self->pidl("$fail");
$self->deindent;
$self->pidl("}");
} else {
--
Samba Shared Repository
More information about the samba-cvs
mailing list