Mercurial > projects > ldc
diff lphobos/std/outbuffer.d @ 662:88e23f8c2354
Applied downs' latest Phobos patch
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 06 Oct 2008 21:40:33 +0200 |
parents | 373489eeaf90 |
children |
line wrap: on
line diff
--- a/lphobos/std/outbuffer.d Mon Oct 06 21:27:29 2008 +0200 +++ b/lphobos/std/outbuffer.d Mon Oct 06 21:40:33 2008 +0200 @@ -268,7 +268,7 @@ if (count != -1) break; psize *= 2; - p = cast(char *) alloca(psize); // buffer too small, try again with larger size + p = cast(char *) /*alloca*/malloc(psize); // buffer too small, try again with larger size } else version(GNU) { count = vsnprintf(p,psize,f,args_copy); @@ -278,7 +278,7 @@ psize = count + 1; else break; - p = cast(char *) alloca(psize); // buffer too small, try again with larger size + p = cast(char *) /*alloca*/std.gc.malloc(psize); // buffer too small, try again with larger size } else version(linux) { @@ -294,7 +294,7 @@ c.stdlib.free(p); p = (char *) c.stdlib.malloc(psize); // buffer too small, try again with larger size +/ - p = cast(char *) alloca(psize); // buffer too small, try again with larger size + p = cast(char *) /*alloca*/std.gc.malloc(psize); // buffer too small, try again with larger size } } write(p[0 .. count]);