This commit is contained in:
0x1eef 2024-07-12 03:54:34 -03:00
parent 27955780dc
commit 1cce8d62c8

View file

@ -48,6 +48,7 @@ module BSD::Capsicum
# Provides a Ruby interface for cap_rights_init(2) # Provides a Ruby interface for cap_rights_init(2)
# @param [Array<Integer>] rights # @param [Array<Integer>] rights
# @return [Fiddle::Pointer] # @return [Fiddle::Pointer]
# Returns a pointer to the structure `cap_rights_t`
def cap_rights_init(*rights) def cap_rights_init(*rights)
voidp = Fiddle::Pointer.malloc(Fiddle::SIZEOF_VOIDP) voidp = Fiddle::Pointer.malloc(Fiddle::SIZEOF_VOIDP)
varargs = rights.flat_map { [ULONG_LONG, (Symbol === _1) ? Constants.const_get(_1) : _1] } varargs = rights.flat_map { [ULONG_LONG, (Symbol === _1) ? Constants.const_get(_1) : _1] }