diff options
Diffstat (limited to 'byterun/obj.c')
-rw-r--r-- | byterun/obj.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/byterun/obj.c b/byterun/obj.c index 8e00282e5..1d7b57910 100644 --- a/byterun/obj.c +++ b/byterun/obj.c @@ -247,3 +247,11 @@ value caml_cache_public_method2 (value *meths, value tag, value *cache) } } #endif /*CAML_JIT*/ + +static value oo_last_id = Val_int(0); + +CAMLprim value caml_set_oo_id (value obj) { + Field(obj, 1) = oo_last_id; + oo_last_id += 2; + return obj; +} |