Mercurial > projects > ddmd
comparison dmd/OutBuffer.d @ 175:94b6033c07f3
get rid of globals
malloc -> GC.malloc
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:48:06 +0400 |
parents | e28b18c23469 |
children | e3afd1303184 |
comparison
equal
deleted
inserted
replaced
174:af724d3510d7 | 175:94b6033c07f3 |
---|---|
290 } | 290 } |
291 | 291 |
292 string toChars() | 292 string toChars() |
293 { | 293 { |
294 char[] s = getString(); | 294 char[] s = getString(); |
295 char* copy = cast(char*)malloc(s.length); | 295 char* copy = cast(char*)GC.malloc(s.length); |
296 memcpy(copy, s.ptr, s.length); | 296 memcpy(copy, s.ptr, s.length); |
297 return assumeUnique(copy[0..s.length]); | 297 return assumeUnique(copy[0..s.length]); |
298 | 298 |
299 //return getString().idup; | 299 //return getString().idup; |
300 } | 300 } |