view lphobos/internal/moduleinit.d @ 38:27b2f40bdb58 trunk

[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back. Fiddled a bit the the testing system. Added a very simple SDL graphics demo.
author lindquist
date Wed, 10 Oct 2007 06:16:48 +0200
parents c53b6e3fe49a
children
line wrap: on
line source

module internal.moduleinit;

private alias extern(C) void function() fptr_t;

extern(C):

fptr_t* _d_get_module_ctors();
fptr_t* _d_get_module_dtors();

void _d_run_module_ctors()
{
    auto p = _d_get_module_ctors();
    while(*p) {
        (*p++)();
    }
}

void _d_run_module_dtors()
{
    auto p = _d_get_module_dtors();
    while(*p) {
        (*p++)();
    }
}