diff dmd/PragmaDeclaration.d @ 2:7427ded8caf7

Removed unreferenced modules First step at fixing GC issues - now calling GC.malloc instead of malloc (ditto calloc and realloc), get rid of free
author korDen
date Sun, 25 Oct 2009 03:20:59 +0300
parents 10317f0c89a5
children d706d958e4e8
line wrap: on
line diff
--- a/dmd/PragmaDeclaration.d	Sat Oct 24 17:25:59 2009 +0400
+++ b/dmd/PragmaDeclaration.d	Sun Oct 25 03:20:59 2009 +0300
@@ -20,6 +20,8 @@
 import dmd.backend.Util;
 import dmd.backend.Symbol;
 
+import dmd.Memory;
+
 class PragmaDeclaration : AttribDeclaration
 {
     Expressions args;		// array of Expression's
@@ -251,7 +253,7 @@
 			assert(e.op == TOKstring);
 
 			StringExp se = cast(StringExp)e;
-			char* name = cast(char*)malloc(se.len + 1);
+			char* name = cast(char*)GC.malloc(se.len + 1);
 			memcpy(name, se.string_, se.len);
 			name[se.len] = 0;
 		version (OMFOBJ) {