Browse thread
[Caml-list] Ocaml and Samba function name collisions
-
Blair Zajac
-
Stefano Zacchiroli
- Nicolas Cannasse
- Richard Jones
-
Stefano Zacchiroli
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Nicolas Cannasse <warplayer@f...> |
| Subject: | Re: [Caml-list] Ocaml and Samba function name collisions |
> > 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