Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Should one use caml_ prefix in C code ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-03-28 (05:07)
From: Robert Roessler <roessler@r...>
Subject: Re: [Caml-list] Should one use caml_ prefix in C code ?
Sébastien Hinderer wrote:

> Among Caml header files is one called compatibility.h.
> This file defines macros allowing one to use, say, copy_string rather
> than caml_copy_string when writing stub functions.
> But what is the recommended style for writing stubs ?
> Should the caml_ prefix be used, or not ?
> The documentation does not seem to mention anything about that.

The "caml_" prefix was added in 3.08.0 to avoid name conflicts when 
linking with other libraries.  I believe the relevant entries in 
compatibility.h are there so the Caml developers were not forced to 
edit all of the sources... but you should use the new "official" 
naming in code you write that needs to reference the affected C 
globals. :)

Robert Roessler