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 UAA25831; Tue, 5 Mar 2002 20:02:12 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 UAA24821 for ; Tue, 5 Mar 2002 20:02:10 +0100 (MET) Received: from relay-2v.club-internet.fr (relay-2v.club-internet.fr [194.158.96.113]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g25J29f23108 for ; Tue, 5 Mar 2002 20:02:09 +0100 (MET) Received: from warp (lns04v-3-249.w.club-internet.fr [212.194.62.249]) by relay-2v.club-internet.fr (Postfix) with SMTP id 5B25D16E3 for ; Tue, 5 Mar 2002 20:02:08 +0100 (CET) Message-ID: <008c01c1c477$f2a9ef60$3000a8c0@warp> From: "Warp" To: "OCaml" Subject: [Caml-list] Tuple copy Date: Tue, 5 Mar 2002 19:59:58 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all I got the following question : I have a type MSG wich is allocated using alloc_tuple(3) , and contains one Int and two Int32. Sometimes, the second Int32 is a C pointer, so I managed to garbage it by allocating sometimes MSG using alloc_tuple(4) and then storing a custom block in the fourth block (this custom block hold the C pointer, and will free() it when garbaged - the C pointer is also stored as an Int32 in the MSG to enable its access by C API ). So for the same type MSG, i'm mixing tuple of different sizes. Does this can cause problems ? Does my custom_block can be garbaged before the MSG ( when let - storing the MSG for further use ) ? Does my ocaml-side MSG type needs to have 4 fields ? Thanks a lot for any help Nicolas Cannasse ------------------- 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