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 2013/10/11 15:32:24 UTC
[lucy-commits] [46/50] [abbrv] git commit: refs/heads/master - Fix C sample program
Fix C sample program
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/bb0fff59
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/bb0fff59
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/bb0fff59
Branch: refs/heads/master
Commit: bb0fff59cbc2f34007f287ca91406f368b5f005d
Parents: d099713
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Sep 28 19:50:38 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Oct 11 15:28:21 2013 +0200
----------------------------------------------------------------------
c/sample/getting_started.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/bb0fff59/c/sample/getting_started.c
----------------------------------------------------------------------
diff --git a/c/sample/getting_started.c b/c/sample/getting_started.c
index f7bbcfe..10093b8 100644
--- a/c/sample/getting_started.c
+++ b/c/sample/getting_started.c
@@ -23,13 +23,14 @@
*
* c99 \
* getting_started.c \
- * -I $PREFIX/include -L $PREFIX/lib -l lucy \
+ * -I $PREFIX/include -L $PREFIX/lib -l cfish -l lucy \
* -o getting_started
*/
#include <stdio.h>
#include <string.h>
+#define CFISH_USE_SHORT_NAMES
#define LUCY_USE_SHORT_NAMES
#include "Clownfish/String.h"
#include "Lucy/Analysis/EasyAnalyzer.h"
@@ -179,7 +180,7 @@ S_search(IndexSearcher *searcher, const char *query) {
printf("Result %d: %s\n", i, value);
- DECREF(value);
+ free(value);
DECREF(value_str);
DECREF(hit);
i++;