From feae0e827719e70b3144597ef6565f188620f91d Mon Sep 17 00:00:00 2001 From: "Martin R. Neuhaeusser" Date: Thu, 31 Mar 2016 18:31:59 +0200 Subject: [PATCH] Use a custom block for storing a Z3_config in the ML bindings. --- scripts/update_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/update_api.py b/scripts/update_api.py index 56740923f..a4bad305e 100755 --- a/scripts/update_api.py +++ b/scripts/update_api.py @@ -1376,8 +1376,10 @@ def mk_z3native_stubs_c(ml_dir): # C interface ts = type2str(result) if ml_has_plus_type(ts): ml_wrapper.write('%s z3rv_m = ' % ts) + elif (result == BOOL or result == INT or result == UINT or result == PRINT_MODE or result == ERROR_CODE or result ==INT64 or result == UINT64 or result == DOUBLE or result == STRING): + ml_wrapper.write('%s z3rv = ' % ts) else: - ml_wrapper.write('result = caml_alloc(%s, 0);\n ' % ret_size) + ml_wrapper.write('result = caml_alloc_custom(&default_custom_ops, sizeof(%s), 0, 1);\n ' % ts) ml_wrapper.write('%s z3rv = ' % ts) elif len(op) != 0: