diff options
author | Mark Wright <gienah@gentoo.org> | 2020-10-13 15:57:20 +1100 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2020-10-13 23:53:21 +1100 |
commit | d59ce4d3530bbb97d51eb12f372794d1c60b6d35 (patch) | |
tree | a632bdb9497116cf0aad8253a164980ba6d92d55 /dev-ml/cairo2/files | |
parent | dev-ml/bin_prot: Dependency of dev-ml/ppx_bin_prot (diff) | |
download | gentoo-d59ce4d3530bbb97d51eb12f372794d1c60b6d35.tar.gz gentoo-d59ce4d3530bbb97d51eb12f372794d1c60b6d35.tar.bz2 gentoo-d59ce4d3530bbb97d51eb12f372794d1c60b6d35.zip |
dev-ml/cairo2: Dependency of dev-ml/lablgtk
Co-Author: Alexis Ballier <aballier@gentoo.org>
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'dev-ml/cairo2/files')
-rw-r--r-- | dev-ml/cairo2/files/cairo2-0.6.1-handle-safe-string.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/dev-ml/cairo2/files/cairo2-0.6.1-handle-safe-string.patch b/dev-ml/cairo2/files/cairo2-0.6.1-handle-safe-string.patch new file mode 100644 index 000000000000..8571da4ea9fe --- /dev/null +++ b/dev-ml/cairo2/files/cairo2-0.6.1-handle-safe-string.patch @@ -0,0 +1,50 @@ +commit 9881f6c861ccf1150fffd6ccdb8b93181ad14263 (HEAD -> const, origin/const) +Author: Olaf Hering <olaf@aepfle.de> +Date: Fri Jul 17 15:47:59 2020 +0200 + + handle safe-string + + String_val() returns 'const char *'. + caml_named_value returns 'const value *'. + + Signed-off-by: Olaf Hering <olaf@aepfle.de> + +diff --git a/src/cairo_macros.h b/src/cairo_macros.h +index d952c10..1348b27 100644 +--- a/src/cairo_macros.h ++++ b/src/cairo_macros.h +@@ -173,7 +173,7 @@ + + /* holds the pointer to the Unavailable exception; shared several + functions. */ +-value * caml_cairo_Unavailable = NULL; ++const value * caml_cairo_Unavailable = NULL; + + #define RAISE_UNAVAILABLE(name, args ...) \ + CAMLexport value caml_##name(args) \ +diff --git a/src/cairo_ocaml_types.h b/src/cairo_ocaml_types.h +index b850ae2..267f657 100644 +--- a/src/cairo_ocaml_types.h ++++ b/src/cairo_ocaml_types.h +@@ -45,7 +45,7 @@ DEFINE_CUSTOM_OPERATIONS(cairo, cairo_destroy, CAIRO_VAL) + /* raise [Error] if the status indicates a failure. */ + void caml_cairo_raise_Error(cairo_status_t status) + { +- static value * exn = NULL; ++ static const value * exn = NULL; + + if (status != CAIRO_STATUS_SUCCESS) { + if (exn == NULL) { +diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c +index de35aca..597c0bf 100644 +--- a/src/cairo_stubs.c ++++ b/src/cairo_stubs.c +@@ -1681,7 +1681,7 @@ static cairo_status_t caml_cairo_output_string + CAMLlocal2(s, r); + + s = caml_alloc_string(length); +- memmove(String_val(s), data, length); ++ memmove(&Byte(String_val(s), 0), data, length); + r = caml_callback_exn(* ((value *) fn), s); + if (Is_exception_result(r)) + CAMLreturn(CAIRO_STATUS_WRITE_ERROR); |