From 646aefd998c1af366dcaee6cbc2bad9359a71f45 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 11 Feb 2011 18:45:32 +1100 Subject: pidl Add support for uid_t and gid_t types These are mapped to uint64_t, which should be big enough. This is proposed to be used for internal Samba representations, where it would be more painful to convert all the callers to an uint64_t calling convention. Andrew Bartlett --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pidl/lib/Parse/Pidl/Samba4') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 7f6f94e748..dfacfb3352 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -895,7 +895,7 @@ sub ConvertObjectFromPythonData($$$$$$;$) $self->pidl("}"); return; } - if (expandAlias($actual_ctype->{NAME}) =~ /^(char|u?int[0-9]*|time_t)$/) { + if (expandAlias($actual_ctype->{NAME}) =~ /^(char|u?int[0-9]*|time_t|uid_t|gid_t)$/) { $self->pidl("PY_CHECK_TYPE(&PyInt_Type, $cvar, $fail);"); $self->pidl("$target = PyInt_AsLong($cvar);"); return; @@ -1103,7 +1103,7 @@ sub ConvertScalarToPython($$$) return "PyLong_FromLongLong($cvar)"; } - if ($ctypename =~ /^(char|u?int[0-9]*|time_t)$/) { + if ($ctypename =~ /^(char|u?int[0-9]*|time_t|uid_t|gid_t)$/) { return "PyInt_FromLong($cvar)"; } -- cgit