Repository: lucy-clownfish Updated Branches: refs/heads/master da15a255d -> 42b766804
Rename hand-rolled clone method to clone_raw Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/42b76680 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/42b76680 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/42b76680 Branch: refs/heads/master Commit: 42b7668045653ae65c7a7aa66af22a34f4d9def5 Parents: 5c1b375 Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Tue Dec 1 14:50:34 2015 +0100 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Tue Dec 1 16:06:03 2015 +0100 ---------------------------------------------------------------------- runtime/perl/buildlib/Clownfish/Build/Binding.pm | 8 +------- runtime/perl/t/binding/016-vector.t | 2 +- runtime/perl/t/binding/021-blob.t | 2 +- runtime/perl/t/binding/022-bytebuf.t | 2 +- runtime/perl/t/binding/023-string.t | 2 +- runtime/perl/t/binding/031-num.t | 6 +++--- 6 files changed, 8 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/42b76680/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 6424b41..8c3619d 100644 --- a/runtime/perl/buildlib/Clownfish/Build/Binding.pm +++ b/runtime/perl/buildlib/Clownfish/Build/Binding.pm @@ -764,16 +764,11 @@ END_POD pod => $to_perl_pod, ); $pod_spec->add_method( - method => 'Clone', - alias => 'clone', - ); - $pod_spec->add_method( method => 'Destroy', alias => 'DESTROY', pod => $destroy_pod, ); - my @hand_rolled = qw( Clone ); my $xs_code = <<'END_XS_CODE'; MODULE = Clownfish PACKAGE = Clownfish::Obj @@ -805,7 +800,7 @@ CODE: OUTPUT: RETVAL SV* -clone(self) +clone_raw(self) cfish_Obj *self; CODE: RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_Obj_Clone(self)); @@ -827,7 +822,6 @@ END_XS_CODE alias => 'DESTROY', method => 'Destroy', ); - $binding->exclude_method($_) for @hand_rolled; $binding->append_xs($xs_code); $binding->set_pod_spec($pod_spec); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/42b76680/runtime/perl/t/binding/016-vector.t ---------------------------------------------------------------------- diff --git a/runtime/perl/t/binding/016-vector.t b/runtime/perl/t/binding/016-vector.t index e6f4c70..ff2e547 100644 --- a/runtime/perl/t/binding/016-vector.t +++ b/runtime/perl/t/binding/016-vector.t @@ -29,6 +29,6 @@ $vector->insert( tick => 0, element => 'elem', ); -$twin = $vector->clone; +$twin = $vector->clone_raw; is_deeply( $twin->to_perl, $vector->to_perl, "clone" ); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/42b76680/runtime/perl/t/binding/021-blob.t ---------------------------------------------------------------------- diff --git a/runtime/perl/t/binding/021-blob.t b/runtime/perl/t/binding/021-blob.t index bcdcc18..a82f167 100644 --- a/runtime/perl/t/binding/021-blob.t +++ b/runtime/perl/t/binding/021-blob.t @@ -31,7 +31,7 @@ ok( $blob->equals($blob), 'equals true'); ok( !$blob->equals($other), 'equals false'); ok( $blob->compare_to($other) < 0, 'compare_to'); -$blob = $other->clone; +$blob = $other->clone_raw; isa_ok( $blob, 'Clownfish::Blob', 'clone' ); ok( $blob->equals($other), 'equals after clone' ); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/42b76680/runtime/perl/t/binding/022-bytebuf.t ---------------------------------------------------------------------- diff --git a/runtime/perl/t/binding/022-bytebuf.t b/runtime/perl/t/binding/022-bytebuf.t index d7e4d96..09edae8 100644 --- a/runtime/perl/t/binding/022-bytebuf.t +++ b/runtime/perl/t/binding/022-bytebuf.t @@ -39,7 +39,7 @@ ok( $buf->compare_to($other) < 0, 'compare_to'); $buf->mimic($other); ok( $buf->equals($other), 'mimic' ); -$buf = $other->clone; +$buf = $other->clone_raw; isa_ok( $buf, 'Clownfish::ByteBuf', 'clone' ); ok( $buf->equals($other), 'equals after clone' ); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/42b76680/runtime/perl/t/binding/023-string.t ---------------------------------------------------------------------- diff --git a/runtime/perl/t/binding/023-string.t b/runtime/perl/t/binding/023-string.t index 6ae2535..4f839c5 100644 --- a/runtime/perl/t/binding/023-string.t +++ b/runtime/perl/t/binding/023-string.t @@ -38,7 +38,7 @@ isa_ok( $string, "Clownfish::String" ); is( $string->to_perl, $smiley, "round trip UTF-8" ); $string = Clownfish::String->new($smiley); -my $clone = $string->clone; +my $clone = $string->clone_raw; is( $clone->to_perl, Clownfish::String->new($smiley)->to_perl, "clone" ); my $wanted = "abc\x00de"; http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/42b76680/runtime/perl/t/binding/031-num.t ---------------------------------------------------------------------- diff --git a/runtime/perl/t/binding/031-num.t b/runtime/perl/t/binding/031-num.t index 9112612..8cc42d1 100644 --- a/runtime/perl/t/binding/031-num.t +++ b/runtime/perl/t/binding/031-num.t @@ -33,7 +33,7 @@ ok ( $float->equals($float), 'Float equals true' ); ok ( !$float->equals($neg_float), 'Float equals false' ); ok ( $float->compare_to($neg_float) > 0, 'Float compare_to' ); -my $float_clone = $float->clone; +my $float_clone = $float->clone_raw; isa_ok( $float_clone, 'Clownfish::Float', 'Float clone' ); ok ( $float->equals($float_clone), 'Float clone is equal' ); @@ -48,7 +48,7 @@ ok ( $int->equals($int), 'Integer equals true' ); ok ( !$int->equals($neg_int), 'Integer equals false' ); ok ( $int->compare_to($neg_int) > 0, 'Integer compare_to' ); -my $int_clone = $int->clone; +my $int_clone = $int->clone_raw; isa_ok( $int_clone, 'Clownfish::Integer', 'Integer clone' ); ok ( $int->equals($int_clone), 'Integer clone is equal' ); @@ -62,7 +62,7 @@ is ( $bool->to_string, 'true', 'Boolean to_string' ); ok ( $bool->equals($true_singleton), 'Boolean equals true' ); ok ( !$bool->equals($false_singleton), 'Boolean equals false' ); -my $bool_clone = $bool->clone; +my $bool_clone = $bool->clone_raw; isa_ok( $bool_clone, 'Clownfish::Boolean', 'Boolean clone' ); ok ( $bool->equals($bool_clone), 'Boolean clone is equal' );