comparison dmd/StringExp.d @ 177:1475fd394c9e

bug fixes
author korDen
date Sun, 10 Oct 2010 10:38:55 +0400
parents fa9a71a9f5a8
children e3afd1303184
comparison
equal deleted inserted replaced
176:fa9a71a9f5a8 177:1475fd394c9e
854 { 854 {
855 e = el_calloc(); 855 e = el_calloc();
856 e.Eoper = OPER.OPstring; 856 e.Eoper = OPER.OPstring;
857 static if (true) { 857 static if (true) {
858 // Match MEM_PH_FREE for OPstring in ztc\el.c 858 // Match MEM_PH_FREE for OPstring in ztc\el.c
859 e.EV.ss.Vstring = cast(char*)GC.malloc((len + 1) * sz); /// ! 859 e.EV.ss.Vstring = cast(char*)malloc((len + 1) * sz); /// !
860 memcpy(e.EV.ss.Vstring, string_, (len + 1) * sz); 860 memcpy(e.EV.ss.Vstring, string_, (len + 1) * sz);
861 } else { 861 } else {
862 e.EV.ss.Vstring = cast(char*)string_; 862 e.EV.ss.Vstring = cast(char*)string_;
863 } 863 }
864 e.EV.ss.Vstrlen = (len + 1) * sz; 864 e.EV.ss.Vstrlen = (len + 1) * sz;