/* BEGIN FFI PREAMBLE */
#ifndef __FFIHEADER__
#define __FFIHEADER__
#include <string.h>
#include <caml/mlvalues.h>
#include <caml/fail.h>
#include <caml/alloc.h>

static inline value copy_mem(void *p, int len) {
  value res = alloc_string(len);
  memmove(String_val(res), p, len);
  return res;}

extern void *c_pointer_value(value s);
extern value c_make_pointerref(value s);
#ifndef __CPLUSPLUS__
#include <stdbool.h>
#endif
#endif
/* END FFI PREAMBLE */

