From: quintela@finisterrae.dc.fi.udc.es (Juan Jose Quintela Carreira)
To: caml-list@pauillac.inria.fr, christo@nextsolution.co.jp
Subject: Re: Need help: O'Caml C Interface
Date: Tue, 24 Sep 1996 16:45:20 +0200 [thread overview]
Message-ID: <9609241445.AA10783@dc.fi.udc.es> (raw)
Hi,
If you changes the lines:
>
> value ocaml_getCharWidth(value code)
> {
> double x, y;
> Push_roots(r,1);
>
> r[0] = alloc_tuple(2);
> getCharWidth(Int_val(code),&x,&y);
- Store_double_val(Field(r[0],0),x);
+ modify(&Field(r[0],0),copy_double(x); /* Field(r[0],0)=copy_double(x)*/
- Store_double_val(Field(r[0],1),y);
+ modify(&Field(r[0],1),copy_double(y); /* Field(r[0],1)=copy_double(y)*/
> Pop_roots();
> return r[0];
> }
>
The coment sentences also work in this example, but the former work always,
For details see the manual section:
Chapter: Interfacing C with Objective Caml
Section: Living in harmony with the garbage collector
Regards, Juan.
next reply other threads:[~1996-09-24 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-24 14:45 Juan Jose Quintela Carreira [this message]
1996-09-24 17:11 ` Jerome Vouillon
-- strict thread matches above, loose matches on Subject: below --
1996-09-23 15:09 Frank Christoph
1996-09-24 13:36 ` Jerome Vouillon
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=9609241445.AA10783@dc.fi.udc.es \
--to=quintela@finisterrae.dc.fi.udc.es \
--cc=caml-list@pauillac.inria.fr \
--cc=christo@nextsolution.co.jp \
/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