aboutsummaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-12-08 16:55:43 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-12-08 16:55:43 +0000
commit282d177938b34778d2d1967e7dfc681ad8b4c99f (patch)
treeb471c289a0305c19f479d01bb64f6171a45b0f86 /bindings
parent7f06edd63c8dff87d0057737adb07ff45f3e6947 (diff)
downloadexternal_llvm-282d177938b34778d2d1967e7dfc681ad8b4c99f.zip
external_llvm-282d177938b34778d2d1967e7dfc681ad8b4c99f.tar.gz
external_llvm-282d177938b34778d2d1967e7dfc681ad8b4c99f.tar.bz2
Fix bug in constructing Ocaml option types in the bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/analysis/analysis_ocaml.c2
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/bindings/ocaml/analysis/analysis_ocaml.c b/bindings/ocaml/analysis/analysis_ocaml.c
index cc1098a..c77fa73 100644
--- a/bindings/ocaml/analysis/analysis_ocaml.c
+++ b/bindings/ocaml/analysis/analysis_ocaml.c
@@ -32,7 +32,7 @@ CAMLprim value llvm_verify_module(LLVMModuleRef M) {
if (0 == Result) {
Option = Val_int(0);
} else {
- Option = alloc(1, 1);
+ Option = alloc(1, 0);
String = copy_string(Message);
Store_field(Option, 0, String);
}
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index a0b39c6..dd37e3e 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -410,7 +410,7 @@ CAMLprim value llvm_lookup_global(value Name, LLVMModuleRef M) {
CAMLparam1(Name);
LLVMValueRef GlobalVar;
if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) {
- value Option = alloc(1, 1);
+ value Option = alloc(1, 0);
Field(Option, 0) = (value) GlobalVar;
CAMLreturn(Option);
}
@@ -487,7 +487,7 @@ CAMLprim value llvm_lookup_function(value Name, LLVMModuleRef M) {
CAMLparam1(Name);
LLVMValueRef Fn;
if ((Fn = LLVMGetNamedFunction(M, String_val(Name)))) {
- value Option = alloc(1, 1);
+ value Option = alloc(1, 0);
Field(Option, 0) = (value) Fn;
CAMLreturn(Option);
}