caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Niki Yoshiuchi <aplusbi@gmail.com>
To: Pedro Borges <pdhb.lists@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] C bindings and Gc.compact
Date: Tue, 5 Apr 2011 11:03:32 -0400	[thread overview]
Message-ID: <BANLkTimoUoHUU-GOkGOj2FBt9t+0md9xaA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinkeqHDUQRPDtHy6JWghxFimyGVsQ@mail.gmail.com>

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

The manual has a section on just this issue, although the manual can be a
little confusing at times:
http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#toc140

Sylvain Le Gall already mentioned the basics - registering the values with
the garbage collector using CAMLparam (and then releasing them with
CAMLreturn) prevents any problems.  Also local values should be declared
using CAMLlocal and global values should be registered using
caml_global_register_root.

On Tue, Apr 5, 2011 at 7:27 AM, Pedro Borges <pdhb.lists@gmail.com> wrote:

> Hi, everyone,
>
> If a compactification is triggered do the values get rewritten or do
> they become invalid?
>
>
> Best Regards,
>
> Pedro Borges
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

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

      parent reply	other threads:[~2011-04-05 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 11:27 Pedro Borges
2011-04-05 12:52 ` [Caml-list] " Sylvain Le Gall
2011-04-05 15:03 ` Niki Yoshiuchi [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=BANLkTimoUoHUU-GOkGOj2FBt9t+0md9xaA@mail.gmail.com \
    --to=aplusbi@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=pdhb.lists@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;
as well as URLs for NNTP newsgroup(s).