[mercury-users] number of args for bag.init exported to C

Guillaume Yziquel guillaume.yziquel at gmx.ch
Wed Jun 8 00:38:49 AEST 2011


Hi.

I'm exporting the bag.init function with the following pragma:

	:- pragma foreign_export("C", bag.init(out), "no_props").

And the C function prototype that is exported is:

	void no_props(MR_Word, MR_Word *);

What is the meaning of the first argument? There is no 'in' argument in
the Mercury code, and yet it shows in the C function prototype. More
importantly: what should I set it to?

I tried investigation the C code, but the way Mercury generates code
with kind of virtual registers doesn't lend itself to an immediate
understanding of the C code for bag.init.

-- 
     Guillaume Yziquel
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list