# HG changeset patch # User korDen # Date 1283179324 -14400 # Node ID ee670dd808a8e16f90182817c433483106c27d7b # Parent e95073e263566d39578d5d56ec91c5aa7b5d4695 malloc -> GC.malloc change, plus compilation issues fixed (always check before commiting stuff!!!) diff -r e95073e26356 -r ee670dd808a8 dmd/Scope.d --- a/dmd/Scope.d Mon Aug 30 18:38:35 2010 +0400 +++ b/dmd/Scope.d Mon Aug 30 18:42:04 2010 +0400 @@ -26,6 +26,8 @@ import dmd.CSX; import dmd.Util; +import core.memory; + enum SCOPE { SCOPEctor = 1, // constructor type @@ -171,8 +173,8 @@ // similar code is used in Type.clone() // TODO: move to Util or something... size_t size = __traits(classInstanceSize, typeof(this)); - void* mem = malloc(size); - memcpy(mem, this, size); + void* mem = GC.malloc(size); + memcpy(mem, cast(void*)this, size); return cast(typeof(this))mem; }