mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
0.5.4: Hash variables accept designated initializers. @safemacro overrides the need for @ in macro names. Fixes to macro context evaluation. Updated allocator api. Removed install_win_reqs.bat. Deterministic @init for MacOS. Fixed temp memory issue with formatter. Support LLVM 19. Add support to compare bitstructs using == and !=. Support Windows .def files. Removed invalid grammar from grammar.y. Support compile time folding of &|^~ for bitstructs. output project setting now respected. Fix issue where constants were not properly constant folded. Add temp_push/pop. Aliased declarations caused errors when used in initializers. Fix export output. Fix of const ternary #1118. Fix of $$MODULE in nested macros #1117. Fix debug info on globals. out now correctly detects subscript[] use #1116. Lateral implicit imports removed. Default to '.' if no libdir is specified. Improved error messages for --lib. Fix raylib snake example. Overzealous local escape check corrected #1127. Improved yacc grammar #1128. --linker argument #1067. Fixes to the matrix operations #1130. Added GenericList.
This commit is contained in:
committed by
Christoffer Lerno
parent
c673101bbb
commit
748c737e8f
@@ -1,5 +1,5 @@
|
||||
module std::math::random;
|
||||
import std::hash::fnv32a;
|
||||
import std::hash::fnv32a, std::time;
|
||||
|
||||
const ODD_PHI64 @local = 0x9e3779b97f4a7c15;
|
||||
const MUL_MCG64 @local = 0xf1357aea2e62a9c5;
|
||||
@@ -26,7 +26,7 @@ fn void seeder(char[] input, char[] out_buffer)
|
||||
usz out_chars = out_buffer.len;
|
||||
@pool()
|
||||
{
|
||||
ulong[] words = mem::temp_array(ulong, (out_chars + 7) / 8);
|
||||
ulong[] words = mem::temp_alloc_array(ulong, (out_chars + 7) / 8);
|
||||
words[..] = ODD_PHI64;
|
||||
usz words_len_2 = words.len * 2;
|
||||
|
||||
@@ -86,7 +86,7 @@ fn char[8 * 4] entropy()
|
||||
random_int,
|
||||
hash(clock::now()),
|
||||
hash(&DString.new_init),
|
||||
hash(mem::heap())
|
||||
hash(allocator::heap())
|
||||
};
|
||||
return bitcast(entropy_data, char[8 * 4]);
|
||||
}
|
||||
Reference in New Issue
Block a user