From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 6EF24BBAF for ; Sun, 29 Nov 2009 19:31:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0DALJMEktQRFuwWWdsb2JhbACcBgEUFwS3H4QxBIFy X-IronPort-AV: E=Sophos;i="4.47,308,1257116400"; d="scan'208";a="37662162" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 29 Nov 2009 19:31:12 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1NEoYB-0005Hq-7g; Sun, 29 Nov 2009 18:31:11 +0000 Date: Sun, 29 Nov 2009 18:31:11 +0000 To: Guillaume Yziquel Cc: OCaml List Subject: Re: [Caml-list] C stubs with many args. Message-ID: <20091129183111.GA20122@annexia.org> References: <4B1293BF.1000300@citycable.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B1293BF.1000300@citycable.ch> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; stubs:01 0100,:01 guillaume:01 camlparam:01 bytecode:01 stub:01 ocaml:01 bindings:01 2009:98 wrote:01 caml-list:01 functions:01 caml:02 confused:04 args:05 On Sun, Nov 29, 2009 at 04:31:11PM +0100, Guillaume Yziquel wrote: > I've been trying to follow section 18.1.2 of: > > http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html > > Unfortunately, I'm a bit confused as to what should the CAMLparam and > such be for the bytecode stub. > > Could someone provide me with an example somewhere? In case you still have problems, you could look at the code we autogenerate in libguestfs, eg: ocaml/guestfs_c_actions.c. We generate bindings for functions that have various numbers of arguments (up to 9). Rich. -- Richard Jones Red Hat