]> gitweb.factorcode.org Git - factor.git/commitdiff
classes.struct: factoring struct-size out.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 25 Apr 2013 04:00:37 +0000 (21:00 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 25 Apr 2013 04:00:37 +0000 (21:00 -0700)
basis/classes/struct/struct.factor

index c90ae52211960b70b0043c2ac814dea702757a0d..d603e3233ababd080befb9ed87bab9fc1f153600 100644 (file)
@@ -250,7 +250,9 @@ M: struct-bit-slot-spec compute-slot-offset
 
 PRIVATE>
 
-M: struct byte-length class-of "struct-size" word-prop ; inline foldable
+: struct-size ( class -- n ) "struct-size" word-prop ; inline
+
+M: struct byte-length class-of struct-size ; inline foldable
 M: struct binary-zero? binary-object uchar <c-direct-array> [ 0 = ] all? ; inline
 
 ! class definition