From: sean Date: Wed, 5 Nov 2008 00:40:16 +0000 (+0000) Subject: Changed D 2.0 runtime to account for 'this' being changed from a pointer to a referen... X-Git-Url: https://git.llucax.com/software/druntime.git/commitdiff_plain/cae23267c83ae53f31305d1e93353dcafd0e02c6 Changed D 2.0 runtime to account for 'this' being changed from a pointer to a reference. This update will only work with DMD 2.021 and above. git-svn-id: http://svn.dsource.org/projects/druntime/trunk@44 4a9d5153-6564-4b3f-b5e1-7e8e9dac548f --- diff --git a/src/compiler/dmd/util/console.d b/src/compiler/dmd/util/console.d index 62991bd..87d969b 100644 --- a/src/compiler/dmd/util/console.d +++ b/src/compiler/dmd/util/console.d @@ -35,7 +35,7 @@ struct Console { write( 2, val.ptr, val.length ); } - return *this; + return this; } diff --git a/src/gc/basic/gcx.d b/src/gc/basic/gcx.d index 97a8b07..b913c36 100644 --- a/src/gc/basic/gcx.d +++ b/src/gc/basic/gcx.d @@ -1468,7 +1468,7 @@ struct Gcx void initialize() { int dummy; - (cast(byte*)this)[0 .. Gcx.sizeof] = 0; + (cast(byte*)&this)[0 .. Gcx.sizeof] = 0; stackBottom = cast(char*)&dummy; log_init(); debug (THREADINVARIANT)