zntg/allegro5/flagmut.go

19 lines
209 B
Go
Raw Normal View History

package allegro5
// #include <stdlib.h>
import "C"
type flagMut struct {
flg C.int
}
func (m *flagMut) Set(f C.int) {
m.flg |= f
}
func (m *flagMut) Unset(f C.int) {
if m.flg&f == f {
m.flg ^= f
}
}