mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
builder: fix conversion of double to OCaml (RHBZ#1270011).
Create the OCaml value for double using caml_copy_double, which is the correct way, simplier, and works.
This commit is contained in:
@@ -76,9 +76,8 @@ convert_yajl_value (yajl_val val, int level)
|
||||
Store_field (rv, 0, v);
|
||||
} else if (YAJL_IS_DOUBLE (val)) {
|
||||
rv = caml_alloc (1, 2);
|
||||
lv = caml_alloc_tuple (1);
|
||||
Store_double_field (lv, 0, YAJL_GET_DOUBLE(val));
|
||||
Store_field (rv, 0, lv);
|
||||
v = caml_copy_double (YAJL_GET_DOUBLE(val));
|
||||
Store_field (rv, 0, v);
|
||||
} else if (YAJL_IS_INTEGER (val)) {
|
||||
rv = caml_alloc (1, 1);
|
||||
v = caml_copy_int64 (YAJL_GET_INTEGER(val));
|
||||
|
||||
Reference in New Issue
Block a user