3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

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.
This commit is contained in:
Martin R. Neuhaeusser 2016-04-19 10:04:49 +02:00
parent 67ac1a003e
commit 6889767c9a

View file

@ -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: