From d9c3cb1fb65a74703bbe5ae30b2d5561128accb5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 15 Jul 2011 11:37:39 +1000 Subject: s4-param Handle P_CHAR and P_BOOLREV in pyparam Signed-off-by: Andrew Tridgell --- source4/param/pyparam.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/param') diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index c07892cc54..470c535faf 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -106,11 +106,15 @@ static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const cha /* construct and return the right type of python object */ switch (parm->type) { + case P_CHAR: + return PyString_FromFormat("%c", *(char *)parm_ptr); case P_STRING: case P_USTRING: return PyString_FromString(*(char **)parm_ptr); case P_BOOL: return PyBool_FromLong(*(bool *)parm_ptr); + case P_BOOLREV: + return PyBool_FromLong(!(*(bool *)parm_ptr)); case P_INTEGER: case P_OCTAL: case P_BYTES: -- cgit