From: Damien Doligez <Damien.Doligez@inria.fr>
To: caml-list@inria.fr, jehenrik@yahoo.com
Subject: Re: [Caml-list] C ffi issue
Date: Wed, 19 Sep 2001 11:55:07 +0200 (MET DST) [thread overview]
Message-ID: <200109190955.LAA0000027232@beaune.inria.fr> (raw)
>According to the C interface documentation, assignments to tuple
>members must be done with the modify(value*,value) function.
>However, local variables once registered with the GC can apparently
>just be assigned. If I do this instead will anything crash?
>
> CAMLlocal1(nontuple);
> modify(&nontuple,mydata); // should just be nontuple=mydata;
Although it was not designed for this use, modify will work correctly
in this context. I now guarantee that it won't crash if you use it in
this way. It is a bit less efficient than direct assignment
(it does a little pointer arithmetic plus a memory read and a
conditional branch).
-- Damien
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2001-09-19 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-19 9:55 Damien Doligez [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-09-19 6:57 Jeff Henrikson
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=200109190955.LAA0000027232@beaune.inria.fr \
--to=damien.doligez@inria.fr \
--cc=caml-list@inria.fr \
--cc=jehenrik@yahoo.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