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 2015/05/07 00:18:42 UTC

[2/5] lucy git commit: Delete Go glue which is now autogenerated.

Delete Go glue which is now autogenerated.

Remove handwritten Go glue code which is now replaced entirely by
autogenerated code.


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

Branch: refs/heads/master
Commit: 66583b24fc823dcb7a479b9d0063b7dd5c4fb8e2
Parents: bab3e45
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sat May 2 07:20:51 2015 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun May 3 11:15:47 2015 -0700

----------------------------------------------------------------------
 go/lucy/analysis.go | 22 ----------------------
 go/lucy/index.go    | 14 --------------
 go/lucy/plan.go     | 32 --------------------------------
 go/lucy/search.go   | 40 ----------------------------------------
 4 files changed, 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/66583b24/go/lucy/analysis.go
----------------------------------------------------------------------
diff --git a/go/lucy/analysis.go b/go/lucy/analysis.go
index 6fbd522..28cb52d 100644
--- a/go/lucy/analysis.go
+++ b/go/lucy/analysis.go
@@ -25,30 +25,8 @@ import "unsafe"
 
 import "git-wip-us.apache.org/repos/asf/lucy-clownfish.git/runtime/go/clownfish"
 
-type Analyzer interface {
-	clownfish.Obj
-}
-
-type AnalyzerIMP struct {
-	clownfish.ObjIMP
-}
-
-type EasyAnalyzer interface {
-	Analyzer
-}
-
-type EasyAnalyzerIMP struct {
-	AnalyzerIMP
-}
-
 func NewEasyAnalyzer(language string) EasyAnalyzer {
 	lang := clownfish.NewString(language)
 	cfObj := C.lucy_EasyAnalyzer_new((*C.cfish_String)(unsafe.Pointer(lang.TOPTR())))
 	return WRAPEasyAnalyzer(unsafe.Pointer(cfObj))
 }
-
-func WRAPEasyAnalyzer(ptr unsafe.Pointer) EasyAnalyzer {
-	obj := &EasyAnalyzerIMP{}
-	obj.INITOBJ(ptr);
-	return obj
-}

http://git-wip-us.apache.org/repos/asf/lucy/blob/66583b24/go/lucy/index.go
----------------------------------------------------------------------
diff --git a/go/lucy/index.go b/go/lucy/index.go
index 9ccce23..c6fd275 100644
--- a/go/lucy/index.go
+++ b/go/lucy/index.go
@@ -45,14 +45,6 @@ type IndexerIMP struct {
 	fieldNames map[string]clownfish.String
 }
 
