1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

r2295: Convert simple scalar types and policy handles between dcerpc function

call request and response structures.
(This used to be commit d31d23b944)
This commit is contained in:
Tim Potter
2004-09-12 10:13:24 +00:00
committed by Gerald (Jerry) Carter
parent f8f2630c0d
commit b5119cd662
2 changed files with 136 additions and 8 deletions

View File

@ -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;