You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/07/09 17:42:41 UTC

git commit: refs/heads/master - Make Normalizer#Load more forgiving about bools.

Repository: lucy
Updated Branches:
  refs/heads/master 1a17dc9e8 -> f0952291b


Make Normalizer#Load more forgiving about bools.

Accept any object which implements To_Bool() in places where booleans
are required when deserializing.  This allows for situations where
booleans do not survive round-tripping through the host language and
back.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f0952291
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f0952291
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f0952291

Branch: refs/heads/master
Commit: f0952291bd336d5c011ce380024d13bb59a7d1cd
Parents: 1a17dc9
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Mon May 5 08:57:57 2014 -0700
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 9 17:41:33 2014 +0200

----------------------------------------------------------------------
 core/Lucy/Analysis/Normalizer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/f0952291/core/Lucy/Analysis/Normalizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Normalizer.c b/core/Lucy/Analysis/Normalizer.c
index 9505fa5..8b5032d 100644
--- a/core/Lucy/Analysis/Normalizer.c
+++ b/core/Lucy/Analysis/Normalizer.c
@@ -154,9 +154,9 @@ Normalizer_Load_IMP(Normalizer *self, Obj *dump) {
     Obj *obj = Hash_Fetch_Utf8(source, "normalization_form", 18);
     String *form = (String*)CERTIFY(obj, STRING);
     obj = Hash_Fetch_Utf8(source, "case_fold", 9);
-    bool case_fold = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
+    bool case_fold = Obj_To_Bool(CERTIFY(obj, OBJ));
     obj = Hash_Fetch_Utf8(source, "strip_accents", 13);
-    bool strip_accents = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
+    bool strip_accents = Obj_To_Bool(CERTIFY(obj, OBJ));
 
     return Normalizer_init(loaded, form, case_fold, strip_accents);
 }