summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-19 21:36:41 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-19 21:36:41 +1100
commitc45a81ecf3229762b7074891b86d894c27489180 (patch)
treec714f083733f6c9a611c2560dce2043e457ab50a /source4/lib
parent96a41581e6aab2b6a3511842c688818a163796f7 (diff)
downloadsamba-c45a81ecf3229762b7074891b86d894c27489180.tar.gz
samba-c45a81ecf3229762b7074891b86d894c27489180.tar.bz2
samba-c45a81ecf3229762b7074891b86d894c27489180.zip
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.
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/pyldb.c6
1 files changed, 4 insertions, 2 deletions
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);