summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Mosmans <support@go-forward.net>2017-06-30 15:25:24 +1000
committerPeter Mosmans <support@go-forward.net>2017-06-30 15:38:42 +1000
commit829024a1ba99b37b3b9554c6e361957f2c6f75db (patch)
treec22de4b72a83c59b9e91dfcff6f1b0ec7de246d0 /src
parenta15c6410d4f1360b527e028f57b466edeaf32321 (diff)
downloadunison-829024a1ba99b37b3b9554c6e361957f2c6f75db.zip
unison-829024a1ba99b37b3b9554c6e361957f2c6f75db.tar.gz
unison-829024a1ba99b37b3b9554c6e361957f2c6f75db.tar.bz2
Follow OCaml 'interface' rule
See the interface guidelines on http://caml.inria.fr/pub/docs/manual-ocaml-4.04/intfc.html Paragraph 19.5.1 states the following: Rule 1 A function that has parameters or local variables of type value must begin with a call to one of the CAMLparam macros and return with CAMLreturn, CAMLreturn0, or CAMLreturnT. In particular, CAMLlocal and CAMLxparam can only be called after CAMLparam. Although this is a callback function, add a call to CAMLparam(0)
Diffstat (limited to 'src')
-rw-r--r--src/lwt/lwt_unix_stubs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lwt/lwt_unix_stubs.c b/src/lwt/lwt_unix_stubs.c
index a32d5f2..2549c41 100644
--- a/src/lwt/lwt_unix_stubs.c
+++ b/src/lwt/lwt_unix_stubs.c
@@ -79,6 +79,7 @@ static value completionCallback;
static void invoke_completion_callback
(long id, long len, long errCode, long action) {
+ CAMLparam0();
CAMLlocal2 (err, name);
value args[4];
err = Val_long(0);