[OCaml] Use int64_t instead of int64 for OCaml versions >= 4.03.0

OCaml's int64 type was replaced with the C99 int64_t in OCaml 4.03.0.
b868c05ec9

Closes #1194.
This commit is contained in:
Zackery Spytz 2019-01-08 21:36:06 -07:00
commit 65f2111915

View file

@ -23,6 +23,7 @@ SWIGEXT {
#include <caml/callback.h>
#include <caml/fail.h>
#include <caml/misc.h>
#include <caml/version.h>
#define caml_array_set swig_caml_array_set
@ -101,9 +102,17 @@ SWIGEXT {
#ifndef ARCH_ALIGN_INT64
#if OCAML_VERSION >= 40300
#define SWIG_Int64_val(v) (*((int64_t *) SWIG_Data_custom_val(v)))
#else
#define SWIG_Int64_val(v) (*((int64 *) SWIG_Data_custom_val(v)))
#endif
#else
#if OCAML_VERSION >= 40300
CAMLextern int64_t Int64_val(caml_value_t v);
#else
CAMLextern int64 Int64_val(caml_value_t v);
#endif
#define SWIG_Int64_val(v) Int64_val(v)
#endif