[SCM] Samba Shared Repository - branch master updated -
d1101dba79d65b0991668069b91946198f343ead
Jelmer Vernooij
jelmer at samba.org
Fri Dec 12 10:54:05 GMT 2008
The branch, master has been updated
via d1101dba79d65b0991668069b91946198f343ead (commit)
via 0f8d749144b60c62bbc9e0b934aecc2825d5d0d5 (commit)
from 306e9f14255cf04cf8f91e6a52ddc7faa160e55a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d1101dba79d65b0991668069b91946198f343ead
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Dec 12 11:48:42 2008 +0100
Remove noejs property, which is no longer used.
commit 0f8d749144b60c62bbc9e0b934aecc2825d5d0d5
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Fri Dec 12 11:16:36 2008 +0100
Add convenience function for determining if an array should be allocated with talloc.
-----------------------------------------------------------------------
Summary of changes:
librpc/idl/lsa.idl | 2 +-
librpc/idl/misc.idl | 2 +-
librpc/idl/winreg.idl | 2 +-
pidl/lib/Parse/Pidl/Compat.pm | 1 -
pidl/lib/Parse/Pidl/NDR.pm | 1 -
pidl/lib/Parse/Pidl/Samba4.pm | 14 +++++++++++---
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 6 +++---
pidl/lib/Parse/Pidl/Samba4/Python.pm | 3 ++-
source4/librpc/idl/dom_sid.idl | 2 +-
source4/librpc/idl/irpc.idl | 8 ++++----
10 files changed, 24 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl
index 003641d..db5ca31 100644
--- a/librpc/idl/lsa.idl
+++ b/librpc/idl/lsa.idl
@@ -16,7 +16,7 @@ import "misc.idl", "security.idl";
typedef bitmap security_secinfo security_secinfo;
typedef bitmap kerb_EncTypes kerb_EncTypes;
- typedef [public,noejs] struct {
+ typedef [public] struct {
[value(2*strlen_m(string))] uint16 length;
[value(2*strlen_m(string))] uint16 size;
[charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
diff --git a/librpc/idl/misc.idl b/librpc/idl/misc.idl
index 1907195..1ef0d91 100644
--- a/librpc/idl/misc.idl
+++ b/librpc/idl/misc.idl
@@ -7,7 +7,7 @@
]
interface misc
{
- typedef [public,noprint,gensize,noejs] struct {
+ typedef [public,noprint,gensize] struct {
uint32 time_low;
uint16 time_mid;
uint16 time_hi_and_version;
diff --git a/librpc/idl/winreg.idl b/librpc/idl/winreg.idl
index 9216f98..2f108a0 100644
--- a/librpc/idl/winreg.idl
+++ b/librpc/idl/winreg.idl
@@ -40,7 +40,7 @@ import "lsa.idl", "security.idl";
REG_QWORD = 11
} winreg_Type;
- typedef [public,noejs] struct {
+ typedef [public] struct {
[value(strlen_m_term(name)*2)] uint16 name_len;
[value(strlen_m_term(name)*2)] uint16 name_size;
[string,charset(UTF16)] uint16 *name;
diff --git a/pidl/lib/Parse/Pidl/Compat.pm b/pidl/lib/Parse/Pidl/Compat.pm
index 7519021..1b49c43 100644
--- a/pidl/lib/Parse/Pidl/Compat.pm
+++ b/pidl/lib/Parse/Pidl/Compat.pm
@@ -44,7 +44,6 @@ my %supported_properties = (
"nopush" => ["FUNCTION", "TYPEDEF"],
"nopull" => ["FUNCTION", "TYPEDEF"],
"noprint" => ["FUNCTION", "TYPEDEF"],
- "noejs" => ["FUNCTION", "TYPEDEF"],
# union
"switch_is" => ["ELEMENT"],
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index 9b61a37..3daad24 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -890,7 +890,6 @@ my %property_list = (
"nopull" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP"],
"nosize" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP"],
"noprint" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP", "ELEMENT"],
- "noejs" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP"],
"todo" => ["FUNCTION"],
# union
diff --git a/pidl/lib/Parse/Pidl/Samba4.pm b/pidl/lib/Parse/Pidl/Samba4.pm
index d42e01c..5bdb91e 100644
--- a/pidl/lib/Parse/Pidl/Samba4.pm
+++ b/pidl/lib/Parse/Pidl/Samba4.pm
@@ -7,7 +7,7 @@ package Parse::Pidl::Samba4;
require Exporter;
@ISA = qw(Exporter);
- at EXPORT = qw(is_intree choose_header NumStars ElementStars ArrayBrackets DeclLong);
+ at EXPORT = qw(is_intree choose_header NumStars ElementStars ArrayBrackets DeclLong ArrayDynamicallyAllocated);
use Parse::Pidl::Util qw(has_property is_constant);
use Parse::Pidl::NDR qw(GetNextLevel);
@@ -36,6 +36,14 @@ sub choose_header($$)
return "#include <$out>";
}
+sub ArrayDynamicallyAllocated($$)
+{
+ my ($e, $l) = @_;
+ die("Not an array") unless ($l->{TYPE} eq "ARRAY");
+ return 0 if ($l->{IS_FIXED} and not has_property($e, "charset"));
+ return 1;
+}
+
sub NumStars($;$)
{
my ($e, $d) = @_;
@@ -57,7 +65,7 @@ sub NumStars($;$)
foreach my $l (@{$e->{LEVELS}}) {
next unless ($l->{TYPE} eq "ARRAY");
- next if ($l->{IS_FIXED}) and not has_property($e, "charset");
+ next unless (ArrayDynamicallyAllocated($e, $l));
$n++;
}
@@ -87,7 +95,7 @@ sub ArrayBrackets($)
foreach my $l (@{$e->{LEVELS}}) {
next unless ($l->{TYPE} eq "ARRAY");
- next unless ($l->{IS_FIXED}) and not has_property($e, "charset");
+ next if ArrayDynamicallyAllocated($e, $l);
$res .= "[$l->{SIZE_IS}]";
}
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index fb73075..ee81e51 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -16,7 +16,7 @@ use Parse::Pidl::Typelist qw(hasType getType mapTypeName typeHasBody);
use Parse::Pidl::Util qw(has_property ParseExpr ParseExprExt print_uuid unmake_str);
use Parse::Pidl::CUtil qw(get_pointer_to get_value_of get_array_element);
use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred is_charset_array);
-use Parse::Pidl::Samba4 qw(is_intree choose_header);
+use Parse::Pidl::Samba4 qw(is_intree choose_header ArrayDynamicallyAllocated);
use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv);
use Parse::Pidl qw(warning);
@@ -376,7 +376,7 @@ sub ParseArrayPullHeader($$$$$$)
$self->defer("}");
}
- if (not $l->{IS_FIXED} and not is_charset_array($e, $l)) {
+ if (ArrayDynamicallyAllocated($e,$l) and not is_charset_array($e,$l)) {
$self->AllocateArrayLevel($e,$l,$ndr,$var_name,$size);
}
@@ -917,7 +917,7 @@ sub ParseMemCtxPullFlags($$$$)
return undef unless ($l->{TYPE} eq "POINTER" or $l->{TYPE} eq "ARRAY");
- return undef if ($l->{TYPE} eq "ARRAY" and $l->{IS_FIXED});
+ return undef unless ($l->{TYPE} ne "ARRAY" or ArrayDynamicallyAllocated($e,$l));
return undef if has_fast_array($e, $l);
return undef if is_charset_array($e, $l);
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index a3107d4..90dcba0 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -14,6 +14,7 @@ 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::CUtil qw(get_value_of get_pointer_to);
+use Parse::Pidl::Samba4 qw(ArrayDynamicallyAllocated);
use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv);
use vars qw($VERSION);
@@ -942,7 +943,7 @@ sub ConvertObjectFromPythonLevel($$$$$$$$)
$self->pidl("{");
$self->indent;
$self->pidl("int $counter;");
- if (!$l->{IS_FIXED}) {
+ if (ArrayDynamicallyAllocated($e, $l)) {
$self->pidl("$var_name = talloc_array_ptrtype($mem_ctx, $var_name, PyList_Size($py_var));");
}
$self->pidl("for ($counter = 0; $counter < PyList_Size($py_var); $counter++) {");
diff --git a/source4/librpc/idl/dom_sid.idl b/source4/librpc/idl/dom_sid.idl
index 80df11d..1fc8ee2 100644
--- a/source4/librpc/idl/dom_sid.idl
+++ b/source4/librpc/idl/dom_sid.idl
@@ -24,7 +24,7 @@ interface dom_sid
{
/* a domain SID. Note that unlike Samba3 this contains a pointer,
so you can't copy them using assignment */
- typedef [public,gensize,noprint,noejs,nosize] struct {
+ typedef [public,gensize,noprint,nosize] struct {
uint8 sid_rev_num; /**< SID revision number */
[range(0,15)] int8 num_auths; /**< Number of sub-authorities */
uint8 id_auth[6]; /**< Identifier Authority */
diff --git a/source4/librpc/idl/irpc.idl b/source4/librpc/idl/irpc.idl
index e3ea7e5..4178735 100644
--- a/source4/librpc/idl/irpc.idl
+++ b/source4/librpc/idl/irpc.idl
@@ -14,7 +14,7 @@ import "misc.idl", "security.idl", "nbt.idl";
IRPC_FLAG_REPLY = 0x0001
} irpc_flags;
- typedef [public,noejs] struct {
+ typedef [public] struct {
GUID uuid;
uint32 if_version;
uint32 callnum;
@@ -65,17 +65,17 @@ import "misc.idl", "security.idl", "nbt.idl";
[out,unique] astring *dcname
);
- typedef [noejs] struct {
+ typedef struct {
ipv4address addr;
} nbtd_proxy_wins_addr;
- [noejs] void nbtd_proxy_wins_challenge(
+ void nbtd_proxy_wins_challenge(
[in] nbt_name name,
[in,out] uint32 num_addrs,
[in,out] nbtd_proxy_wins_addr addrs[num_addrs]
);
- [noejs] void nbtd_proxy_wins_release_demand(
+ void nbtd_proxy_wins_release_demand(
[in] nbt_name name,
[in] uint32 num_addrs,
[in] nbtd_proxy_wins_addr addrs[num_addrs]
--
Samba Shared Repository
More information about the samba-cvs
mailing list