Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocamlopt with external function taking more than 5 params
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: [Caml-list] ocamlopt with external function taking more than 5 params
On Tuesday, Aug 5, 2003, at 18:50 Europe/Paris, Lars Nilsson wrote:

> I am wondering if I am doing something wrong, or if I am experiencing 
> a bug.
> I am trying to implement a function in C that takes more than 5 
> parameters
> (8 in my real code).
> The resulting output for the ocamlopt compiled program is
>   Pointer = 0x3, N = 5

Note that 0x3 is the representation of 1 as an O'Caml value, and
5 is the representation of 2.

> CAMLprim void tester_bytecode(value a, value b, value c, value d,
>                               value e, value f, value g, value h)

> CAMLprim void tester_native(value *argv, int argc)

You have them reversed.  The native-code version should take 8
arguments, and the byte-code version should take argv and argc.

-- Damien

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: