From 6889767c9adcb4fd3e6d6be31695d3f68dfbb0c0 Mon Sep 17 00:00:00 2001 From: "Martin R. Neuhaeusser" Date: Tue, 19 Apr 2016 10:04:49 +0200 Subject: [PATCH] Fix bug in OCaml API where double values have been wrapped incorrectly. This patch fixes a segmentation fault that occurs due to incorrect wrapping of double values in the OCaml API. --- scripts/update_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update_api.py b/scripts/update_api.py index 09a10f6cf..16ec1e81e 100755 --- a/scripts/update_api.py +++ b/scripts/update_api.py @@ -1179,7 +1179,7 @@ def ml_set_wrap(t, d, n): elif t == INT64 or t == UINT64: return d + ' = Val_long(' + n + ');' elif t == DOUBLE: - return 'Store_double_val(' + d + ', ' + n + ');' + return d + '= caml_copy_double(' + n + ');' elif t == STRING: return d + ' = caml_copy_string((const char*) ' + n + ');' else: