specialized-arrays: fix underlying-type so it always returns void* for pointer types

Joe Groff 2010-02-21 23:13:31 -08:00
parent b8bfeec48f
commit 1fdbd49dca
1 changed files with 5 additions and 1 deletions

View File

@ -116,7 +116,8 @@ M: A v*high [ * \ T heap-size neg shift ] 2map ; inline
;FUNCTOR ;FUNCTOR
: underlying-type ( c-type -- c-type' ) GENERIC: underlying-type ( c-type -- c-type' )
M: c-type-word underlying-type
dup "c-type" word-prop { dup "c-type" word-prop {
{ [ dup not ] [ drop no-c-type ] } { [ dup not ] [ drop no-c-type ] }
{ [ dup pointer? ] [ 2drop void* ] } { [ dup pointer? ] [ 2drop void* ] }
@ -124,6 +125,9 @@ M: A v*high [ * \ T heap-size neg shift ] 2map ; inline
[ drop ] [ drop ]
} cond ; } cond ;
M: pointer underlying-type
drop void* ;
: specialized-array-vocab ( c-type -- vocab ) : specialized-array-vocab ( c-type -- vocab )
[ [
"specialized-arrays.instances." % "specialized-arrays.instances." %