[m-dev.] conditional compilation
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Mar 25 16:52:49 AEDT 2009
On Wed, 25 Mar 2009, Peter Wang wrote:
> %-----------------------------------------------------------------------------%
>
> % We can't rely on mutables as module initialisers for other modules can be run
> % before our mutable initialiser. So we have to invent our own mutables using
> % foreign code :(
>
> :- pragma foreign_decl("C", local, "
> static MR_Word known_tests;
> ").
>
> :- pragma foreign_code("C", "
> static MR_Word known_tests = 0; /* relies on representation of map.empty */
> ").
You don't want those to be static, if the access preds get opt_exported
you will end up with link errors.
Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list