]> gitweb.factorcode.org Git - factor.git/commitdiff
fix boa undo to work with structs
authorJoe Groff <joe@victoria.(none)>
Wed, 12 Aug 2009 20:09:25 +0000 (16:09 -0400)
committerJoe Groff <joe@victoria.(none)>
Wed, 12 Aug 2009 20:09:25 +0000 (16:09 -0400)
basis/inverse/inverse.factor
extra/classes/struct/struct-tests.factor

index cf97a0b2c8eebf78c0747e18639b6cab8efff03e..2183c95f080db60145007c7016d888ea7188d3a5 100755 (executable)
@@ -236,7 +236,7 @@ DEFER: __
     "predicate" word-prop [ dupd call assure ] curry ;
 
 : slot-readers ( class -- quot )
-    all-slots [ name>> reader-word 1quotation ] map [ cleave ] curry ;
+    class-slots [ name>> reader-word 1quotation ] map [ cleave ] curry ;
 
 : ?wrapped ( object -- wrapped )
     dup wrapper? [ wrapped>> ] when ;
index 958a7ea55c8dc5ff9e93489db77c7df685194bb1..58069603320b50495b37ec179764e2376463ce87 100644 (file)
@@ -1,5 +1,5 @@
 USING: accessors alien.c-types classes.c-types classes.struct
-combinators kernel tools.test ;
+combinators inverse kernel tools.test ;
 IN: classes.struct.tests
 
 STRUCT: foo
@@ -28,3 +28,5 @@ STRUCT: bar
 
 [ 7654 ] [ S{ foo f 98 7654 f } y>> ] unit-test
 [ 7654 ] [ S{ foo { y 7654 } } y>> ] unit-test
+
+[ 98 7654 t ] [ S{ foo f 98 7654 t } [ foo boa ] undo ] unit-test