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/08/05 23:45:37 UTC
[4/4] lucy-clownfish git commit: Merge branch
'CLOWNFISH-57-obj-to-empty-interface'
Merge branch 'CLOWNFISH-57-obj-to-empty-interface'
Autogenerated bindings for Clownfish subroutines which accept or return
clownfish Obj should be mapped to Go's "empty interface" type,
`interface{}`.
This sacrifices some type safety, but it is the only way to achieve
certain desirable effects. For example, it should be possible for
Vector's Push() method to take a Go string, instead of requiring the
user to perform a manual conversion to a Clownfish object. Similarly,
Vector's Pop() should be able to return a Go string.
Functions which need to return an actual clownfish Obj wrapped in a Go
struct will need to have hand-coded bindings, but there are fewer of
those so converting Obj by default is the better choice.
This closes #29.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8655f188
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8655f188
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8655f188
Branch: refs/heads/master
Commit: 8655f18818cdd0f003c8cbb3e75229e7edf38573
Parents: a3992dd 8c26a1d
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Wed Aug 5 14:33:19 2015 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Wed Aug 5 14:43:19 2015 -0700
----------------------------------------------------------------------
compiler/perl/lib/Clownfish/CFC.pm | 26 +++++++++----------
compiler/perl/lib/Clownfish/CFC.xs | 4 +--
compiler/perl/t/100-type.t | 12 ++++-----
compiler/perl/t/105-object_type.t | 4 +--
compiler/src/CFCGoFunc.c | 45 ++++++++++++++++++++++++---------
compiler/src/CFCGoTypeMap.c | 5 +++-
compiler/src/CFCTestType.c | 6 ++---
compiler/src/CFCType.c | 5 ----
compiler/src/CFCType.h | 5 ----
9 files changed, 63 insertions(+), 49 deletions(-)
----------------------------------------------------------------------