Use the ocaml tag 0 since we are just returning an option value.
[oota-llvm.git] / bindings / ocaml / executionengine / executionengine_ocaml.c
index d12a9f7acdeb7f623305bc37d6bcb76285d8254c..1d3e57a705b82c0310ca49bbb3ce00691b92653a 100644 (file)
@@ -226,7 +226,7 @@ CAMLprim value llvm_ee_find_function(value Name, LLVMExecutionEngineRef EE) {
   LLVMValueRef Found;
   if (LLVMFindFunction(EE, String_val(Name), &Found))
     CAMLreturn(Val_unit);
-  Option = alloc(1, 1);
+  Option = alloc(1, 0);
   Field(Option, 0) = Val_op(Found);
   CAMLreturn(Option);
 }