Replace local var
This commit is contained in:
parent
08cfdd1e81
commit
995dde70c1
1 changed files with 5 additions and 2 deletions
|
@ -54,12 +54,15 @@ module BSD::Capsicum
|
|||
# @return [Fiddle::Pointer]
|
||||
# Returns a pointer to the structure `cap_rights_t`
|
||||
def cap_rights_init(rights, *capabilities)
|
||||
varargs = capabilities.flat_map { [ULONG_LONG, (Symbol === _1) ? Constants.const_get(_1) : _1] }
|
||||
Fiddle::Function.new(
|
||||
libc["__cap_rights_init"],
|
||||
[INT, VOIDP, VARIADIC],
|
||||
VOIDP
|
||||
).call(CAP_RIGHTS_VERSION, rights, *varargs)
|
||||
).call(
|
||||
CAP_RIGHTS_VERSION, rights,
|
||||
*capabilities.flat_map {
|
||||
[ULONG_LONG, (Symbol === _1) ? Constants.const_get(_1) : _1]
|
||||
})
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue