git.samba.org
/
idra
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4858984
)
s4-param Handle P_CHAR and P_BOOLREV in pyparam
author
Andrew Bartlett
<abartlet@samba.org>
Fri, 15 Jul 2011 01:37:39 +0000
(11:37 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Tue, 19 Jul 2011 23:17:09 +0000
(09:17 +1000)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/param/pyparam.c
patch
|
blob
|
history
diff --git
a/source4/param/pyparam.c
b/source4/param/pyparam.c
index c07892cc541626dc1f05d97e690658ff21786252..470c535fafc0caca1dd1a014a1176c4651ed8ccb 100644
(file)
--- 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: