From 829351f2f28f61ec1d5ec10ba93025401b38a8ca Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Mon, 22 Feb 2010 19:08:43 -0800 Subject: [PATCH] don't box struct pointer values when they're null --- basis/alien/c-types/c-types-tests.factor | 2 -- basis/alien/c-types/c-types.factor | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/basis/alien/c-types/c-types-tests.factor b/basis/alien/c-types/c-types-tests.factor index 13bdfa742a..ad53dc487b 100644 --- a/basis/alien/c-types/c-types-tests.factor +++ b/basis/alien/c-types/c-types-tests.factor @@ -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 diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index a9392b03d7..316377dc27 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -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 ;