diff dmd/FuncDeclaration.d @ 175:94b6033c07f3

get rid of globals malloc -> GC.malloc
author korDen
date Sun, 10 Oct 2010 03:48:06 +0400
parents af724d3510d7
children fa9a71a9f5a8
line wrap: on
line diff
--- a/dmd/FuncDeclaration.d	Sun Oct 10 03:47:23 2010 +0400
+++ b/dmd/FuncDeclaration.d	Sun Oct 10 03:48:06 2010 +0400
@@ -125,6 +125,8 @@
 
 import std.string;
 
+__gshared static int hiddenparami;    // how many we've generated so far
+
 class FuncDeclaration : Declaration
 {
     Array fthrows;			// Array of Type's of exceptions (not used)
@@ -3409,8 +3411,6 @@
 			// as the first argument
 			.type* thidden = tf.next.pointerTo().toCtype();
 			char hiddenparam[5+4+1];
-			static int hiddenparami;    // how many we've generated so far
-
 			sprintf(hiddenparam.ptr, "__HID%d".ptr, ++hiddenparami);
 			shidden = symbol_name(hiddenparam.ptr, SC.SCparameter, thidden);
 			shidden.Sflags |= SFL.SFLtrue | SFL.SFLfree;