From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA04996; Tue, 5 Aug 2003 18:47:32 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA00100 for ; Tue, 5 Aug 2003 18:47:31 +0200 (MET DST) Received: from opus.davidb.org (66-75-152-1.san.rr.com [66.75.152.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h75GlUT27321 for ; Tue, 5 Aug 2003 18:47:31 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 19k4y2-0005ZL-00; Tue, 05 Aug 2003 09:47:22 -0700 Date: Tue, 5 Aug 2003 09:47:22 -0700 From: David Brown To: Lars Nilsson Cc: Caml List Subject: Re: [Caml-list] ocamlopt with external function taking more than 5 params Message-ID: <20030805164722.GA21376@davidb.org> References: <000701c35b71$a29daba0$500010ac@cymfony.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000701c35b71$a29daba0$500010ac@cymfony.com> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ocamlopt:01 params:01 0400,:01 bug:01 camlprim:01 argv:01 argc:01 05,:01 bytecode:01 int:01 native:02 external:03 dave:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Aug 05, 2003 at 12:50:11PM -0400, Lars Nilsson wrote: > Hi all, > > 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). For some reason it does not appear that the native code > version is being called properly. If anyone can shed any light on this I > would be very grateful... > [c-tester.c] > 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) > { These two are reversed. The native code version calls with all of the arguments, whereas the bytecode version passes in an array. Dave ------------------- 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