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 IAA06787; Tue, 25 Nov 2003 08:52:36 +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 IAA06346 for ; Tue, 25 Nov 2003 08:52:35 +0100 (MET) Received: from smtp.siren.ocn.ne.jp (siren.ocn.ne.jp [211.129.13.170]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAP7qX122309 for ; Tue, 25 Nov 2003 08:52:33 +0100 (MET) Received: from PWARP (p2086-ipad01kyoto.kyoto.ocn.ne.jp [61.207.253.86]) by smtp.siren.ocn.ne.jp (Postfix) with SMTP id 3F1A61DDF; Tue, 25 Nov 2003 16:52:30 +0900 (JST) Message-ID: <008b01c3b329$0f871d50$0274a8c0@PWARP> From: "Nicolas Cannasse" To: "Stefano Zacchiroli" , "Caml Users Mailing List" References: <3FC174F5.13617AC8@orcaware.com> <20031124095952.GE25688@redhat.com> <3FC2A2DC.F73593F3@orcaware.com> <20031125073825.GA781@fistandantilus.takhisis.org> Subject: Re: [Caml-list] Ocaml and Samba function name collisions Date: Tue, 25 Nov 2003 16:52:22 +0900 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 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 prepend:01 ocaml's:01 graphviz:01 struct:01 graphviz:01 generic:01 collision:01 cannasse:01 ocaml:01 ocaml:01 caml:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > The synopsis of this message is to ask that the Ocaml source > > code prepend a Ocaml specific string, "ml_", "caml_" or "ocaml_" > > to all function names in Ocaml's source code to avoid name > > collisions with other packages. My case is made below :) > > I will definitely sign this petition. I had a similar problem while > trying to write an ocaml binding to the graphviz library. Both the > libraries defined, IIRC, a color struct used in graphviz for node colors > and in ocaml by the GC :-( This is not a primitive name problem, but a data structure one (when including file). It can be easily resolved by using a #define color caml_color (or the working equivalent) before including the caml headers. Other solution is to put the caml headers into a C++ namespace. BTW I'm not signing this petition : having everything prefixed with caml_ is way to heavy. But for theses string_get string_set primitives that's true the naming is too much generic and proper to name collision. Only theses kinds should be renamed. 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