From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E15E47F02D for ; Wed, 22 Oct 2014 11:31:49 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.149.82; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of dra-news@metastack.com designates 62.13.149.82 as permitted sender) identity=mailfrom; client-ip=62.13.149.82; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@outmail149082.authsmtp.co.uk) identity=helo; client-ip=62.13.149.82; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail149082.authsmtp.co.uk"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlADACh5R1Q+DZVSnGdsb2JhbABcgmuBTwS4dgabMQKBDBYBEQEBAQEBCAsJCRQuhAMBAQQDJGICAQgYCiQyJQIEEwgTiCYDxU0BCgEBAQEdhiWKATiDLYEeBYslkjiYJyCBWmyBSIEDAQEB X-IPAS-Result: AlADACh5R1Q+DZVSnGdsb2JhbABcgmuBTwS4dgabMQKBDBYBEQEBAQEBCAsJCRQuhAMBAQQDJGICAQgYCiQyJQIEEwgTiCYDxU0BCgEBAQEdhiWKATiDLYEeBYslkjiYJyCBWmyBSIEDAQEB X-IronPort-AV: E=Sophos;i="5.04,768,1406584800"; d="scan'208";a="102356147" Received: from outmail149082.authsmtp.co.uk ([62.13.149.82]) by mail2-smtp-roc.national.inria.fr with ESMTP; 22 Oct 2014 11:31:47 +0200 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt14.authsmtp.com (8.14.2/8.14.2) with ESMTP id s9M9Vk6W000507 for ; Wed, 22 Oct 2014 10:31:46 +0100 (BST) Received: from romulus.metastack.com (cpc1-cmbg5-0-0-cust241.5-4.cable.virginm.net [81.98.252.242]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s9M9VimC004355 for ; Wed, 22 Oct 2014 10:31:44 +0100 (BST) Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id s9M9ViXb025773 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 22 Oct 2014 10:31:44 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0210.002; Wed, 22 Oct 2014 10:31:44 +0100 From: David Allsopp To: "caml-list@inria.fr" Thread-Topic: [Caml-list] String.create Thread-Index: AQHP7dij+q07COu77UmC9nvLyHscoJw72NAWgAABAwA= Date: Wed, 22 Oct 2014 09:31:43 +0000 Message-ID: References: <20141022091439.GA27538@pl-59055.rocqadm.inria.fr> <87vbncihg2.fsf@comtv.ru> In-Reply-To: <87vbncihg2.fsf@comtv.ru> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.18] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 3d15c450-59ce-11e4-9f74-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNlEAUAAU NkdBMnJSNkcdTBdX QSgJWUsrAxluW2N0 bxpQbQ9eY0BKWkti UVZASkxQEQd2AxgD GRwbTRk8NAw7cRgp ODViXnRYWUE0d0Z/ SgBXQWwDNmNlaH0a WRMNagJVJQdXd0lC bk1/VHEIaGVWZ3ll E1QlBR1jdQZ0ISFR BwUMNk4nCX0XBD86 SFYJBzgmAUBt X-Authentic-SMTP: 61633634383431.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 81.98.252.242/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] String.create av1474@comtv.ru wrote: > S=E9bastien Hinderer writes: >=20 > > Dear all, > > > > OCaml 4.02.0 prints the following warning: > > Warning 3: deprecated: String.create > > > > The code that triggers this warning looks like this: > > > > let buf =3D String.create size in > > really_input ic buf 0 size; > > > > Is there a way to fix the code so that it does not trigger this > > warning but still compiles also with older versions of Caml, up to 3.10? > > >=20 > String.make Not a great solution (even ignoring the semantic differences between Bytes.= create and String.make) - really_input has signature in_channel -> *bytes* = -> int -> int -> unit for OCaml >=3D 4.02, so this will break in the future= when -safe-string becomes the default. David