git » libfiu » commit f63794c

python2: Use double for probabilities

author Alberto Bertogli
2009-03-27 05:01:16 UTC
committer Alberto Bertogli
2009-03-27 05:09:52 UTC
parent 75c5e479b32ece5373735f4064388c580e7e72dc

python2: Use double for probabilities

There's no need to use a float when our API takes a double, and Python can
do the conversion.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

bindings/python2/fiu_ll.c +2 -2

diff --git a/bindings/python2/fiu_ll.c b/bindings/python2/fiu_ll.c
index 8afb439..f0c9a49 100644
--- a/bindings/python2/fiu_ll.c
+++ b/bindings/python2/fiu_ll.c
@@ -68,9 +68,9 @@ static PyObject *enable_random(PyObject *self, PyObject *args)
 	int failnum;
 	PyObject *failinfo;
 	unsigned int flags;
-	float probability;
+	double probability;
 
-	if (!PyArg_ParseTuple(args, "siOIf:enable_random", &name, &failnum,
+	if (!PyArg_ParseTuple(args, "siOId:enable_random", &name, &failnum,
 				&failinfo, &flags, &probability))
 		return NULL;