]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 29 Aug 2009 23:59:36 +0000 (18:59 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 29 Aug 2009 23:59:36 +0000 (18:59 -0500)
basis/classes/struct/struct.factor
basis/tools/deprecation/deprecation.factor

index 2cafb5e8fe24b6d2770635e694210769f933ef9d..88c207f41891ebf59becec966d8464868ced0c5d 100644 (file)
@@ -45,7 +45,7 @@ M: struct equal?
 ] 1 define-partial-eval
 
 : malloc-struct ( class -- struct )
-    [ heap-size malloc ] keep memory>struct ; inline
+    [ 1 swap heap-size calloc ] keep memory>struct ; inline
 
 : (struct) ( class -- struct )
     [ heap-size <byte-array> ] keep memory>struct ; inline
index ff6a7ef51a4fa4c73715ced29f690864f2bbad6e..0ee60b06b5168c471797c88d562012a47169c4dc 100644 (file)
@@ -1,5 +1,6 @@
 ! (c)2009 Joe Groff bsd license
-USING: accessors arrays assocs compiler.units debugger init io
+USING: accessors arrays assocs combinators.short-circuit
+compiler.units debugger init io
 io.streams.null kernel namespaces prettyprint sequences
 source-files.errors summary tools.crossref
 tools.crossref.private tools.errors words ;
@@ -41,7 +42,7 @@ T{ error-type
 
 : check-deprecations ( usage -- )
     dup word? [
-        dup "forgotten" word-prop
+        dup { [ "forgotten" word-prop ] [ deprecated? ] } 1||
         [ clear-deprecation-note ] [
             dup def>> uses [ deprecated? ] filter
             [ clear-deprecation-note ] [ >array deprecation-note ] if-empty