[mercury-users] map and c_pointer

Simon Taylor stayl at cs.mu.OZ.AU
Thu Apr 11 17:10:54 AEST 2002


On 11-Apr-2002, Michael Day <mikeday at bigpond.net.au> wrote:
> If I have a map(string, foo), where foo ---> foo(c_pointer), should I
> expect a segfault when I attempt to insert a value into the map?

Why? Unification and comparison of c_pointers is handled by address
comparison, so map(foo, string) would also work. The Mercury code
won't even care whether the pointers are valid. You have to really
be trying to get a segfault in Mercury.

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



More information about the users mailing list