lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [14/15] git commit: refs/heads/install-c-library - Allow NULL target in Doc#Extract
Date Sat, 18 May 2013 19:23:59 GMT
Allow NULL target in Doc#Extract

Something like a simple Doc#Fetch method might be useful for the C
library.


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

Branch: refs/heads/install-c-library
Commit: acb55b73d7694587d8dfb3e4566323c0b5164097
Parents: 174f42b
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat May 18 21:18:13 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat May 18 21:18:13 2013 +0200

----------------------------------------------------------------------
 c/src/Lucy/Document/Doc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/acb55b73/c/src/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Document/Doc.c b/c/src/Lucy/Document/Doc.c
index 8e898ec..8b44af2 100644
--- a/c/src/Lucy/Document/Doc.c
+++ b/c/src/Lucy/Document/Doc.c
@@ -83,7 +83,7 @@ Doc_extract(Doc *self, CharBuf *field,
     Hash *hash = (Hash *)self->fields;
     Obj  *obj  = Hash_Fetch(hash, (Obj *)field);
 
-    if (obj && Obj_Is_A(obj, CHARBUF)) {
+    if (target && obj && Obj_Is_A(obj, CHARBUF)) {
         ViewCB_Assign(target, (CharBuf *)obj);
     }
 


Mime
View raw message