Fedora patch to fix build with OCaml 4.0.6.
--
Orion Poplawski
Manager of NWRA Technical Systems 720-772-5637
NWRA, Boulder/CoRA Office FAX: 303-415-9702
3380 Mitchell Lane or...@nwra.com
Boulder, CO 80301 https://www.nwra.com/
--- plplot-5.12.0.old/examples/ocaml/x20.ml 2017-01-29 01:50:35.000000000 +0000
+++ plplot-5.12.0/examples/ocaml/x20.ml 2017-11-18 12:10:33.476409441 +0000
@@ -59,7 +59,7 @@
let w, h = Scanf.sscanf w_h_line "%d %d" (fun w h -> w, h) in
let num_col = Scanf.sscanf num_col_line "%d" (fun n -> n) in
- let img = String.make (w * h) ' ' in
+ let img = Bytes.make (w * h) ' ' in
let imf = Array.make_matrix w h 0.0 in
(* Note that under 32bit OCaml, this will only work when reading strings up
@@ -72,7 +72,7 @@
for j = 0 to h - 1 do
imf.(i).(j) <-
(* flip image up-down *)
- float_of_int (int_of_char (img.[(h - 1 - j ) * w + i]));
+ float_of_int (int_of_char (Bytes.get img ((h - 1 - j ) * w + i)));
done
done;
imf, w, h, num_col
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel