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

db4
Joe Groff 2010-02-21 23:13:31 -08:00
parent c4cc70b92c
commit d64653ee9a
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
: 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 not ] [ drop no-c-type ] }
{ [ dup pointer? ] [ 2drop void* ] }
@ -124,6 +125,9 @@ M: A v*high [ * \ T heap-size neg shift ] 2map ; inline
[ drop ]
} cond ;
M: pointer underlying-type
drop void* ;
: specialized-array-vocab ( c-type -- vocab )
[
"specialized-arrays.instances." %