mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix missing free on GrowableBitSet. init_new/init_temp for GrowableBitSet, LinkedList, List, HashMap, DString, ByteBuffer. Interface to_string renamed to_new_string. Change in allocator usage, malloc is now heap. Added new_array, new_zero_array, new, new_clear, clone. Concat => concat_new. string::printf => string::new_format, string::tprintf => string::tformat. "to_*" are now "to_new_*" and "to_temp_*". "from_*" is "new_from*"
This commit is contained in:
committed by
Christoffer Lerno
parent
69470b8738
commit
1e38ccdd2b
@@ -26,7 +26,7 @@ fn void seeder(char[] input, char[] out_buffer)
|
||||
usz out_chars = out_buffer.len;
|
||||
@pool()
|
||||
{
|
||||
ulong[] words = tmalloc(ulong, (out_chars + 7) / 8);
|
||||
ulong[] words = mem::temp_array(ulong, (out_chars + 7) / 8);
|
||||
words[..] = ODD_PHI64;
|
||||
usz words_len_2 = words.len * 2;
|
||||
|
||||
@@ -85,7 +85,7 @@ fn char[8 * 4] entropy()
|
||||
hash(&entropy),
|
||||
random_int,
|
||||
hash(clock::now()),
|
||||
hash(&DString.init),
|
||||
hash(&DString.init_new),
|
||||
hash(mem::heap())
|
||||
};
|
||||
return bitcast(entropy_data, char[8 * 4]);
|
||||
|
||||
Reference in New Issue
Block a user