aboutsummaryrefslogtreecommitdiff
path: root/kernel/byterun
diff options
context:
space:
mode:
authorGuillaume Melquiond2020-10-01 20:42:43 +0200
committerGuillaume Melquiond2020-11-13 15:14:34 +0100
commit5b2d1c010aa0deb8b5ac89a9c9cdaa263e3b9d64 (patch)
tree0a2e8c3e8b2a13f610cccf8ec6ed5a56dbba4cf7 /kernel/byterun
parent136454f306c8d4de83b8f37201307205a7c57786 (diff)
Turn coq_float64.h into a .c file as it is no longer needed by coq_interp.c.
Diffstat (limited to 'kernel/byterun')
-rw-r--r--kernel/byterun/coq_float64.c (renamed from kernel/byterun/coq_float64.h)10
-rw-r--r--kernel/byterun/coq_interp.c1
-rw-r--r--kernel/byterun/dune2
3 files changed, 6 insertions, 7 deletions
diff --git a/kernel/byterun/coq_float64.h b/kernel/byterun/coq_float64.c
index 84a3edf1c7..5ddddbf650 100644
--- a/kernel/byterun/coq_float64.h
+++ b/kernel/byterun/coq_float64.c
@@ -8,11 +8,13 @@
/* * (see LICENSE file for the text of the license) */
/************************************************************************/
-#ifndef _COQ_FLOAT64_
-#define _COQ_FLOAT64_
-
#include <math.h>
+#define CAML_INTERNALS
+#include <caml/alloc.h>
+
+#include "coq_values.h"
+
#define DECLARE_FREL(name, e) \
int coq_##name(double x, double y) { \
return e; \
@@ -54,5 +56,3 @@ DECLARE_FUNOP(next_down, nextafter(x, -INFINITY))
value coq_is_double(value x) {
return Val_long(Is_double(x));
}
-
-#endif /* _COQ_FLOAT64_ */
diff --git a/kernel/byterun/coq_interp.c b/kernel/byterun/coq_interp.c
index e94af96b72..0f7713a6bb 100644
--- a/kernel/byterun/coq_interp.c
+++ b/kernel/byterun/coq_interp.c
@@ -28,7 +28,6 @@
#include "coq_fix_code.h"
#include "coq_memory.h"
#include "coq_values.h"
-#include "coq_float64.h"
#if OCAML_VERSION < 41000
extern void caml_minor_collection(void);
diff --git a/kernel/byterun/dune b/kernel/byterun/dune
index 2998178be2..d3e2a2fa7f 100644
--- a/kernel/byterun/dune
+++ b/kernel/byterun/dune
@@ -4,7 +4,7 @@
(public_name coq.vm)
(foreign_stubs
(language c)
- (names coq_fix_code coq_memory coq_values coq_interp)
+ (names coq_fix_code coq_float64 coq_memory coq_values coq_interp)
(flags (:include %{project_root}/config/dune.c_flags))))
(rule