lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject git commit: refs/heads/0.3 - Make Normalizer#Load more forgiving about bools.
Date Wed, 09 Jul 2014 15:43:43 GMT
Repository: lucy
Updated Branches:
  refs/heads/0.3 432f79efc -> 4099411c8


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/4099411c
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/4099411c
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/4099411c

Branch: refs/heads/0.3
Commit: 4099411c8206e051c83ff7e611546f543ba7cfcf
Parents: 432f79e
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Mon May 5 08:57:57 2014 -0700
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Wed Jul 9 17:43:07 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/4099411c/core/Lucy/Analysis/Normalizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Normalizer.c b/core/Lucy/Analysis/Normalizer.c
index fc2e339..f1ff6c5 100644
--- a/core/Lucy/Analysis/Normalizer.c
+++ b/core/Lucy/Analysis/Normalizer.c
@@ -148,9 +148,9 @@ Normalizer_load(Normalizer *self, Obj *dump) {
     Obj *obj = Hash_Fetch_Str(source, "normalization_form", 18);
     CharBuf *form = (CharBuf*)CERTIFY(obj, CHARBUF);
     obj = Hash_Fetch_Str(source, "case_fold", 9);
-    bool_t case_fold = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
+    bool_t case_fold = Obj_To_Bool(CERTIFY(obj, OBJ));
     obj = Hash_Fetch_Str(source, "strip_accents", 13);
-    bool_t strip_accents = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
+    bool_t strip_accents = Obj_To_Bool(CERTIFY(obj, OBJ));
 
     return Normalizer_init(loaded, form, case_fold, strip_accents);
 }


Mime
View raw message