Mercurial > projects > ldc
diff runtime/internal/genobj.d @ 1440:d7ec997de427
Adjust runtime for recent ABI change on x86-64, since member functions are no
longer equivalent to regular functions with `this` as their first argument.
(They weren't anyway, but it happened to work as long as there was no `sret`
parameter)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 31 May 2009 14:27:01 +0200 |
parents | 8026319762be |
children | 0a5f7890f327 |
line wrap: on
line diff
--- a/runtime/internal/genobj.d Sun May 31 10:41:20 2009 +0200 +++ b/runtime/internal/genobj.d Sun May 31 14:27:01 2009 +0200 @@ -153,7 +153,7 @@ Interface[] interfaces; /// interfaces this class implements ClassInfo base; /// base class void* destructor; - void function(Object) classInvariant; + void* classInvariant; uint flags; // 1: // IUnknown // 2: // has no possible pointers into GC memory @@ -198,8 +198,10 @@ if (flags & 8 && defaultConstructor) { - auto ctor = cast(Object function(Object))defaultConstructor; - return ctor(o); + Object delegate() ctor; + ctor.ptr = cast(void*)o; + ctor.funcptr = cast(Object function())defaultConstructor; + return ctor(); } return o; }