diff options
author | Kai Blin <kai@samba.org> | 2010-08-13 11:09:09 +0200 |
---|---|---|
committer | Kai Blin <kai@samba.org> | 2010-10-04 20:59:59 +0200 |
commit | 65d2cfdcf1517b2e99df0556eb5bcfbc0c49a453 (patch) | |
tree | 185e1a6ab71e87b623df7e86cabaab14d3c0909a /pidl/lib | |
parent | da21f78099884ce425dfbb99c8c246f6fcd98a3a (diff) | |
download | samba-65d2cfdcf1517b2e99df0556eb5bcfbc0c49a453.tar.gz samba-65d2cfdcf1517b2e99df0556eb5bcfbc0c49a453.tar.bz2 samba-65d2cfdcf1517b2e99df0556eb5bcfbc0c49a453.zip |
dnsp: Parse TXT records
Diffstat (limited to 'pidl/lib')
-rw-r--r-- | pidl/lib/Parse/Pidl/NDR.pm | 3 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 5 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/Typelist.pm | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm index 4961cda99e..b5dd2aaf9c 100644 --- a/pidl/lib/Parse/Pidl/NDR.pm +++ b/pidl/lib/Parse/Pidl/NDR.pm @@ -76,7 +76,8 @@ my $scalar_alignment = { 'wrepl_nbt_name' => 4, 'ipv4address' => 4, 'ipv6address' => 4, #16? - 'dnsp_name' => 1 + 'dnsp_name' => 1, + 'dnsp_string' => 1 }; sub GetElementLevelTable($$) diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 3318229f0e..cf554f5c0c 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -931,6 +931,10 @@ sub ConvertObjectFromPythonData($$$$$$;$) return; } + if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "dnsp_string") { + $self->pidl("$target = PyString_AS_STRING($cvar);"); + return; + } if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "NTSTATUS") { $self->pidl("$target = NT_STATUS(PyInt_AsLong($cvar));"); @@ -1095,6 +1099,7 @@ sub ConvertScalarToPython($$$) if ($ctypename eq "ipv4address") { return "PyString_FromString_check_null($cvar)"; } if ($ctypename eq "ipv6address") { return "PyString_FromString_check_null($cvar)"; } if ($ctypename eq "dnsp_name") { return "PyString_FromString_check_null($cvar)"; } + if ($ctypename eq "dnsp_string") { return "PyString_FromString_check_null($cvar)"; } if ($ctypename eq "pointer") { return "PyCObject_FromTallocPtr($cvar)"; } diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm index b841e62209..00204a3cfc 100644 --- a/pidl/lib/Parse/Pidl/Typelist.pm +++ b/pidl/lib/Parse/Pidl/Typelist.pm @@ -59,6 +59,7 @@ my %scalars = ( "ipv4address" => "const char *", "ipv6address" => "const char *", "dnsp_name" => "const char *", + "dnsp_string" => "const char *", ); my %aliases = ( |