English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
More re GC hanging
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-08-25 (15:17)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] More re GC hanging
Adrien <camaradetux@gmail.com> writes:

> Also, I found out that I had a pretty ugly error in my C bindings but
> it looks like it had no bad impact.
> Basically, I had 'external ml_f : *string* -> string array' but the C
> side read 'value ml_f()': the C function took *no* argument while
> ocaml was passing one (I wasn't actually using the argument). Has
> anything been developped against that? Anything to warn about errors
> in bindings?

That actually makes no problem on any architecture afaik. The parameter
will be placed in a register or on stack and never accessed. The GC
might move the value around making the register/stack value invalid, but
you never access it anyway.

I don't think there is anything that will verify that the external
declaration and C side have the same number of arguments.