From: "Jonathan Roewen" <jonathan.roewen@gmail.com>
To: "Chris Campbell" <cyberdanx@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Converting C arrays to Ocaml arrays
Date: Tue, 11 Apr 2006 15:46:23 +1200 [thread overview]
Message-ID: <ad8cfe7e0604102046v2c83a5e8q8af2deb7ad57b15f@mail.gmail.com> (raw)
In-Reply-To: <ad8cfe7e0604102041x754d0e34w9eaa2975b2fd1ace@mail.gmail.com>
> I believe the array should already be null-terminated.
Well, I asked around, and some people say it's not.
So, instead, do: calloc(num+1), and then do: array[num] = NULL; and
null-termination problem will be gone.
And looking at caml_alloc_array, the most you'd prolly get is warning
about pointer vs int. caml_alloc_array doesn't appear to depend on it
being an actual pointer.
Jonathan
prev parent reply other threads:[~2006-04-11 9:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 20:42 Chris Campbell
2006-04-10 21:21 ` [Caml-list] " Michael Wohlwend
2006-04-11 3:41 ` Jonathan Roewen
2006-04-11 3:46 ` Jonathan Roewen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad8cfe7e0604102046v2c83a5e8q8af2deb7ad57b15f@mail.gmail.com \
--to=jonathan.roewen@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=cyberdanx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox