forked from AbleOS/ableos
random change
This commit is contained in:
parent
c1c02ffefd
commit
7b7e02976d
|
@ -1,7 +1,15 @@
|
|||
any := fn($Expr: type): Expr {
|
||||
$any := fn($Expr: type): Expr {
|
||||
return *@eca(3, 4, &@as(Expr, idk), @sizeof(Expr))
|
||||
}
|
||||
|
||||
range := fn($Expr: type, min: Expr, max: Expr): Expr {
|
||||
$range := fn($Expr: type, min: Expr, max: Expr): Expr {
|
||||
return *@eca(3, 4, &@as(Expr, idk), @sizeof(Expr)) % (max - min) + *@bitcast(&1) + min
|
||||
}
|
||||
|
||||
$fill := fn($Expr: type, ptr: ^Expr): void {
|
||||
return @eca(3, 4, ptr, @sizeof(Expr))
|
||||
}
|
||||
|
||||
$fill_buffer := fn(buf: ^u8, len: uint): void {
|
||||
return @eca(3, 4, buf, len)
|
||||
}
|
Loading…
Reference in a new issue