MCPcopy Index your code
hub / github.com/Shopify/go-lua / bitOp

Function bitOp

bit32.go:40–46  ·  view source on GitHub ↗
(l *State, init uint, f func(a, b uint) uint)

Source from the content-addressed store, hash-verified

38}
39
40func bitOp(l *State, init uint, f func(a, b uint) uint) uint {
41 r := init
42 for i, n := 1, l.Top(); i <= n; i++ {
43 r = f(r, CheckUnsigned(l, i))
44 }
45 return trim(r)
46}
47
48func andHelper(l *State) uint {
49 x := bitOp(l, ^uint(0), func(a, b uint) uint { return a & b })

Callers 2

andHelperFunction · 0.85
bit32.goFile · 0.85

Calls 3

CheckUnsignedFunction · 0.85
trimFunction · 0.85
TopMethod · 0.80

Tested by

no test coverage detected