From: Jerome Vouillon <vouillon@clipper.ens.fr>
To: Juan Jose Quintela Carreira <quintela@finisterrae.dc.fi.udc.es>
Cc: caml-list@pauillac.inria.fr, christo@nextsolution.co.jp
Subject: Re: Need help: O'Caml C Interface
Date: Tue, 24 Sep 1996 19:11:01 +0200 (MET DST) [thread overview]
Message-ID: <Pine.3.89.9609241815.A28700-0100000@vedette> (raw)
In-Reply-To: <9609241445.AA10783@dc.fi.udc.es>
> 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,
Well, actually neither are correct, as copy_double allocate some memory.
Thus, the tuple should have been filled with dummy values prior to the
first call to copy_double, and one cannot use `Field(..) = ..'.
Jerome
next prev parent reply other threads:[~1996-09-25 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-24 14:45 Juan Jose Quintela Carreira
1996-09-24 17:11 ` Jerome Vouillon [this message]
-- 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=Pine.3.89.9609241815.A28700-0100000@vedette \
--to=vouillon@clipper.ens.fr \
--cc=caml-list@pauillac.inria.fr \
--cc=christo@nextsolution.co.jp \
--cc=quintela@finisterrae.dc.fi.udc.es \
/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