[m-dev.] for review: Avoid including mercury_imp.h in generated .h files.

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Aug 24 01:54:00 AEST 1998


On 20-Aug-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> Hi,
> 
> Anyone interested can review this.
> 
> It's not exactly a critical change, but it makes things easier to manage
> when interfacing with C++, and doesn't really do any harm otherwise.
> 
> ===================================================================
> 
> 
> Estimated hours taken: 0.75
> 
> Allow the #include "mercury_imp.h" in generated header files to be
> avoided (#define MERCURY_IMP_H isn't quite enough because it will still
> look for mercury_imp.h in the include path).
> 
> We need this because we want to use these prototypes in C++, but don't
> want to start including the Mercury header files (in fact, I'd prefer
> to keep the include paths quite separate).
>
> compiler/export.m:
> 	Generate
> 
> 	#ifndef MERCURY_EXCLUDE_IMP_H
> 	#include "mercury_imp.h"
> 	#endif
> 
> 	in the generated .h file for exported Mercury predicates.

Hmm...

"mercury_imp.h" or at least "mercury_types.h" is needed
for the types `Integer', `Float', etc. that may be included in the
generated header files.  If `MERCURY_EXCLUDE_IMP_H' is defined,
then these symbols will be undefined, which will lead to compile errors.

Did I miss something?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list