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 IAA26685; Wed, 4 Aug 2004 08:54:43 +0200 (MET DST) 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 IAA24379 for ; Wed, 4 Aug 2004 08:54:42 +0200 (MET DST) Received: from eris.rz.uni-saarland.de (eris.rz.uni-saarland.de [134.96.7.8]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i746semL032253 for ; Wed, 4 Aug 2004 08:54:41 +0200 Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.254.254]) by eris.rz.uni-saarland.de (SGI-8.12.5/8.12.10) with ESMTP id i746scCS9677152; Wed, 4 Aug 2004 08:54:38 +0200 (CST) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by cs.uni-sb.de (8.13.0/2004062200) with ESMTP id i746sb4F008720; Wed, 4 Aug 2004 08:54:37 +0200 (CEST) Received: from mail.st.cs.uni-sb.de (goscinny.cs.uni-sb.de [134.96.235.32]) by mail.cs.uni-sb.de (8.13.1/2004080200) with ESMTP id i746saug010169; Wed, 4 Aug 2004 08:54:37 +0200 (CEST) X-Authentication-Warning: email: Host goscinny.cs.uni-sb.de [134.96.235.32] claimed to be mail.st.cs.uni-sb.de Received: from [134.96.235.101] (jonagold.cs.uni-sb.de [134.96.235.101]) by mail.st.cs.uni-sb.de (Postfix) with ESMTP id B2ECE1BE0E; Wed, 4 Aug 2004 08:54:36 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <28166D0C-E5E3-11D8-B332-000A95CB833C@cs.uni-sb.de> Content-Transfer-Encoding: 7bit Cc: Norman Ramsey From: Christian Lindig Subject: [Caml-list] Printf: export of format_int et al. Date: Wed, 4 Aug 2004 08:54:40 +0200 To: Caml List X-Mailer: Apple Mail (2.618) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (eris.rz.uni-saarland.de [134.96.7.8]); Wed, 04 Aug 2004 08:54:38 +0200 (CEST) X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.26.0.10; VDF 6.26.0.58 X-Miltered: at nez-perce with ID 41108830.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lindig:01 lindig:01 uni-sb:01 printf:01 compiles:01 printf:01 hashtbl:01 hash:01 hashtbl:01 hash:01 noalloc:01 ocaml:01 ocaml:01 caml:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk We have code that uses some of the external functions like format_int and format_float. external format_int: string -> int -> string = "caml_format_int" Now that OCaml 3.08 has prefixed all C names with "caml_" (eg. "caml_format_int" instead of "format_int") it is more difficult to write code that compiles with old and new OCaml versions. It would be of great help if future OCaml versions would export these C functions as (stable) Caml values such that we could use these rather than the external values directly. For example, format_int is defined in the Printf implementation, but not exported in the interface. Hashtbl gets it right, because "caml_hash_univ_param" is exported as Hashtbl.hash_param in the interface. Therefore we can use hash_param rather than cam_hash_univ_param. external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc" Maybe a new module "Externals" to centralize all these exports would be a solution if we don't want to touch the existing interfaces. -- Christian ------------------- 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