Mercurial > projects > ldc
annotate lphobos/internal/moduleinit.d @ 42:0b9b286b67b6 trunk
[svn r46] fix for shift operations
added a simple opengl binding in demos
author | lindquist |
---|---|
date | Fri, 19 Oct 2007 15:16:11 +0200 |
parents | c53b6e3fe49a |
children |
rev | line source |
---|---|
1 | 1 module internal.moduleinit; |
2 | |
3 private alias extern(C) void function() fptr_t; | |
4 | |
5 extern(C): | |
6 | |
7 fptr_t* _d_get_module_ctors(); | |
8 fptr_t* _d_get_module_dtors(); | |
9 | |
10 void _d_run_module_ctors() | |
11 { | |
12 auto p = _d_get_module_ctors(); | |
13 while(*p) { | |
14 (*p++)(); | |
15 } | |
16 } | |
17 | |
18 void _d_run_module_dtors() | |
19 { | |
20 auto p = _d_get_module_dtors(); | |
21 while(*p) { | |
22 (*p++)(); | |
23 } | |
24 } |