]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix malloc-struct-array
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Wed, 3 Dec 2008 15:54:02 +0000 (09:54 -0600)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Wed, 3 Dec 2008 15:54:02 +0000 (09:54 -0600)
basis/struct-arrays/struct-arrays.factor [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 0b31845..33a469d
@@ -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