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
|
||||
@@ -144,6 +144,7 @@ CAMLprim value brlapiml_errorCode_of_error(value camlError)
|
||||
/* Raises the Brlapi_error exception */
|
||||
+++ b/Bindings/OCaml/brlapi_stubs.c
|
||||
@@ -145,12 +145,14 @@ CAMLprim value brlapiml_errorCode_of_error(value camlError)
|
||||
static void raise_brlapi_error(void)
|
||||
{
|
||||
+ CAMLparam0();
|
||||
static value *exception = NULL;
|
||||
+ CAMLparam0();
|
||||
CAMLlocal1(res);
|
||||
if (exception==NULL) exception = caml_named_value("Brlapi_error");
|
||||
@@ -157,6 +158,7 @@ static void raise_brlapi_error(void)
|
||||
/* Raises Brlapi_exception */
|
||||
static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t type, const void *packet, size_t size)
|
||||
res = caml_alloc(2,0);
|
||||
Store_field(res, 0, *exception);
|
||||
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;
|
||||
int i;
|
||||
+ CAMLparam0();
|
||||
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
|
||||
Version: %{pkg_version}
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
URL: http://mielke.cc/brltty/
|
||||
@ -420,6 +420,9 @@ fi
|
||||
%endif
|
||||
|
||||
%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
|
||||
- Add fix for OCaml 4.04 (thanks: Jaroslav Škarvada).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user