std library hooks

Walter Bright newshound2 at digitalmars.com
Sun Apr 15 22:13:28 PDT 2012


On 4/15/2012 9:49 PM, Nick Sabalausky wrote:
> The link-time "hook" system has such horrid
> semantics, diagnostics and compatibility, you're gonne need to document the
> hell out of that if you expect people to actually use it.

What's so hard about:

"If you want to override the standard library function _d_assertm(), provide 
your own somewhere in your source code, like this:"

extern (C) void __dassertm(ModuleInfo* m, uint linenum)
{
    ....
    printf("I failed\n");
    exit(EXIT_FAILURE);
}

??


More information about the Digitalmars-d mailing list