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 LAA24776; Thu, 8 Mar 2001 11:35:33 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA24882 for caml-list@pauillac.inria.fr; Thu, 8 Mar 2001 11:35:32 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA21835 for ; Thu, 8 Mar 2001 09:45:16 +0100 (MET) Received: from mistral.univ-bpclermont.fr (mistral.univ-bpclermont.fr [193.54.50.10]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f288jGv16365 for ; Thu, 8 Mar 2001 09:45:16 +0100 (MET) Received: (from jserot@localhost) by mistral.univ-bpclermont.fr (8.8.6 (PHNE_17135)/8.8.6) id JAA13026; Thu, 8 Mar 2001 09:45:11 +0100 (MET) From: Jocelyn Serot MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15015.18070.504662.128258@mistral.univ-bpclermont.fr> Date: Thu, 8 Mar 2001 09:45:10 +0100 (MET) To: Ravi Chamarty Cc: caml-list@inria.fr Subject: [Caml-list] Caml Wrappers In-Reply-To: References: X-Mailer: VM 6.75 under 20.4 "Emerald" XEmacs Lucid Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Ravi Chamarty writes: > > Hi , > > I am trying to write OCaml interfaces around a C library. I tried > looking at the Unix library and trying to understand it. However, I have > much complex data types to deal with.I was wondering if anyone could help > me out. > > Here is a signature of one of the C functions: > > an_flow_t * > an_flow_create(void *mem, an_cred_t *cred, an_cpuspec_t *cspec, > an_memspec_t *mspec, an_flowinit_func_t init, > void *initarg, an_flowterm_func_t term) > > > Each of these types are complex structures in C. How do I represent these > in OCaml. Is it useful to use classes and methods? Or do I use abstract > types to represent them ? > > An example of one of these structures is given below: > > [...] > I would be grateful for any help. > > Thanks > Ravi > Did you have a look a Camlidl (http://pauillac.inria.fr/caml/camlidl) ? It can generate rather complex stub code for you. Jocelyn -- E-mail: Jocelyn.Serot@l_a_s_m_e_a.u_n_i_v-bpclermont.fr ..................... S-mail: LASMEA - UMR 6602 CNRS, Universite Blaise Pascal, 63177 Aubiere cedex Tel: (33) 04 73.40.73.30 - Fax: (33) 04 73.40.72.62 ......................... Valid e-mail: remove underscores (sorry, this is prevention against junk mail ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr