1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

s4-pyldb: fixed 64 bit issues

The python argument parse functions take standard C types, not enums
and time_t. This broken the python interface on PPC.
This commit is contained in:
Andrew Tridgell 2009-10-19 21:36:41 +11:00
parent 96a41581e6
commit c45a81ecf3

View File

@ -1006,7 +1006,7 @@ static PyObject *py_ldb_schema_format_value(PyLdbObject *self, PyObject *args)
static PyObject *py_ldb_search(PyLdbObject *self, PyObject *args, PyObject *kwargs)
{
PyObject *py_base = Py_None;
enum ldb_scope scope = LDB_SCOPE_DEFAULT;
int scope = LDB_SCOPE_DEFAULT;
char *expr = NULL;
PyObject *py_attrs = Py_None;
PyObject *py_controls = Py_None;
@ -2370,10 +2370,12 @@ static PyObject *py_register_module(PyObject *module, PyObject *args)
static PyObject *py_timestring(PyObject *module, PyObject *args)
{
time_t t;
unsigned long val;
char *tresult;
PyObject *ret;
if (!PyArg_ParseTuple(args, "L", &t))
if (!PyArg_ParseTuple(args, "l", &val))
return NULL;
t = (time_t)val;
tresult = ldb_timestring(NULL, t);
ret = PyString_FromString(tresult);
talloc_free(tresult);