Handbook
Glossary
CFNumber>number ( alien -- number )
Vocabulary
core-foundation
.
numbers
Inputs
alien
an
object
Outputs
number
an
object
Definition
USING:
alien.c-types
combinators
core-foundation
kernel
;
IN:
core-foundation.numbers
:
CFNumber>number
( alien -- number )
dup
CFNumberGetType
dup
{
{
kCFNumberSInt8Type
[
SInt8
(CFNumber>number)
]
}
{
kCFNumberSInt16Type
[
SInt16
(CFNumber>number)
]
}
{
kCFNumberSInt32Type
[
SInt32
(CFNumber>number)
]
}
{
kCFNumberSInt64Type
[
SInt64
(CFNumber>number)
]
}
{
kCFNumberFloat64Type
[
double
(CFNumber>number)
]
}
{
kCFNumberCharType
[
char
(CFNumber>number)
]
}
{
kCFNumberShortType
[
short
(CFNumber>number)
]
}
{
kCFNumberIntType
[
int
(CFNumber>number)
]
}
{
kCFNumberLongType
[
long
(CFNumber>number)
]
}
{
kCFNumberLongLongType
[
longlong
(CFNumber>number)
]
}
{
kCFNumberDoubleType
[
double
(CFNumber>number)
]
}
[
unsupported-number-type
]
}
case
;