Mercurial > projects > ddmd
changeset 83:ee670dd808a8
malloc -> GC.malloc change, plus compilation issues fixed (always check before commiting stuff!!!)
author | korDen |
---|---|
date | Mon, 30 Aug 2010 18:42:04 +0400 |
parents | e95073e26356 |
children | be2ab491772e b17640f0e4e8 |
files | dmd/Scope.d |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }