[m-rev.] for review: c_header_code in string.m

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Aug 8 17:20:08 AEST 2002


On 08-Aug-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Another alternative would be to leave the function definition as
> "static", keep the definition in "pragma c_header_code",
> and add a #ifndef ... #define ... #endif guard around it.

Actually, that is what I started with, but decided that this was not good
enough in the longer term. We plain shouldn't put function definitions
in pragma c_header_code.

> That fix is not correct; if the definition is in pragma c_code,
> and the function is referenced from pragma foreign_proc, then
> the function needs to be declared as "extern" rather than "static".

I will do that.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list