add words to deal with void** to contrib/alien
parent
887a53ea80
commit
5ee8a82429
|
@ -9,4 +9,12 @@ dup length "float" <c-array> copy-seq-to-float-array ;
|
||||||
|
|
||||||
: float-array>array ( byte-array n -- array ) [ swap float-nth ] map-with ;
|
: float-array>array ( byte-array n -- array ) [ swap float-nth ] map-with ;
|
||||||
|
|
||||||
PROVIDE: contrib/alien ;
|
: >void*-array
|
||||||
|
[ length "void*" <c-array> ] keep
|
||||||
|
dup length [ pick set-char*-nth ] 2each ;
|
||||||
|
|
||||||
|
: seq>void*-array ( seq -- seq byte-array )
|
||||||
|
#! output seq is an array of pointers that must be freed
|
||||||
|
[ <malloc-string> ] map dup >void*-array ;
|
||||||
|
|
||||||
|
PROVIDE: contrib/alien ;
|
||||||
|
|
Loading…
Reference in New Issue