From 12c5e3fe26e729a4a01e66f5418d0977ef6de025 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 8 Dec 2010 15:08:45 +0100 Subject: pidl:Samba4/Python.pm: use PyString_FromStringOrNULL() from pyrpc_util metze --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pidl') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 3e9178b7e8..1ed75ae0e1 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1107,19 +1107,19 @@ sub ConvertScalarToPython($$$) } if (($ctypename eq "string" or $ctypename eq "nbt_string" or $ctypename eq "nbt_name" or $ctypename eq "wrepl_nbt_name")) { - return "PyString_FromString_check_null($cvar)"; + return "PyString_FromStringOrNULL($cvar)"; } if (($ctypename eq "dns_string" or $ctypename eq "dns_name")) { - return "PyString_FromString_check_null($cvar)"; + return "PyString_FromStringOrNULL($cvar)"; } # Not yet supported if ($ctypename eq "string_array") { return "PyCObject_FromTallocPtr($cvar)"; } - 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 "ipv4address") { return "PyString_FromStringOrNULL($cvar)"; } + if ($ctypename eq "ipv6address") { return "PyString_FromStringOrNULL($cvar)"; } + if ($ctypename eq "dnsp_name") { return "PyString_FromStringOrNULL($cvar)"; } + if ($ctypename eq "dnsp_string") { return "PyString_FromStringOrNULL($cvar)"; } if ($ctypename eq "pointer") { return "PyCObject_FromTallocPtr($cvar)"; } -- cgit