]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/alien/arrays/arrays.factor
use a "pointer" wrapper tuple to indicate pointer types instead of the current slipsh...
[factor.git] / basis / alien / arrays / arrays.factor
old mode 100755 (executable)
new mode 100644 (file)
index 52c6afa..cf6e864
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.strings alien.c-types alien.accessors
-arrays words sequences math kernel namespaces fry libc cpu.architecture
+USING: alien alien.strings alien.c-types alien.data alien.accessors
+arrays words sequences math kernel namespaces fry cpu.architecture
 io.encodings.utf8 accessors ;
 IN: alien.arrays
 
@@ -20,6 +20,8 @@ M: array heap-size unclip [ array-length ] [ heap-size ] bi* * ;
 
 M: array c-type-align first c-type-align ;
 
+M: array c-type-align-first first c-type-align-first ;
+
 M: array c-type-stack-align? drop f ;
 
 M: array unbox-parameter drop void* unbox-parameter ;
@@ -55,6 +57,9 @@ M: string-type heap-size
 M: string-type c-type-align
     drop void* c-type-align ;
 
+M: string-type c-type-align-first
+    drop void* c-type-align-first ;
+
 M: string-type c-type-stack-align?
     drop void* c-type-stack-align? ;
 
@@ -94,8 +99,5 @@ M: string-type c-type-getter
 M: string-type c-type-setter
     drop [ set-alien-cell ] ;
 
-{ char* utf8 } char* typedef
-char* uchar* typedef
+TYPEDEF: { char* utf8 } char*
 
-char  char*  "pointer-c-type" set-word-prop
-uchar uchar* "pointer-c-type" set-word-prop