summaryrefslogtreecommitdiff
path: root/source4/scripting/swig
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-12 10:13:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:40 -0500
commitb5119cd6629e1fd5d52161253c16d3bf79d13df8 (patch)
tree7a01826fa8fe1bbd57e75ff4c194ea6678957d12 /source4/scripting/swig
parentf8f2630c0d65460435598f3b1db5672091df99e7 (diff)
downloadsamba-b5119cd6629e1fd5d52161253c16d3bf79d13df8.tar.gz
samba-b5119cd6629e1fd5d52161253c16d3bf79d13df8.tar.bz2
samba-b5119cd6629e1fd5d52161253c16d3bf79d13df8.zip
r2295: Convert simple scalar types and policy handles between dcerpc function
call request and response structures. (This used to be commit d31d23b944b7e4ef300d75dad5038727e9133af1)
Diffstat (limited to 'source4/scripting/swig')
-rw-r--r--source4/scripting/swig/dcerpc.i40
1 files changed, 40 insertions, 0 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i
index 10dc4721e6..fb4870d819 100644
--- a/source4/scripting/swig/dcerpc.i
+++ b/source4/scripting/swig/dcerpc.i
@@ -52,41 +52,81 @@ uint8 uint8_from_python(PyObject *obj)
return (uint8)PyInt_AsLong(obj);
}
+PyObject *uint8_to_python(uint8 obj)
+{
+ return PyInt_FromLong(obj);
+}
+
uint16 uint16_from_python(PyObject *obj)
{
return (uint16)PyInt_AsLong(obj);
}
+PyObject *uint16_to_python(uint16 obj)
+{
+ return PyInt_FromLong(obj);
+}
+
uint32 uint32_from_python(PyObject *obj)
{
return (uint32)PyInt_AsLong(obj);
}
+PyObject *uint32_to_python(uint32 obj)
+{
+ return PyInt_FromLong(obj);
+}
+
int64 int64_from_python(PyObject *obj)
{
return (int64)PyLong_AsLong(obj);
}
+PyObject *int64_to_python(int64 obj)
+{
+ return PyLong_FromLong(obj);
+}
+
uint64 uint64_from_python(PyObject *obj)
{
return (uint64)PyLong_AsLong(obj);
}
+PyObject *uint64_to_python(uint64 obj)
+{
+ return PyLong_FromLong(obj);
+}
+
NTTIME NTTIME_from_python(PyObject *obj)
{
return (NTTIME)PyLong_AsLong(obj);
}
+PyObject *NTTIME_to_python(NTTIME obj)
+{
+ return PyLong_FromLong(obj);
+}
+
HYPER_T HYPER_T_from_python(PyObject *obj)
{
return (HYPER_T)PyLong_AsLong(obj);
}
+PyObject *HYPER_T_to_python(HYPER_T obj)
+{
+ return PyLong_FromLong(obj);
+}
+
struct policy_handle *policy_handle_from_python(PyObject *obj)
{
return (struct policy_handle *)PyString_AsString(obj);
}
+PyObject *policy_handle_to_python(struct policy_handle *handle)
+{
+ return PyString_FromStringAndSize((char *)handle, sizeof(*handle));
+}
+
struct security_descriptor *security_descriptor_from_python(PyObject *obj)
{
return NULL;