]> gitweb.factorcode.org Git - factor.git/commitdiff
trying to memory>struct a non-struct class is feptastic
authorJoe Groff <arcata@gmail.com>
Thu, 27 Aug 2009 00:09:38 +0000 (19:09 -0500)
committerJoe Groff <arcata@gmail.com>
Thu, 27 Aug 2009 00:09:38 +0000 (19:09 -0500)
basis/struct-arrays/struct-arrays.factor

index c8a1f5f8024f46405738649b0e7d6f0e42526d85..a426f8bb667bda99fb55e64c431e4c7c02990b1e 100755 (executable)
@@ -20,7 +20,7 @@ M: struct-array byte-length [ length>> ] [ element-size>> ] bi * ;
     [ element-size>> * ] [ underlying>> ] bi <displaced-alien> ; inline
 
 M: struct-array nth-unsafe
-    [ (nth-ptr) ] [ class>> ] bi [ memory>struct ] when* ; inline
+    [ (nth-ptr) ] [ class>> struct-class? ] bi [ memory>struct ] when* ; inline
 
 M: struct-array set-nth-unsafe
     [ (nth-ptr) swap ] [ element-size>> ] bi memcpy ;