From 4e7bada863c2988c25e477419f4fb8bd6cde1408 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sat, 29 Aug 2009 17:17:25 -0500 Subject: [PATCH 1/2] use calloc in malloc-struct for consistency with malloc-object and malloc-array --- basis/classes/struct/struct.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/classes/struct/struct.factor b/basis/classes/struct/struct.factor index 2cafb5e8fe..88c207f418 100644 --- a/basis/classes/struct/struct.factor +++ b/basis/classes/struct/struct.factor @@ -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 ] keep memory>struct ; inline From 51405868d1c8fd970f29f0bff7cf0e97fdcc96e8 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sat, 29 Aug 2009 17:41:21 -0500 Subject: [PATCH 2/2] ignore deprecations in words that are themselves deprecated --- basis/tools/deprecation/deprecation.factor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basis/tools/deprecation/deprecation.factor b/basis/tools/deprecation/deprecation.factor index ff6a7ef51a..0ee60b06b5 100644 --- a/basis/tools/deprecation/deprecation.factor +++ b/basis/tools/deprecation/deprecation.factor @@ -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