summaryrefslogtreecommitdiffstats
path: root/byterun/obj.c
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2008-01-25 08:39:49 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2008-01-25 08:39:49 +0000
commit759304681e8be86c56011c6989afb926de96e3d3 (patch)
treefd7ad2d99d35d9b2a37e3a40978f4a88e0d1067c /byterun/obj.c
parentcb40742e750ae18c67828321aa87f312dcee4d6a (diff)
grant PR#3760
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8790 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/obj.c')
-rw-r--r--byterun/obj.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/byterun/obj.c b/byterun/obj.c
index 3ee12201e..6332e4de9 100644
--- a/byterun/obj.c
+++ b/byterun/obj.c
@@ -189,7 +189,7 @@ CAMLprim value caml_lazy_make_forward (value v)
CAMLreturn (res);
}
-/* For camlinternalOO.ml
+/* For mlvalues.h and camlinternalOO.ml
See also GETPUBMET in interp.c
*/
@@ -202,7 +202,8 @@ CAMLprim value caml_get_public_method (value obj, value tag)
if (tag < Field(meths,mi)) hi = mi-2;
else li = mi;
}
- return Field (meths, li-1);
+ /* return 0 if tag is not there */
+ return (tag == Field(meths,li) ? Field (meths, li-1) : 0);
}
/* these two functions might be useful to an hypothetical JIT */