Rename container XSUBs

Vector and Hash now have

- `fetch` which may convert a Clownfish like String to Perl.
- `fetch_obj` which always returns a Clownfish object.


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

Branch: refs/heads/master
Commit: be98b65ccec1cd29d7407b890abfa2b2f4e191d8
Parents: e23a708
Author: Nick Wellnhofer <wellnho...@aevum.de>
Authored: Tue Nov 17 15:31:27 2015 +0100
Committer: Nick Wellnhofer <wellnho...@aevum.de>
Committed: Tue Nov 17 19:08:43 2015 +0100

----------------------------------------------------------------------
 runtime/perl/buildlib/Clownfish/Build/Binding.pm | 11 ++++-------
 runtime/perl/t/021-class.t                       |  2 +-
 2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/be98b65c/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/buildlib/Clownfish/Build/Binding.pm 
b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index 6af8863..aa9bcd2 100644
--- a/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -258,7 +258,7 @@ sub bind_hash {
     my $xs_code = <<'END_XS_CODE';
 MODULE = Clownfish    PACKAGE = Clownfish::Hash
 SV*
-_fetch(self, key)
+fetch_obj(self, key)
     cfish_Hash *self;
     cfish_String *key;
 CODE:
@@ -484,24 +484,21 @@ END_XS_CODE
 
 sub bind_vector {
     my @hand_rolled = qw(
-        Pop
-        Delete
         Store
-        Fetch
     );
 
     my $xs_code = <<'END_XS_CODE';
 MODULE = Clownfish   PACKAGE = Clownfish::Vector
 
 SV*
-pop(self)
+pop_obj(self)
     cfish_Vector *self;
 CODE:
     RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_Vec_Pop(self));
 OUTPUT: RETVAL
 
 SV*
-delete(self, tick)
+delete_obj(self, tick)
     cfish_Vector *self;
     uint32_t    tick;
 CODE:
@@ -520,7 +517,7 @@ PPCODE:
 }
 
 SV*
-fetch(self, tick)
+fetch_obj(self, tick)
     cfish_Vector *self;
     uint32_t     tick;
 CODE:

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/be98b65c/runtime/perl/t/021-class.t
----------------------------------------------------------------------
diff --git a/runtime/perl/t/021-class.t b/runtime/perl/t/021-class.t
index 2a87d5d..21872ff 100644
--- a/runtime/perl/t/021-class.t
+++ b/runtime/perl/t/021-class.t
@@ -40,7 +40,7 @@ my $storage = Clownfish::Hash->new;
     $storage->store( "test", $subclassed_obj );
 }
 
-my $resurrected = $storage->_fetch("test");
+my $resurrected = $storage->fetch("test");
 
 isa_ok( $resurrected, "MyObj", "subclass name survived Perl destruction" );
 is( $resurrected->to_string, $stringified,

Reply via email to