You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2013/08/13 00:12:32 UTC
[lucy-commits] [07/11] git commit: refs/heads/method-imp-names-wip2 - Migrate the C
bindings for Lucy to _IMP.
Migrate the C bindings for Lucy to _IMP.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/b919ea66
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/b919ea66
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/b919ea66
Branch: refs/heads/method-imp-names-wip2
Commit: b919ea66322e6a7df75365b714cd486a447e8649
Parents: dba4a18
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Fri Aug 9 22:59:27 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Mon Aug 12 15:11:39 2013 -0700
----------------------------------------------------------------------
c/src/Lucy/Analysis/RegexTokenizer.c | 17 ++++++++---------
c/src/Lucy/Document/Doc.c | 23 +++++++++++------------
c/src/Lucy/Index/DocReader.c | 2 +-
c/src/Lucy/Index/Inverter.c | 2 +-
4 files changed, 21 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/b919ea66/c/src/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Analysis/RegexTokenizer.c b/c/src/Lucy/Analysis/RegexTokenizer.c
index 4b2bfe6..a38e46a 100644
--- a/c/src/Lucy/Analysis/RegexTokenizer.c
+++ b/c/src/Lucy/Analysis/RegexTokenizer.c
@@ -83,14 +83,14 @@ RegexTokenizer_init(RegexTokenizer *self, const CharBuf *pattern) {
}
void
-RegexTokenizer_set_token_re(RegexTokenizer *self, void *token_re) {
+RegexTokenizer_Set_Token_RE(RegexTokenizer *self, void *token_re) {
UNUSED_VAR(self);
UNUSED_VAR(token_re);
THROW(ERR, "TODO");
}
void
-RegexTokenizer_destroy(RegexTokenizer *self) {
+RegexTokenizer_Destroy_IMP(RegexTokenizer *self) {
RegexTokenizerIVARS *const ivars = RegexTokenizer_IVARS(self);
DECREF(ivars->pattern);
pcre *re = (pcre*)ivars->token_re;
@@ -101,9 +101,8 @@ RegexTokenizer_destroy(RegexTokenizer *self) {
}
void
-RegexTokenizer_tokenize_str(RegexTokenizer *self,
- const char *string, size_t string_len,
- Inversion *inversion) {
+RegexTokenizer_Tokenize_Str_IMP(RegexTokenizer *self, const char *string,
+ size_t string_len, Inversion *inversion) {
RegexTokenizerIVARS *const ivars = RegexTokenizer_IVARS(self);
pcre *re = (pcre*)ivars->token_re;
int byte_offset = 0;
@@ -173,7 +172,7 @@ RegexTokenizer_init(RegexTokenizer *self, const CharBuf *pattern) {
}
void
-RegexTokenizer_set_token_re(RegexTokenizer *self, void *token_re) {
+RegexTokenizer_Set_Token_RE_IMP(RegexTokenizer *self, void *token_re) {
UNUSED_VAR(self);
UNUSED_VAR(token_re);
THROW(ERR,
@@ -182,7 +181,7 @@ RegexTokenizer_set_token_re(RegexTokenizer *self, void *token_re) {
}
void
-RegexTokenizer_destroy(RegexTokenizer *self) {
+RegexTokenizer_Destroy_IMP(RegexTokenizer *self) {
UNUSED_VAR(self);
THROW(ERR,
"RegexTokenizer is not available because Lucy was compiled"
@@ -190,8 +189,8 @@ RegexTokenizer_destroy(RegexTokenizer *self) {
}
void
-RegexTokenizer_tokenize_str(RegexTokenizer *self, const char *string,
- size_t string_len, Inversion *inversion) {
+RegexTokenizer_Tokenize_Str_IMP(RegexTokenizer *self, const char *string,
+ size_t string_len, Inversion *inversion) {
UNUSED_VAR(self);
UNUSED_VAR(string);
UNUSED_VAR(string_len);
http://git-wip-us.apache.org/repos/asf/lucy/blob/b919ea66/c/src/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Document/Doc.c b/c/src/Lucy/Document/Doc.c
index d8d603b..e3deedb 100644
--- a/c/src/Lucy/Document/Doc.c
+++ b/c/src/Lucy/Document/Doc.c
@@ -49,27 +49,27 @@ Doc_init(Doc *self, void *fields, int32_t doc_id) {
}
void
-Doc_set_fields(Doc *self, void *fields) {
+Doc_Set_Fields_IMP(Doc *self, void *fields) {
DocIVARS *const ivars = Doc_IVARS(self);
DECREF(ivars->fields);
ivars->fields = CERTIFY(fields, HASH);
}
uint32_t
-Doc_get_size(Doc *self) {
+Doc_Get_Size_IMP(Doc *self) {
Hash *hash = (Hash*)Doc_IVARS(self)->fields;
return Hash_Get_Size(hash);
}
void
-Doc_store(Doc *self, const CharBuf *field, Obj *value) {
+Doc_Store_IMP(Doc *self, const CharBuf *field, Obj *value) {
Hash *hash = (Hash*)Doc_IVARS(self)->fields;
Hash_Store(hash, (Obj *)field, value);
INCREF(value);
}
void
-Doc_serialize(Doc *self, OutStream *outstream) {
+Doc_Serialize_IMP(Doc *self, OutStream *outstream) {
DocIVARS *const ivars = Doc_IVARS(self);
Hash *hash = (Hash*)ivars->fields;
Freezer_serialize_hash(hash, outstream);
@@ -77,7 +77,7 @@ Doc_serialize(Doc *self, OutStream *outstream) {
}
Doc*
-Doc_deserialize(Doc *self, InStream *instream) {
+Doc_Deserialize_IMP(Doc *self, InStream *instream) {
DocIVARS *const ivars = Doc_IVARS(self);
ivars->fields = Freezer_read_hash(instream);
ivars->doc_id = InStream_Read_C32(instream);
@@ -85,8 +85,7 @@ Doc_deserialize(Doc *self, InStream *instream) {
}
Obj*
-Doc_extract(Doc *self, CharBuf *field,
- ViewCharBuf *target) {
+Doc_Extract_IMP(Doc *self, CharBuf *field, ViewCharBuf *target) {
Hash *hash = (Hash*)Doc_IVARS(self)->fields;
Obj *obj = Hash_Fetch(hash, (Obj *)field);
@@ -98,21 +97,21 @@ Doc_extract(Doc *self, CharBuf *field,
}
void*
-Doc_to_host(Doc *self) {
+Doc_To_Host_IMP(Doc *self) {
UNUSED_VAR(self);
THROW(ERR, "TODO");
UNREACHABLE_RETURN(void*);
}
Hash*
-Doc_dump(Doc *self) {
+Doc_Dump_IMP(Doc *self) {
UNUSED_VAR(self);
THROW(ERR, "TODO");
UNREACHABLE_RETURN(Hash*);
}
Doc*
-Doc_load(Doc *self, Obj *dump) {
+Doc_Load_IMP(Doc *self, Obj *dump) {
UNUSED_VAR(self);
UNUSED_VAR(dump);
THROW(ERR, "TODO");
@@ -120,7 +119,7 @@ Doc_load(Doc *self, Obj *dump) {
}
bool
-Doc_equals(Doc *self, Obj *other) {
+Doc_Equals_IMP(Doc *self, Obj *other) {
if ((Doc*)other == self) { return true; }
if (!Obj_Is_A(other, DOC)) { return false; }
DocIVARS *const ivars = Doc_IVARS(self);
@@ -129,7 +128,7 @@ Doc_equals(Doc *self, Obj *other) {
}
void
-Doc_destroy(Doc *self) {
+Doc_Destroy_IMP(Doc *self) {
DocIVARS *const ivars = Doc_IVARS(self);
DECREF(ivars->fields);
SUPER_DESTROY(self, DOC);
http://git-wip-us.apache.org/repos/asf/lucy/blob/b919ea66/c/src/Lucy/Index/DocReader.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Index/DocReader.c b/c/src/Lucy/Index/DocReader.c
index ee56bd1..4c4eb28 100644
--- a/c/src/Lucy/Index/DocReader.c
+++ b/c/src/Lucy/Index/DocReader.c
@@ -33,7 +33,7 @@
#include "Lucy/Store/InStream.h"
HitDoc*
-DefDocReader_fetch_doc(DefaultDocReader *self, int32_t doc_id) {
+DefDocReader_Fetch_Doc_IMP(DefaultDocReader *self, int32_t doc_id) {
DefaultDocReaderIVARS *const ivars = DefDocReader_IVARS(self);
Schema *const schema = ivars->schema;
InStream *const dat_in = ivars->dat_in;
http://git-wip-us.apache.org/repos/asf/lucy/blob/b919ea66/c/src/Lucy/Index/Inverter.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Index/Inverter.c b/c/src/Lucy/Index/Inverter.c
index 22c78a1..ab920c4 100644
--- a/c/src/Lucy/Index/Inverter.c
+++ b/c/src/Lucy/Index/Inverter.c
@@ -60,7 +60,7 @@ S_fetch_entry(InverterIVARS *ivars, CharBuf *field) {
}
void
-Inverter_invert_doc(Inverter *self, Doc *doc) {
+Inverter_Invert_Doc_IMP(Inverter *self, Doc *doc) {
InverterIVARS *const ivars = Inverter_IVARS(self);
Hash *const fields = (Hash*)Doc_Get_Fields(doc);
uint32_t num_keys = Hash_Iterate(fields);