Browse thread
[Caml-list] ocamlopt with external function taking more than 5 params
-
Lars Nilsson
- David Brown
- Damien Doligez
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners