Mercurial > projects > ddmd
diff dmd/PragmaDeclaration.d @ 180:0622fff7810a
Fixed a few memory allocation related issues
author | korDen |
---|---|
date | Sun, 17 Oct 2010 23:23:28 +0400 |
parents | e3afd1303184 |
children | b0d41ff5e0df |
line wrap: on
line diff
--- a/dmd/PragmaDeclaration.d Sun Oct 17 20:56:07 2010 +0400 +++ b/dmd/PragmaDeclaration.d Sun Oct 17 23:23:28 2010 +0400 @@ -21,7 +21,7 @@ import dmd.backend.Util; import dmd.backend.Symbol; -import core.memory; +import core.stdc.stdlib : malloc; class PragmaDeclaration : AttribDeclaration { @@ -252,7 +252,7 @@ assert(e.op == TOKstring); auto se = cast(StringExp)e; - char* name = cast(char*)GC.malloc(se.len + 1); + char* name = cast(char*)malloc(se.len + 1); memcpy(name, se.string_, se.len); name[se.len] = 0; version (OMFOBJ) {