Files
xomb-bare-bones/kernel/runtime/invariant.d
wilkie dd1faf4d30 This is the current build for XOmB Bare Bones.
Since GDC is for all reasonable purposes dead in development, LDC is the current way to go. In this build, LDC is used to compile any D language code. You will not need a naked-compile of GDC to compile anymore.

We will no longer maintain GDC as a first priority.

Please check the wiki first for build instructions, check the README for a link.

Signed-off-by: The XOmB Overlord <overlord@xomb.org>
2009-02-24 08:57:10 +08:00

29 lines
430 B
D

/*
* Placed into the Public Domain
* written by Walter Bright
* www.digitalmars.com
*/
extern(C) void _d_invariant(Object o)
{
ClassInfo c;
//printf("__d_invariant(%p)\n", o);
// BUG: needs to be filename/line of caller, not library routine
assert(o !is null); // just do null check, not invariant check
c = o.classinfo;
do
{
if(c.classInvariant)
{
(*c.classInvariant)(o);
}
c = c.base;
} while(c)
}