Handbook
Glossary
promote-vararg-type ( type -- type' )
Vocabulary
alien
.
c-types
.
varargs
Inputs
type
an
object
Outputs
type'
an
object
Definition
USING:
accessors
alien.c-types
alien.c-types.varargs.private
combinators
cpu.architecture
kernel
system
;
IN:
alien.c-types.varargs
:
promote-vararg-type
( type -- type' )
dup
lookup-c-type
{
{
[
dup
small-float-c-type?
]
[
os
macos?
cpu
arm.64?
and
[
nip
vararg-type>>
]
[
drop
]
if
]
}
{
[
dup
c-type-rep
float-rep
=
]
[
nip
float-promotion
]
}
{
[
dup
narrow-integer-type?
]
[
nip
integer-promotion
]
}
[
drop
]
}
cond
;