diff lphobos/typeinfo1/ti_float.d @ 473:373489eeaf90

Applied downs' lphobos update
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 04 Aug 2008 19:28:49 +0200
parents 2c3cd3596187
children
line wrap: on
line diff
--- a/lphobos/typeinfo1/ti_float.d	Mon Aug 04 19:08:39 2008 +0200
+++ b/lphobos/typeinfo1/ti_float.d	Mon Aug 04 19:28:49 2008 +0200
@@ -3,6 +3,7 @@
 
 module typeinfo1.ti_float;
 
+import std.gc: malloc;
 class TypeInfo_f : TypeInfo
 {
     char[] toString() { return "float"; }
@@ -62,9 +63,8 @@
     }
 
     void[] init()
-    {	static float r;
-
-	return (&r)[0 .. 1];
+    {
+	return (cast(float*)malloc(float.sizeof))[0..1];
     }
 }