diff options
author | Kai Blin <kai@samba.org> | 2010-10-22 09:37:38 +0200 |
---|---|---|
committer | Kai Blin <kai@samba.org> | 2010-10-23 10:17:05 +0000 |
commit | 719a6bbfede5b124c96f7c84d27e68ac285b073a (patch) | |
tree | d6a0ce0cdaa7f319d1fa3286ccf1417877f5fcb6 /pidl/lib/Parse/Pidl/Samba4/Python.pm | |
parent | 96195b2c0c239781c47f51bbf62156a8804f9525 (diff) | |
download | samba-719a6bbfede5b124c96f7c84d27e68ac285b073a.tar.gz samba-719a6bbfede5b124c96f7c84d27e68ac285b073a.tar.bz2 samba-719a6bbfede5b124c96f7c84d27e68ac285b073a.zip |
ndr dns: Add simple parser
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4/Python.pm')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index cf554f5c0c..f79981e317 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -916,6 +916,11 @@ sub ConvertObjectFromPythonData($$$$$$;$) return; } + if ($actual_ctype->{TYPE} eq "SCALAR" and ($actual_ctype->{NAME} eq "dns_string" or $actual_ctype->{NAME} eq "dns_name")) { + $self->pidl("$target = talloc_strdup($mem_ctx, PyString_AS_STRING($cvar));"); + return; + } + if ($actual_ctype->{TYPE} eq "SCALAR" and $actual_ctype->{NAME} eq "ipv4address") { $self->pidl("$target = PyString_AS_STRING($cvar);"); return; @@ -1094,6 +1099,10 @@ sub ConvertScalarToPython($$$) return "PyString_FromString_check_null($cvar)"; } + if (($ctypename eq "dns_string" or $ctypename eq "dns_name")) { + return "PyString_FromString_check_null($cvar)"; + } + # Not yet supported if ($ctypename eq "string_array") { return "PyCObject_FromTallocPtr($cvar)"; } if ($ctypename eq "ipv4address") { return "PyString_FromString_check_null($cvar)"; } |