Salome HOME
projects
/
tools
/
libbatch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5b850e
)
Fix type mapping for Python boolean parameters
rbe/fix_py_bool_params
V2_3_2p1
author
Renaud Barate
<renaud.barate@edf.fr>
Wed, 4 Oct 2017 13:12:21 +0000
(15:12 +0200)
committer
Renaud Barate
<renaud.barate@edf.fr>
Wed, 4 Oct 2017 13:12:21 +0000
(15:12 +0200)
src/Python/libBatch_Swig_typemap.i
patch
|
blob
|
history
diff --git
a/src/Python/libBatch_Swig_typemap.i
b/src/Python/libBatch_Swig_typemap.i
index ca73e44c1bcfb8d8cc6e54ffe473388e21e2404b..cbd1a23e58359a482a26db8db0dfdfe31cfbfc58 100644
(file)
--- a/
src/Python/libBatch_Swig_typemap.i
+++ b/
src/Python/libBatch_Swig_typemap.i
@@
-68,10
+68,10
@@
static bool initVersatile(Batch::Versatile & newVersatile, PyObject * input)
} else if (PyString_Check(input)) { // c'est une string
newVersatile = PyString_AsString(input);
- } else if (PyInt_Check(input)) { // c'est un int
- newVersatile = PyInt_AsLong(input);
} else if (PyBool_Check(input)) { // c'est un bool
newVersatile = (input == Py_True);
+ } else if (PyInt_Check(input)) { // c'est un int
+ newVersatile = PyInt_AsLong(input);
} else { // erreur
PyErr_SetString(PyExc_RuntimeWarning, "initVersatile : invalid PyObject");
return false;