caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Some questions regarding OCaml FFI
@ 2017-04-02 22:58 Alexey Egorov
  2017-04-03 15:35 ` Gerd Stolpmann
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Egorov @ 2017-04-02 22:58 UTC (permalink / raw)
  To: caml-list

Hello,

I have some questions about OCaml FFI:

1) Should I declare local variable with CAMLlocalN if its used "temporarily", for example:
CAMLreturn(Val_long(1));
vs
CAMLlocal1(longval);
longval = Val_long(1);
CAMLreturn(longval);

2) Should I call 'caml_acquire_runtime_system()' prior to calling OCaml functions from C main()? If so - should I call it before or after 'caml_startup()'?

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-03 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-02 22:58 [Caml-list] Some questions regarding OCaml FFI Alexey Egorov
2017-04-03 15:35 ` Gerd Stolpmann

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).