     [ (marshall-char*-or-string) &free ] ptr-pass-through ;
 
 : (marshall-char**-or-strings) ( seq -- alien )
-    first string?
+    dup first string?
     [ utf8 strings>alien malloc-byte-array ]
     [ (marshall-char**) ] if ;
 
-: marshall-char**-or-string ( n/string -- alien )
-    [ (marshall-char**-or-string) ] ptr-pass-through ;
-
-: marshall-char**-or-string-free ( n/string -- alien )
-    [ (marshall-char**-or-string) &free ] ptr-pass-through ;
+: marshall-char**-or-strings ( n/string -- alien )
+    [ (marshall-char**-or-strings) ] ptr-pass-through ;
+
+: marshall-char**-or-strings-free ( n/string -- alien )
+    [ (marshall-char**-or-strings) &free ] ptr-pass-through ;
 
 : primitive-marshaller ( type -- quot/f )
     {

        [ drop f ]
    } case ;

: marshall-non-ptr ( obj -- byte-array/f )
    {
        { [ dup byte-array? ] [ ] }
        { [ dup alien-wrapper? ]

! Copyright (C) 2009 Jeremy Hughes.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.inline.types
alien.marshall.private alien.strings byte-arrays classes
combinators combinators.short-circuit destructors fry
io.encodings.utf8 kernel libc sequences
specialized-arrays.alien specialized-arrays.bool
specialized-arrays.char specialized-arrays.double
specialized-arrays.float specialized-arrays.int
specialized-arrays.long specialized-arrays.longlong
specialized-arrays.short specialized-arrays.uchar
specialized-arrays.uint specialized-arrays.ulong
specialized-arrays.ulonglong specialized-arrays.ushort strings
unix.utilities vocabs.parser words ;
IN: alien.marshall

<< primitive-types [ "void*" = not ] filter
