mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Change typedef and const enums to not convert from literals by default. (#2934)
- Add `@constinit` to allow old typedef behaviour.
This commit is contained in:
committed by
GitHub
parent
bbf89815d6
commit
e299a4b630
@@ -8,9 +8,9 @@ typedef NativeThread = int;
|
||||
|
||||
fn void NativeOnceFlag.call_once(&flag, OnceFn func)
|
||||
{
|
||||
if (*flag == 0)
|
||||
if (*flag == (NativeOnceFlag)0)
|
||||
{
|
||||
*flag = 1;
|
||||
*flag = (NativeOnceFlag)1;
|
||||
func();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user