Changeset 10701 in webkit for trunk/JavaScriptCore/kjs/number_object.cpp
- Timestamp:
- Oct 3, 2005, 2:13:12 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/number_object.cpp
r10456 r10701 20 20 */ 21 21 22 #include "config.h" 22 23 #include "value.h" 23 24 #include "object.h" … … 97 98 98 99 if (length <= decimalPoint) { 99 buf = (char*) malloc(decimalPoint+1);100 buf = (char*)fastMalloc(decimalPoint+1); 100 101 strcpy(buf,result); 101 102 memset(buf+length,'0',decimalPoint-length); 102 103 } else { 103 buf = (char*) malloc(decimalPoint+1);104 buf = (char*)fastMalloc(decimalPoint+1); 104 105 strncpy(buf,result,decimalPoint); 105 106 } … … 107 108 buf[decimalPoint] = '\0'; 108 109 str += UString(buf); 109 f ree(buf);110 fastFree(buf); 110 111 } 111 112 … … 117 118 static UString char_sequence(char c, int count) 118 119 { 119 char *buf = (char*) malloc(count+1);120 char *buf = (char*)fastMalloc(count+1); 120 121 memset(buf,c,count); 121 122 buf[count] = '\0'; 122 123 UString s(buf); 123 f ree(buf);124 fastFree(buf); 124 125 return s; 125 126 }
Note:
See TracChangeset
for help on using the changeset viewer.