]> gitweb.factorcode.org Git - factor.git/commitdiff
alien.c-types: make a couple of words private
authorSlava Pestov <slava@factorcode.org>
Wed, 19 May 2010 02:34:42 +0000 (22:34 -0400)
committerSlava Pestov <slava@factorcode.org>
Wed, 19 May 2010 02:34:42 +0000 (22:34 -0400)
basis/alien/c-types/c-types.factor

index 7bcb59997dce692f12c83d9088e3150f2c46f9ed..7f66417a55042ed847e304ff2dd4e9166180166f 100644 (file)
@@ -189,15 +189,19 @@ CONSTANT: primitive-types
         c-string
     }
 
-: (pointer-c-type) ( void* type -- void*' )
-    [ clone ] dip c-type-boxer-quot '[ _ [ f ] if* ] >>boxer-quot ;
-
 : >c-bool ( ? -- int ) 1 0 ? ; inline
 
 : c-bool> ( int -- ? ) 0 = not ; inline
 
 <PRIVATE
 
+: 8-byte-alignment ( c-type -- c-type )
+    {
+        { [ cpu ppc? os macosx? and ] [ 4 >>align 8 >>align-first ] }
+        { [ cpu x86.32? os windows? not and ] [ 4 >>align 4 >>align-first ] }
+        [ 8 >>align 8 >>align-first ]
+    } cond ;
+
 : resolve-pointer-typedef ( type -- base-type )
     dup "c-type" word-prop dup word?
     [ nip resolve-pointer-typedef ] [
@@ -209,19 +213,15 @@ CONSTANT: primitive-types
         resolve-pointer-typedef [ void? ] [ primitive-types member? ] bi or
     ] [ drop t ] if ;
 
+: (pointer-c-type) ( void* type -- void*' )
+    [ clone ] dip c-type-boxer-quot '[ _ [ f ] if* ] >>boxer-quot ;
+
 PRIVATE>
 
 M: pointer c-type
     [ \ void* c-type ] dip
     to>> dup primitive-pointer-type? [ drop ] [ (pointer-c-type) ] if ;
 
-: 8-byte-alignment ( c-type -- c-type )
-    {
-        { [ cpu ppc? os macosx? and ] [ 4 >>align 8 >>align-first ] }
-        { [ cpu x86.32? os windows? not and ] [ 4 >>align 4 >>align-first ] }
-        [ 8 >>align 8 >>align-first ]
-    } cond ;
-
 [
     <c-type>
         c-ptr >>class