diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-15 11:37:39 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-20 09:17:09 +1000 |
commit | d9c3cb1fb65a74703bbe5ae30b2d5561128accb5 (patch) | |
tree | 3364e1ce6d201342341dc90b7c5dcc613beaebf1 /source4 | |
parent | 485898458a1f786febd400be30bb3917fe5f71eb (diff) | |
download | samba-d9c3cb1fb65a74703bbe5ae30b2d5561128accb5.tar.gz samba-d9c3cb1fb65a74703bbe5ae30b2d5561128accb5.tar.bz2 samba-d9c3cb1fb65a74703bbe5ae30b2d5561128accb5.zip |
s4-param Handle P_CHAR and P_BOOLREV in pyparam
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/param/pyparam.c | 4 |
1 files changed, 4 insertions, 0 deletions
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: |