[mercury-users] Tabling c_pointer values

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Apr 7 03:09:15 AEST 2011


On Wed, 6 Apr 2011, Michael Day wrote:

>> In general, except for the use of fast-loose memoing as above, foreign
>> types and c_pointers cannot be tabled unless certain assertions are made
>> by the programmer.  For foreign types, setting the attributes
>> "can_pass_as_mercury_type" and "stable" will allow tabling of those
>> values**.  There is no stable_c_pointer type available and it is unlikely
>> we will ever add it, as the c_pointer type will gradually be deprecated
>> in favour of foreign types.
>
> This is the first I've heard of can_pass_as_mercury_type. Is there any
> reason at all why I wouldn't want to apply that to every foreign_type
> that is just a pointer?

In practice, that's what's done.

(You can apply it to any integer or pointer type who size is less than
or equal to the size of MR_Word.)

Julien.
--------------------------------------------------------------------------
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