Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
roessler@rftp.com
http://www.rftp.com