Version française
Home     About     Download     Resources     Contact us    
Browse thread
C interface style question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] C interface style question
Am Mittwoch, den 18.01.2006, 21:32 +0100 schrieb Florent Monnier:
> > > value-type parameters to C functions exported to OCaml should be
> > > registered with CAMLparamX(...). Does this hold in general, or is it
> > > considered acceptable/appropriate to just ignore this for "immediate"
> > > values that do not hold pointers, but, say, int, bool etc. values?
> >
> > If you don't allocate O'Caml memory you need not to register the
> > parameters.
> 
> And in this case there's no need to use CAMLreturn(), return is enough,
> is it right ?

That would not even compile without a CAMLparam.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Telefon: 06151/153855                  Telefax: 06151/997714
------------------------------------------------------------