Merge branch 'ZackerySpytz-OCaml_int64_t'
* ZackerySpytz-OCaml_int64_t: Add changes entry for fixing OCaml int64_t compile problem Fix OCaml version detection if caml/version.h is not available [OCaml] Use int64_t instead of int64 for OCaml versions >= 4.03.0 Conflicts: CHANGES.current
This commit is contained in:
commit
7c4d29ae9a
2 changed files with 19 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
|||
Version 4.0.0 (in progress)
|
||||
===========================
|
||||
|
||||
2019-01-12: ZackerySpytz
|
||||
[OCaml] #1403 #1194 Fix compilation problems for OCaml >= 4.03.0 due to OCaml using
|
||||
int64_t instead of int64.
|
||||
|
||||
2019-01-11: ZackerySpytz
|
||||
[OCaml] #1400 Fix getters and setters.
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,13 @@ SWIGEXT {
|
|||
#include <caml/fail.h>
|
||||
#include <caml/misc.h>
|
||||
|
||||
#if defined(CAMLassert)
|
||||
/* Both this macro and version.h were introduced in version 4.02.0 */
|
||||
#include <caml/version.h>
|
||||
#else
|
||||
#define OCAML_VERSION 0 /* Unknown, but < 40200 */
|
||||
#endif
|
||||
|
||||
#define caml_array_set swig_caml_array_set
|
||||
|
||||
// Adapted from memory.h and mlvalues.h
|
||||
|
|
@ -101,9 +108,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue