caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* caml_copy_string
@ 2010-08-21 23:30 Jeffrey Barber
  2010-08-21 23:42 ` [Caml-list] caml_copy_string Romain Beauxis
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Jeffrey Barber @ 2010-08-21 23:30 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Is there a way to get a string from C to OCaml without the caml_copy_string
function, or is there a version that doesn't copy the string?

-J

[-- Attachment #2: Type: text/html, Size: 156 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [Caml-list] caml_copy_string
@ 2005-10-29  0:24 Jonathan Roewen
  2005-10-29  0:32 ` Robert Roessler
  0 siblings, 1 reply; 19+ messages in thread
From: Jonathan Roewen @ 2005-10-29  0:24 UTC (permalink / raw)
  To: caml-list

Hi,

I notice than caml_copy_string only works with null terminated
C-strings. What is the alternative way to copy a random amount of
char* data that contains embedded nulls into an ocaml string (knowing
the length of the data)?

Also, out of curiosity: does caml_copy_string reference the string
itself, or does it make a full copy of it (no sharing)? IE, does
modification of the C-string affect the ocaml string?

Jonathan


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-08-25 19:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-21 23:30 caml_copy_string Jeffrey Barber
2010-08-21 23:42 ` [Caml-list] caml_copy_string Romain Beauxis
2010-08-21 23:46 ` Mathias Kende
2010-08-22 17:16   ` Till Varoquaux
2010-08-23  0:42     ` Till Varoquaux
2010-08-23  1:02       ` Jeffrey Barber
2010-08-23 12:09 ` Florent Monnier
2010-08-23 12:59   ` Stéphane Glondu
2010-08-23 13:46     ` Florent Monnier
2010-08-23 20:24   ` Romain Beauxis
2010-08-24 14:21     ` Florent Monnier
2010-08-24 14:52       ` Till Varoquaux
2010-08-24 15:22         ` Anil Madhavapeddy
2010-08-24 15:35           ` Romain Beauxis
2010-08-25 19:16             ` Florent Monnier
2010-08-25 19:33               ` Romain Beauxis
2010-08-25 15:21   ` Goswin von Brederlow
  -- strict thread matches above, loose matches on Subject: below --
2005-10-29  0:24 Jonathan Roewen
2005-10-29  0:32 ` Robert Roessler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).