Browse thread
C macro name clash in Ocaml 3.00 source
- STARYNKEVITCH Basile
[
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: | STARYNKEVITCH Basile <Basile.Starynkevitch@c...> |
| Subject: | C macro name clash in Ocaml 3.00 source |
Hello All (and particularily Ocaml developpers), There are some annoying name clashes in Ocaml public includes <caml/mlvalues.h> and <caml/misc.h> As an example, Atom is a a unary macro in <caml/mlvalues.h> and is also a type in <X11/X.h>. Also Assert is quite easily used by (other) applications. etc... I suggest that all publicly visible macros (i.e. those defined by <caml/*.h> file included by an application C wrapping code) would have a common prefix. Therefore Atom in <caml/mlvalues.h> would become OCAML_Atom, Assert would become OCAML_Assert, etc... and so forth. I may even volonteer for this boring job (it wont take too much of my time since I do know quite well the Ocaml implementation) if I am sure that my patches would be included in the next Ocaml release. (Compatibility with old C source could be kept with optionaly #define-ing Atom as OCAML_Atom etc....) Regards. N.B. Any opinions expressed here are only mine, and not of my organization. N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA. --------------------------------------------------------------------- Basile STARYNKEVITCH ---- Commissariat à l Energie Atomique DTA/LETI/DEIN/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX * France phone: 1,69.08.60.55; fax: 1.69.08.83.95 home: 1,46.65.45.53 email: Basile point Starynkevitch at cea point fr