specialized-arrays: fix underlying-type so it always returns void* for pointer types
parent
b8bfeec48f
commit
1fdbd49dca
|
|
@ -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." %
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue