Fix malloc-struct-array

db4
U-SLAVA-DFB8FF805\Slava 2008-12-03 09:54:02 -06:00
parent fdbf623bd4
commit 85c79bb41e
1 changed files with 3 additions and 0 deletions

3
basis/struct-arrays/struct-arrays.factor Normal file → Executable file
View File

@ -34,4 +34,7 @@ ERROR: bad-byte-array-length byte-array ;
: <direct-struct-array> ( alien length c-type -- struct-array )
struct-array boa ; inline
: malloc-struct-array ( length c-type -- struct-array )
heap-size [ calloc ] 2keep <direct-struct-array> ;
INSTANCE: struct-array sequence