any_num → any_int where applicable

This commit is contained in:
dzaima 2025-01-26 21:12:03 +02:00
parent 936300a492
commit b899180166
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ def exportN{f, ...ns} = each{export{.,f}, ns}
def exportT{name, fs} = { v:*oneType{fs} = fs; export{name, v} }
oper &~ andnot infix none 35
def andnot{a, b:T if any_num{a} and isprim{T}} = a & ~b
def andnot{a, b:T if any_int{a} and isprim{T}} = a & ~b
def andnot{a:T, b if isprim{T} and knum{b}} = a & ~T~~b
oper &- ({v:T,m:(u1)} => v & -promote{T,m}) infix left 35

View File

@ -44,7 +44,7 @@ def el_c16 = 6
def el_c32 = 7
def el_B = 8
def get_range{elt, data:*_, len:ux if any_num{elt} and (not knum{elt} or (elt>=el_bit and elt<=el_f64))} = {
def get_range{elt, data:*_, len:ux if any_int{elt} and (not knum{elt} or (elt>=el_bit and elt<=el_f64))} = {
def fns = emit{*fntype{*void, *i64, u64, u1}, '', 'getRange_fns'}
buf:*i64 = undefined{i64, 2}
def ok = load{fns, elt}(*void~~data, buf, len)