1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien alien.c-types alien.strings
4 combinators.short-circuit fry kernel layouts sequences
5 specialized-arrays.alien accessors ;
9 { [ ] [ *void* ] } 1&& ;
11 : advance ( void* -- void* )
12 cell swap <displaced-alien> ;
14 : alien>strings ( alien encoding -- strings )
16 '[ [ advance ] [ *void* _ alien>string ] bi ]
19 : strings>alien ( strings encoding -- alien )
20 '[ _ malloc-string ] void*-array{ } map-as f suffix underlying>> ;