C linkage is fun

Alex Rønne Petersen alex at lycus.org
Thu May 24 05:15:04 PDT 2012


On 24-05-2012 14:06, Alex Rønne Petersen wrote:
> Just a little gotcha I ran into today:
>
> import core.memory;
>
> extern (C) void gc_collect()
> {
> assert(false, "nope!");
> }
>
> void main()
> {
> GC.collect();
> }
>

BTW, this is particularly fun if your gc_collect function has arguments 
and tries to read those!

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list