diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2003-12-15 13:34:38 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2003-12-15 13:34:38 +0000 |
commit | 4bdf4536edb520542b9916c63f4638e06738ff59 (patch) | |
tree | 03dac1f4043c058e116569c6168c45ac98554a92 | |
parent | ec74a2e710c51ea9df3066866801518285f91677 (diff) | |
download | ocaml-4bdf4536edb520542b9916c63f4638e06738ff59.tar.gz |
corrige oo_cache_public_method2
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/newoolab@6018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | byterun/obj.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/byterun/obj.c b/byterun/obj.c index 11352a644a..84a8e385fa 100644 --- a/byterun/obj.c +++ b/byterun/obj.c @@ -208,8 +208,9 @@ CAMLprim value oo_cache_public_method (value meths, value tag, value *cache) value oo_cache_public_method2 (value *meths, value tag, value *cache) { - if (*(value*)(((char*)(meths+2)) + *cache - 1) == tag) - return *(value*)(((char*)(meths+1)) + *cache - 1); + value ofs = *cache & meths[1]; + if (*(value*)(((char*)(meths+2)) + ofs - 1) == tag) + return *(value*)(((char*)(meths+1)) + ofs - 1); { int li = 3, hi = meths[0], mi; while (li < hi) { |