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/09/30 23:15:35 UTC
[lucy-commits] [2/6] git commit: refs/heads/cfish-string-prep1 - 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/41ea6160
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/41ea6160
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/41ea6160
Branch: refs/heads/cfish-string-prep1
Commit: 41ea616059137c6f9f4f3de6466f1d27a0ed40a4
Parents: b854f6b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Sep 28 19:50:38 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 22:47:31 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/41ea6160/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++;