Mercurial > projects > ddmd
comparison dmd/StringExp.d @ 175:94b6033c07f3
get rid of globals
malloc -> GC.malloc
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:48:06 +0400 |
parents | 14feb7ae01a6 |
children | fa9a71a9f5a8 |
comparison
equal
deleted
inserted
replaced
174:af724d3510d7 | 175:94b6033c07f3 |
---|---|
853 { | 853 { |
854 e = el_calloc(); | 854 e = el_calloc(); |
855 e.Eoper = OPER.OPstring; | 855 e.Eoper = OPER.OPstring; |
856 static if (true) { | 856 static if (true) { |
857 // Match MEM_PH_FREE for OPstring in ztc\el.c | 857 // Match MEM_PH_FREE for OPstring in ztc\el.c |
858 e.EV.ss.Vstring = cast(char*)malloc((len + 1) * sz); /// ! | 858 e.EV.ss.Vstring = cast(char*)GC.malloc((len + 1) * sz); /// ! |
859 memcpy(e.EV.ss.Vstring, string_, (len + 1) * sz); | 859 memcpy(e.EV.ss.Vstring, string_, (len + 1) * sz); |
860 } else { | 860 } else { |
861 e.EV.ss.Vstring = cast(char*)string_; | 861 e.EV.ss.Vstring = cast(char*)string_; |
862 } | 862 } |
863 e.EV.ss.Vstrlen = (len + 1) * sz; | 863 e.EV.ss.Vstrlen = (len + 1) * sz; |