]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/alien/parser/parser.factor
use a "pointer" wrapper tuple to indicate pointer types instead of the current slipsh...
[factor.git] / basis / alien / parser / parser.factor
index 0cf495fd25d4cd53592be9fdf989d50ad16f6995..09ee88c173c4130034afe76111d452b73df3b5fd 100644 (file)
@@ -19,13 +19,12 @@ IN: alien.parser
         { [ dup "void" =         ] [ drop void ] }
         { [ CHAR: ] over member? ] [ parse-array-type parse-c-type-name prefix ] }
         { [ dup search           ] [ parse-c-type-name ] }
-        { [ "**" ?tail           ] [ drop void* ] }
-        { [ "*" ?tail            ] [ parse-c-type-name resolve-pointer-type ] }
+        { [ "*" ?tail            ] [ (parse-c-type) <pointer> ] }
         [ dup search [ ] [ no-word ] ?if ]
     } cond ;
 
 : valid-c-type? ( c-type -- ? )
-    { [ array? ] [ c-type-name? ] [ void? ] } 1|| ;
+    { [ array? ] [ c-type-word? ] [ pointer? ] [ void? ] } 1|| ;
 
 : parse-c-type ( string -- type )
     (parse-c-type) dup valid-c-type? [ no-c-type ] unless ;