Handbook
Glossary
if-c-ptr ( seq c-ptr-quot not-c-ptr-quot -- )
Vocabulary
endian
.
private
Inputs
seq
an
object
c-ptr-quot
an
object
not-c-ptr-quot
an
object
Outputs
None
Definition
USING:
accessors
alien
byte-arrays
byte-vectors
combinators.short-circuit
kernel
sequences
;
IN:
endian.private
:
if-c-ptr
( seq c-ptr-quot not-c-ptr-quot -- )
[
dup
{
[
byte-array?
]
[
byte-vector?
]
}
1||
[
t
]
[
dup
{
[
slice?
]
[
seq>>
]
}
1&&
[
{
[
byte-array?
]
[
byte-vector?
]
}
1||
]
[
f
]
if*
]
if
]
2dip
[
[
[
>c-ptr
]
]
dip
compose
]
dip
if
;
inline