-type IndexManager interface {
-	clownfish.Obj
-}
-
-type IndexManagerIMP struct {
-	clownfish.ObjIMP
-}
-
 type OpenIndexerArgs struct {
 	Schema   Schema
 	Index    interface{}
@@ -92,12 +84,6 @@ func OpenIndexer(args *OpenIndexerArgs) (obj Indexer, err error) {
 	return obj, err
 }
 
-func WRAPIndexer(ptr unsafe.Pointer) Indexer {
-	obj := &IndexerIMP{}
-	obj.INITOBJ(ptr);
-	return obj
-}
-
 func (obj *IndexerIMP) Close() error {
 	// TODO: implement Close in core Lucy rather than bindings.
 	return nil // TODO catch errors

http://git-wip-us.apache.org/repos/asf/lucy/blob/66583b24/go/lucy/plan.go
----------------------------------------------------------------------
diff --git a/go/lucy/plan.go b/go/lucy/plan.go
index aa644b1..a4aad5c 100644
--- a/go/lucy/plan.go
+++ b/go/lucy/plan.go
@@ -30,37 +30,11 @@ type Schema interface {
 	SpecField(field string, fieldType FieldType)
 }
 
-type SchemaIMP struct {
-	clownfish.ObjIMP
-}
-
-type FieldType interface {
-	clownfish.Obj
-}
-
-type FieldTypeIMP struct {
-	clownfish.ObjIMP
-}
-
-type FullTextType interface {
-	FieldType
-}
-
-type FullTextTypeIMP struct {
-	FieldTypeIMP
-}
-
 func NewSchema() Schema {
 	cfObj := C.lucy_Schema_new()
 	return WRAPSchema(unsafe.Pointer(cfObj))
 }
 
-func WRAPSchema(ptr unsafe.Pointer) Schema {
-	obj := &SchemaIMP{}
-	obj.INITOBJ(ptr);
-	return obj
-}
-
 func (obj *SchemaIMP) SpecField(field string, fieldType FieldType) {
 	self := ((*C.lucy_Schema)(unsafe.Pointer(obj.TOPTR())))
 	fieldCF := clownfish.NewString(field)
@@ -74,9 +48,3 @@ func NewFullTextType(analyzer Analyzer) FullTextType {
 		(*C.lucy_Analyzer)(unsafe.Pointer(analyzer.TOPTR())))
 	return WRAPFullTextType(unsafe.Pointer(cfObj))
 }
-
-func WRAPFullTextType(ptr unsafe.Pointer) FullTextType {
-	obj := &FullTextTypeIMP{}
-	obj.INITOBJ(ptr);
-	return obj
-}

http://git-wip-us.apache.org/repos/asf/lucy/blob/66583b24/go/lucy/search.go
----------------------------------------------------------------------
diff --git a/go/lucy/search.go b/go/lucy/search.go
index fc2a841..dd99b80 100644
--- a/go/lucy/search.go
+++ b/go/lucy/search.go
@@ -34,24 +34,12 @@ import "unsafe"
 
 import "git-wip-us.apache.org/repos/asf/lucy-clownfish.git/runtime/go/clownfish"
 
-type Query interface {
-	clownfish.Obj
-}
-
-type QueryIMP struct {
-	clownfish.ObjIMP
-}
-
 type Searcher interface {
 	clownfish.Obj
 	Hits(query interface{}, offset uint32, numWanted uint32, sortSpec SortSpec) (Hits, error)
 	Close() error
 }
 
-type SearcherIMP struct {
-	clownfish.ObjIMP
-}
-
 type Hits interface {
 	clownfish.Obj
 	Next(hit interface{}) bool
@@ -63,22 +51,6 @@ type HitsIMP struct {
 	err error
 }
 
-type SortSpec interface {
-	clownfish.Obj
-}
-
-type SortSpecIMP struct {
-	clownfish.ObjIMP
-}
-
-type IndexSearcher interface {
-	Searcher
-}
-
-type IndexSearcherIMP struct {
-	SearcherIMP
-}
-
 func OpenIndexSearcher(index interface{}) (obj IndexSearcher, err error) {
 	var indexC *C.cfish_Obj
 	switch index.(type) {
@@ -95,12 +67,6 @@ func OpenIndexSearcher(index interface{}) (obj IndexSearcher, err error) {
 	return obj, err
 }
 
-func WRAPIndexSearcher(ptr unsafe.Pointer) IndexSearcher {
-	obj := &IndexSearcherIMP{}
-	obj.INITOBJ(ptr);
-	return obj
-}
-
 func (obj *IndexSearcherIMP) Close() error {
 	self := ((*C.lucy_IndexSearcher)(unsafe.Pointer(obj.TOPTR())))
 	return clownfish.TrapErr(func() {
@@ -130,12 +96,6 @@ func (obj *IndexSearcherIMP) Hits(query interface{}, offset uint32, numWanted ui
 	return hits, err
 }
 
-func WRAPHits(ptr unsafe.Pointer) Hits {
-	obj := &HitsIMP{}
-	obj.INITOBJ(ptr);
-	return obj
-}
-
 func (obj *HitsIMP) Next(hit interface{}) bool {
 	self := ((*C.lucy_Hits)(unsafe.Pointer(obj.TOPTR())))
 	// TODO: accept a HitDoc object and populate score.