Go binding for Blob_Get_Buf.

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

Branch: refs/heads/master
Commit: d34ae6fdbbbbe205f72ed63515cec94354e2e7eb
Parents: 0f60ed4
Author: Marvin Humphrey <[email protected]>
Authored: Wed Aug 5 18:28:37 2015 -0700
Committer: Marvin Humphrey <[email protected]>
Committed: Thu Aug 6 19:51:32 2015 -0700

----------------------------------------------------------------------
 runtime/go/build.go               | 4 ++++
 runtime/go/clownfish/clownfish.go | 5 +++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d34ae6fd/runtime/go/build.go
----------------------------------------------------------------------
diff --git a/runtime/go/build.go b/runtime/go/build.go
index 29f02ba..d7bb7a0 100644
--- a/runtime/go/build.go
+++ b/runtime/go/build.go
@@ -150,6 +150,10 @@ func specMethods(parcel *cfc.Parcel) {
        stringBinding.SpecMethod("Swap_Chars", "SwapChars(rune, rune) string")
        stringBinding.Register()
 
+       blobBinding := cfc.NewGoClass(parcel, "Clownfish::Blob")
+       blobBinding.SpecMethod("", "GetBuf() uintptr")
+       blobBinding.Register()
+
        vecBinding := cfc.NewGoClass(parcel, "Clownfish::Vector")
        vecBinding.SetSuppressCtor(true)
        vecBinding.Register()

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d34ae6fd/runtime/go/clownfish/clownfish.go
----------------------------------------------------------------------
diff --git a/runtime/go/clownfish/clownfish.go 
b/runtime/go/clownfish/clownfish.go
index 3087cc0..65cde55 100644
--- a/runtime/go/clownfish/clownfish.go
+++ b/runtime/go/clownfish/clownfish.go
@@ -647,3 +647,8 @@ func NewBlob(content []byte) Blob {
        obj := C.cfish_Blob_new(buf, size)
        return WRAPBlob(unsafe.Pointer(obj))
 }
+
+func (b *BlobIMP) GetBuf() uintptr {
+       self := (*C.cfish_Blob)(unsafe.Pointer(b.TOPTR()))
+       return uintptr(unsafe.Pointer(C.CFISH_Blob_Get_Buf(self)))
+}

Reply via email to