C strings in O'Caml

From: Jean-Christophe Filliatre (Jean-Christophe.Filliatre@ens-lyon.fr)
Date: Tue May 13 1997 - 08:59:06 MET DST


Date: Tue, 13 May 1997 08:59:06 +0200 (MET DST)
Message-Id: <199705130659.IAA22102@anjou.ens-lyon.fr>
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@ens-lyon.fr>
To: caml-list@inria.fr
Subject: C strings in O'Caml

[version française à la fin]

Hello,

I'm interfacing a C library in O'Caml and I faced the following
problem. I have a C string declared in the library, and I want to see
it as a Caml string. Is it possible to do it without copying it ? (I
know how to do it using copy_string). I read the reference manual
about C interfacing, but there is nothing about that. Thank you in
advance for any answer.

-- 
Jean-Christophe FILLIATRE
  email: Jean-Christophe.Filliatre@ens-lyon.fr
  WWW  : http://www.ens-lyon.fr/~jcfillia

[français]

Bonjour,

J'interface une bibliothèque C en O'Caml et j'ai le problème suivant. J'ai une chaîne de caractères dans la biblio C que je voudrais voir comme une chaîne de caractères O'Caml. Cela est-il possible sans copier la chaîne ? (Je sais le faire en utilisant copy_string). Il n'y a rien à ce propos dans le manuel de référence. Merci d'avance pour toute réponse.

-- Jean-Christophe FILLIATRE email: Jean-Christophe.Filliatre@ens-lyon.fr WWW : http://www.ens-lyon.fr/~jcfillia



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:10 MET