Re: Making extlib compile under -safe-string

ygrek <[email protected]> Mon, 17 Nov 2014 10:40:44 +0800
Newsgroups gmane.comp.lang.ocaml.lib.devel
Message-ID <[email protected]>
On Sun, 28 Sep 2014 23:21:10 +0200
Gabriel Scherer <[email protected]> wrote:

> 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

Considering that extlib has a build mode that doesn't require ocamlfind and I believe
there are users relying on it, so we will need to provide a solution for this usecase too..
Maybe doing Std.Bytes = String will be enough.
FTR the new repo is at https://github.com/ygrek/ocaml-extlib
Thanks for the patch

-- 
 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk