alien.arrays/classes.struct: ensure specialized array types for struct array slots get instantiated at parse time
parent
4d2ded634b
commit
1bf37f01e5
|
@ -35,10 +35,7 @@ M: array box-return drop void* box-return ;
|
|||
M: array stack-size drop void* stack-size ;
|
||||
|
||||
M: array c-type-boxer-quot
|
||||
unclip
|
||||
[ array-length ]
|
||||
[ [ require-c-array ] keep ] bi*
|
||||
[ <c-direct-array> ] 2curry ;
|
||||
unclip [ array-length ] dip [ <c-direct-array> ] 2curry ;
|
||||
|
||||
M: array c-type-unboxer-quot drop [ >c-ptr ] ;
|
||||
|
||||
|
|
|
@ -147,6 +147,7 @@ M: struct-class initial-value* <struct> ; inline
|
|||
GENERIC: struct-slot-values ( struct -- sequence )
|
||||
|
||||
M: struct-class reader-quot
|
||||
dup array? [ dup first define-array-vocab drop ] when
|
||||
nip '[ _ read-struct-slot ] ;
|
||||
|
||||
M: struct-class writer-quot
|
||||
|
|
Loading…
Reference in New Issue