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 KAA26249; Thu, 18 Sep 2003 10:31:24 +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 KAA30321 for ; Thu, 18 Sep 2003 10:31:22 +0200 (MET DST) Received: from smtp.web.de (smtp01.web.de [217.72.192.180]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8I8VM525389 for ; Thu, 18 Sep 2003 10:31:22 +0200 (MET DST) Received: from [212.227.35.69] (helo=schluck.use.schlund.de) by smtp.web.de with esmtp (WEB.DE 4.99 #448) id 19zuC9-0006U6-00 for caml-list@inria.fr; Thu, 18 Sep 2003 10:31:21 +0200 Date: Thu, 18 Sep 2003 10:31:20 +0200 To: caml-list@inria.fr Subject: [Caml-list] c-interface question... Reply-To: mwohlwend@web.de From: Michael Wohlwend Organization: - Content-Type: text/plain; format=flowed; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera7.20/Linux M2 build 449 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; c-interface:01 wohlwend:01 mwohlwend:01 c-interface:01 digest:01 camlprim:01 camlparam:01 camlreturn:01 camlprim:01 camlparam:01 camlreturn:01 val:01 external:03 module:03 unit:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, to play with the c-interface I tried to change the digest module to allow calculating a md5 sum piece by piece (i.e. making the function init, updtae and finalize avalable). one question about the parameters of external md5_new : unit -> md5_context = "md5_new" should it be: CAMLprim value md5_new() { CAMLparam0(); ... CAMLreturn(...); } or CAMLprim value md5_new(value unit) { CAMLparam1(unit); ... CAMLreturn(...); } as it receives a unit-paramter? (the same for returning unit: CAMLreturn0 or CAMLreturn(Val_unit) ? ) thanks for answering, Michael ------------------- 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