Commit 40a5e3dc authored by Gerd Stolpmann's avatar Gerd Stolpmann

porting to OCaml-4.02, and using -safe-string

parent f88459eb
......@@ -36,7 +36,8 @@ view.sample: all
# general rules:
OPTIONS =
OCAMLC = $(OCAMLFIND) ocamlc $(OPTIONS) $(CAMLP4_OPTS)
OCAMLC = $(OCAMLFIND) ocamlc -g -safe-string $(OPTIONS) $(CAMLP4_OPTS)
OCAMLOPT = $(OCAMLFIND) ocamlopt -g -safe-string $(OPTIONS) $(CAMLP4_OPTS)
OCAMLDEP = ocamldep $(OPTIONS)
OCAMLFIND = ocamlfind
......@@ -57,7 +58,6 @@ uninstall:
.PHONY: clean
clean:
rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa sample
rm -f xstrp4_here.ml
.PHONY: distclean
distclean: clean
......
......@@ -147,9 +147,10 @@ let included_file filename _loc =
in
let f = open_in pathname in
let n = in_channel_length f in
let s = String.create n in
let s = Bytes.create n in
really_input f s 0 n;
close_in f;
let s = Bytes.to_string s in
<:expr< $str:s$ >>
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment