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/30 03:07:52 UTC

[8/8] lucy-clownfish git commit: Merge branch 'CLOWNFISH-51-go-string-conv'

Merge branch 'CLOWNFISH-51-go-string-conv'

Clownfish methods which are bound to Go should accept Go strings as
arguments and return Go strings, rather than requiring the user to
convert string types.

Go's memory model doesn't allow for sharing string data, so we can't use
stack-allocated string wrappers as we have in the Perl bindings and each
conversion will involve allocating a full new copy.  At least the copies
are guaranteed to be cleaned up by the Go garbage collector, though.

This closes #24.


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

Branch: refs/heads/master
Commit: 1ea150153197bc2acb565db9f3950cded7e1c0b8
Parents: f6960c5 4028a4d
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Fri May 29 17:59:26 2015 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Fri May 29 18:06:35 2015 -0700

----------------------------------------------------------------------
 compiler/src/CFCBindClass.c         |   8 +-
 compiler/src/CFCBindCore.c          |   2 +-
 compiler/src/CFCGoFunc.c            |  62 +++++++++
 compiler/src/CFCGoFunc.h            |  13 ++
 compiler/src/CFCGoMethod.c          |  56 +++------
 compiler/src/CFCGoTypeMap.c         |  32 ++++-
 compiler/src/CFCParcel.c            |   5 +
 compiler/src/CFCParcel.h            |   5 +
 compiler/src/CFCType.c              |   4 +-
 runtime/go/build.go                 |   6 +
 runtime/go/clownfish/clownfish.go   |  19 +++
 runtime/go/clownfish/string_test.go | 209 +++++++++++++++++++++++++++++++
 12 files changed, 375 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1ea15015/compiler/src/CFCBindClass.c
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1ea15015/runtime/go/clownfish/clownfish.go
----------------------------------------------------------------------