From c0588221cfbc3519919906e7fcce6832e6124c43 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 19 Nov 2009 19:34:46 -0600 Subject: [PATCH] classes.struct: compute slot offsets before alignment to fix struct size problem on PPC --- basis/classes/struct/struct.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/classes/struct/struct.factor b/basis/classes/struct/struct.factor index c7dd3fb505..91ad707466 100755 --- a/basis/classes/struct/struct.factor +++ b/basis/classes/struct/struct.factor @@ -281,8 +281,9 @@ M: struct binary-zero? >c-ptr [ 0 = ] all? ; slots empty? [ struct-must-have-slots ] when class redefine-struct-tuple-class slots make-slots dup check-struct-slots :> slot-specs + slot-specs offsets-quot call :> unaligned-size slot-specs struct-alignment :> alignment - slot-specs offsets-quot call alignment align :> size + unaligned-size alignment align :> size class slot-specs size alignment c-type-for-class :> c-type