|
From: Gabriel S. <gab...@gm...> - 2014-09-28 21:21:59
|
Dear all,
Attached is a patch that enables compilation of Extlib under -safe-string
(the new OCaml 4.02.0 option that makes string immutable and creates a
distinct type "bytes" of mutable sequences of bytes).
This is a relatively invasive change:
- a dependency on the Bytes compatibility package of recent ocamlfind
versions (>=1.5.3) is introduced
- a fair number of interface functions have argument or return type that
changed from "string" to "Bytes.t"
- IO.{nwrite,nread} have been duplicated to manipulate either string or
byte sequences
- a new extBuffer is added, that conditionally backports bytes-related
Buffer function
I am interested in any feedback on the change. My own interest for doing
this work on Extlib is that I plan to make a minor release of Batteries
that compiles with -safe-string. Batteries being a strict superset of the
Extlib codebase, I thought having a clean transition for Extlib would be a
good first step.
Regards
|