diff options
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-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)"; } |