summaryrefslogtreecommitdiffstats
path: root/byterun/obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/obj.c')
-rw-r--r--byterun/obj.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/byterun/obj.c b/byterun/obj.c
index 8e00282e5..1fe8b2280 100644
--- a/byterun/obj.c
+++ b/byterun/obj.c
@@ -24,6 +24,7 @@
#include "misc.h"
#include "mlvalues.h"
#include "prims.h"
+#include "stdio.h"
CAMLprim value caml_static_alloc(value size)
{
@@ -247,3 +248,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;
+}