]> gitweb.factorcode.org Git - factor.git/commitdiff
don't box struct pointer values when they're null
authorJoe Groff <arcata@gmail.com>
Tue, 23 Feb 2010 03:08:43 +0000 (19:08 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 23 Feb 2010 03:08:43 +0000 (19:08 -0800)
basis/alien/c-types/c-types-tests.factor
basis/alien/c-types/c-types.factor

index 13bdfa742ad89e1b7d6548f107cdd292dccea02f..ad53dc487bd9c380cc361d986da4ef42890da4a3 100644 (file)
@@ -24,8 +24,6 @@ UNION-STRUCT: foo
 
 [ t ] [ pointer: char c-type char* c-type = ] unit-test
 
-[ t ] [ pointer: foo c-type-boxer-quot foo c-type-boxer-quot = ] unit-test
-
 [ t ] [ foo heap-size int heap-size = ] unit-test
 
 TYPEDEF: int MyInt
index a9392b03d7489829d838eaf38c719283de7cf5bb..316377dc27f687082ad69e39e37138d9e4bd01e6 100644 (file)
@@ -288,7 +288,7 @@ CONSTANT: primitive-types
     }
 
 : (pointer-c-type) ( void* type -- void*' )
-    [ clone ] dip c-type-boxer-quot >>boxer-quot ;
+    [ clone ] dip c-type-boxer-quot '[ _ [ f ] if* ] >>boxer-quot ;
 
 <PRIVATE