From c45a81ecf3229762b7074891b86d894c27489180 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 19 Oct 2009 21:36:41 +1100 Subject: 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. --- source4/lib/ldb/pyldb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index 1d47d6ff1f..35508c828a 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -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); -- cgit