Used upstream fix for OCaml 4.04
This commit is contained in:
parent
5af3e75d48
commit
0a5a917c33
@ -1,18 +1,44 @@
|
|||||||
|
From 05913940aa6c5e3cca9c2468f5fcd2d884ec6ab1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Sh=C3=A9rab?= <Sebastien.Hinderer@ens-lyon.org>
|
||||||
|
Date: Tue, 8 Nov 2016 17:39:14 +0100
|
||||||
|
Subject: [PATCH] Make OCaml API bindings compile with OCaml 4.04.0.
|
||||||
|
|
||||||
|
---
|
||||||
|
Bindings/OCaml/brlapi_stubs.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Bindings/OCaml/brlapi_stubs.c b/Bindings/OCaml/brlapi_stubs.c
|
||||||
|
index 1e66f9e..aabdc14 100644
|
||||||
--- a/Bindings/OCaml/brlapi_stubs.c
|
--- a/Bindings/OCaml/brlapi_stubs.c
|
||||||
+++ a/Bindings/OCaml/brlapi_stubs.c
|
+++ b/Bindings/OCaml/brlapi_stubs.c
|
||||||
@@ -144,6 +144,7 @@ CAMLprim value brlapiml_errorCode_of_error(value camlError)
|
@@ -145,12 +145,14 @@ CAMLprim value brlapiml_errorCode_of_error(value camlError)
|
||||||
/* Raises the Brlapi_error exception */
|
|
||||||
static void raise_brlapi_error(void)
|
static void raise_brlapi_error(void)
|
||||||
{
|
{
|
||||||
+ CAMLparam0();
|
|
||||||
static value *exception = NULL;
|
static value *exception = NULL;
|
||||||
|
+ CAMLparam0();
|
||||||
CAMLlocal1(res);
|
CAMLlocal1(res);
|
||||||
if (exception==NULL) exception = caml_named_value("Brlapi_error");
|
if (exception==NULL) exception = caml_named_value("Brlapi_error");
|
||||||
@@ -157,6 +158,7 @@ static void raise_brlapi_error(void)
|
res = caml_alloc(2,0);
|
||||||
/* Raises Brlapi_exception */
|
Store_field(res, 0, *exception);
|
||||||
static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t type, const void *packet, size_t size)
|
Store_field(res, 1, constrCamlError(&brlapi_error));
|
||||||
|
caml_raise(res);
|
||||||
|
+ CAMLreturn0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Function : raise_brlapi_exception */
|
||||||
|
@@ -159,6 +161,7 @@ static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t t
|
||||||
{
|
{
|
||||||
+ CAMLparam0();
|
|
||||||
static value *exception = NULL;
|
static value *exception = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
+ CAMLparam0();
|
||||||
CAMLlocal2(str, res);
|
CAMLlocal2(str, res);
|
||||||
|
str = caml_alloc_string(size);
|
||||||
|
for (i=0; i<size; i++) Byte(str, i) = ((char *) packet)[i];
|
||||||
|
@@ -169,6 +172,7 @@ static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t t
|
||||||
|
Store_field(res, 2, caml_copy_int32(type));
|
||||||
|
Store_field(res, 3, str);
|
||||||
|
caml_raise(res);
|
||||||
|
+ CAMLreturn0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* function packDots */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
Name: brltty
|
Name: brltty
|
||||||
Version: %{pkg_version}
|
Version: %{pkg_version}
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://mielke.cc/brltty/
|
URL: http://mielke.cc/brltty/
|
||||||
@ -420,6 +420,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 9 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 5.4-5
|
||||||
|
- Used upstream fix for OCaml 4.04
|
||||||
|
|
||||||
* Tue Nov 08 2016 Richard W.M. Jones <rjones@redhat.com> - 5.4-4
|
* Tue Nov 08 2016 Richard W.M. Jones <rjones@redhat.com> - 5.4-4
|
||||||
- Add fix for OCaml 4.04 (thanks: Jaroslav Škarvada).
|
- Add fix for OCaml 4.04 (thanks: Jaroslav Škarvada).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user