diff --git a/lib/bindings/alloc_pages_stubs.c b/lib/bindings/alloc_pages_stubs.c index 06756718..b657bce3 100644 --- a/lib/bindings/alloc_pages_stubs.c +++ b/lib/bindings/alloc_pages_stubs.c @@ -46,23 +46,7 @@ mirage_alloc_pages(value did_gc, value n_pages) } /* Explicitly zero the page before returning it */ memset(block, 0, len); - -/* OCaml 4.02 introduced bigarray element type CAML_BA_CHAR, - which needs to be used - otherwise type t in io_page.ml - is different from the allocated bigarray and equality won't - hold. - Only since 4.02 there is a , thus we cannot - include it in order to detect the version of the OCaml runtime. - Instead, we use definitions which were introduced by 4.02 - and - cross fingers that they'll stay there in the future. - Once <4.02 support is removed, we should get rid of this hack. - -- hannes, 16th Feb 2015 - */ -#ifdef Caml_ba_kind_val CAMLreturn(caml_ba_alloc_dims(CAML_BA_CHAR | CAML_BA_C_LAYOUT | CAML_BA_MANAGED, 1, block, len)); -#else - CAMLreturn(caml_ba_alloc_dims(CAML_BA_UINT8 | CAML_BA_C_LAYOUT | CAML_BA_MANAGED, 1, block, len)); -#endif } CAMLprim value