Merge lp:~mouradian/spud/double_parse_fix into lp:spud

Proposed by Simon Mouradian
Status: Merged
Approved by: Patrick Farrell
Approved revision: 523
Merge reported by: Simon Mouradian
Merged at revision: not available
Proposed branch: lp:~mouradian/spud/double_parse_fix
Merge into: lp:spud
Diff against target: 12 lines (+1/-1)
1 file modified
python/libspud.c (+1/-1)
To merge this branch: bzr merge lp:~mouradian/spud/double_parse_fix
Reviewer Review Type Date Requested Status
Patrick Farrell Pending
Review via email: mp+97284@code.launchpad.net

Description of the change

Fix for parsing a python double as a float.

Thanks pfarrell :)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'python/libspud.c'
2--- python/libspud.c 2011-11-04 13:55:59 +0000
3+++ python/libspud.c 2012-03-13 19:22:18 +0000
4@@ -656,7 +656,7 @@
5
6 if (type == SPUD_DOUBLE){ //scalar is double
7 double val;
8- PyArg_Parse(pyscalar, "f", &val);
9+ PyArg_Parse(pyscalar, "d", &val);
10 outcomeSetOption = spud_set_option(key, key_len, &val, type, rank, shape);
11 }
12 else if (type == SPUD_INT){

Subscribers

People subscribed via source and target branches