]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/alien/c-types/c-types.factor
Merge branch 'master' into new-alien-pointers
[factor.git] / basis / alien / c-types / c-types.factor
index 9db6ac7f4a18a9a58b9fe6ceeba7be7f8d130ac0..a9392b03d7489829d838eaf38c719283de7cf5bb 100644 (file)
@@ -17,8 +17,9 @@ SYMBOLS:
     long ulong
     longlong ulonglong
     float double
-    bool void*
-    void ;
+    void* bool ;
+
+SINGLETON: void
 
 DEFER: <int>
 DEFER: *char
@@ -48,9 +49,6 @@ ERROR: no-c-type name ;
 ! C type protocol
 GENERIC: c-type ( name -- c-type ) foldable
 
-: void? ( c-type -- ? )
-    void = ; inline
-
 PREDICATE: c-type-word < word
     "c-type" word-prop ;
 
@@ -64,14 +62,6 @@ UNION: c-type-name
     dup void? [ no-c-type ] when
     dup c-type-name? [ c-type ] when ;
 
-<PRIVATE
-
-: parse-array-type ( name -- dims c-type )
-    "[" split unclip
-    [ [ "]" ?tail drop string>number ] map ] dip ;
-
-PRIVATE>
-
 M: word c-type
     dup "c-type" word-prop resolve-typedef
     [ ] [ no-c-type ] ?if ;