From df8c370e17b56cf7b19240283c02568a73db2bc7 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 24 Apr 2013 21:00:37 -0700 Subject: [PATCH] classes.struct: factoring struct-size out. --- basis/classes/struct/struct.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basis/classes/struct/struct.factor b/basis/classes/struct/struct.factor index c90ae52211..d603e3233a 100644 --- a/basis/classes/struct/struct.factor +++ b/basis/classes/struct/struct.factor @@ -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 [ 0 = ] all? ; inline ! class definition