Repository: lucy Updated Branches: refs/heads/master 45eac391a -> fd858d715
Remove to_clownfish hack Clownfish converts arrayrefs and hashrefs correctly now. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/fd858d71 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/fd858d71 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/fd858d71 Branch: refs/heads/master Commit: fd858d715de52c12e4a3bb4b0681294b892c5c0f Parents: 3f3318e Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Thu Aug 20 18:09:17 2015 +0200 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Thu Aug 20 19:16:44 2015 +0200 ---------------------------------------------------------------------- perl/buildlib/Lucy/Build/Binding/Analysis.pm | 4 --- perl/buildlib/Lucy/Build/Binding/Document.pm | 4 --- perl/buildlib/Lucy/Build/Binding/Index.pm | 8 ----- perl/buildlib/Lucy/Build/Binding/Misc.pm | 26 -------------- perl/buildlib/Lucy/Build/Binding/Plan.pm | 8 ----- perl/buildlib/Lucy/Build/Binding/Search.pm | 4 --- perl/lib/Lucy.pm | 44 ++--------------------- perl/lib/LucyX/Index/ZlibDocWriter.pm | 2 +- 8 files changed, 4 insertions(+), 96 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/buildlib/Lucy/Build/Binding/Analysis.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Analysis.pm b/perl/buildlib/Lucy/Build/Binding/Analysis.pm index 11dc3b2..60a73b2 100644 --- a/perl/buildlib/Lucy/Build/Binding/Analysis.pm +++ b/perl/buildlib/Lucy/Build/Binding/Analysis.pm @@ -47,10 +47,6 @@ sub bind_analyzer { parcel => "Lucy", class_name => "Lucy::Analysis::Analyzer", ); - $binding->bind_method( - alias => '_load', - method => 'Load', - ); $binding->set_pod_spec($pod_spec); Clownfish::CFC::Binding::Perl::Class->register($binding); http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/buildlib/Lucy/Build/Binding/Document.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Document.pm b/perl/buildlib/Lucy/Build/Binding/Document.pm index b495f71..2316034 100644 --- a/perl/buildlib/Lucy/Build/Binding/Document.pm +++ b/perl/buildlib/Lucy/Build/Binding/Document.pm @@ -109,10 +109,6 @@ END_XS_CODE class_name => "Lucy::Document::Doc", ); $binding->append_xs($xs_code); - $binding->bind_method( - alias => '_load', - method => 'Load', - ); $binding->exclude_method($_) for @hand_rolled; $binding->exclude_constructor; $binding->set_pod_spec($pod_spec); http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/buildlib/Lucy/Build/Binding/Index.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Index.pm b/perl/buildlib/Lucy/Build/Binding/Index.pm index 7e0e535..d587479 100644 --- a/perl/buildlib/Lucy/Build/Binding/Index.pm +++ b/perl/buildlib/Lucy/Build/Binding/Index.pm @@ -820,10 +820,6 @@ END_SYNOPSIS parcel => "Lucy", class_name => "Lucy::Index::Segment", ); - $binding->bind_method( - alias => '_store_metadata', - method => 'Store_Metadata', - ); $binding->set_pod_spec($pod_spec); Clownfish::CFC::Binding::Perl::Class->register($binding); @@ -867,10 +863,6 @@ END_XS_CODE parcel => "Lucy", class_name => "Lucy::Index::Similarity", ); - $binding->bind_method( - alias => '_load', - method => 'Load', - ); $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/blob/fd858d71/perl/buildlib/Lucy/Build/Binding/Misc.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Misc.pm b/perl/buildlib/Lucy/Build/Binding/Misc.pm index 76e20ac..d0f0fb1 100644 --- a/perl/buildlib/Lucy/Build/Binding/Misc.pm +++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm @@ -41,32 +41,6 @@ CODE: OUTPUT: RETVAL -SV* -to_clownfish(sv) - SV *sv; -CODE: -{ - cfish_Obj *obj = XSBind_perl_to_cfish_nullable(aTHX_ sv, CFISH_OBJ); - RETVAL = CFISH_OBJ_TO_SV_NOINC(obj); -} -OUTPUT: RETVAL - -SV* -to_perl(sv) - SV *sv; -CODE: -{ - if (sv_isobject(sv) && sv_derived_from(sv, "Clownfish::Obj")) { - IV tmp = SvIV(SvRV(sv)); - cfish_Obj* obj = INT2PTR(cfish_Obj*, tmp); - RETVAL = XSBind_cfish_to_perl(aTHX_ obj); - } - else { - RETVAL = newSVsv(sv); - } -} -OUTPUT: RETVAL - void STORABLE_freeze(self, ...) cfish_Obj *self; http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/buildlib/Lucy/Build/Binding/Plan.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Plan.pm b/perl/buildlib/Lucy/Build/Binding/Plan.pm index 461bfbf..817b75e 100644 --- a/perl/buildlib/Lucy/Build/Binding/Plan.pm +++ b/perl/buildlib/Lucy/Build/Binding/Plan.pm @@ -151,10 +151,6 @@ END_SYNOPSIS class_name => "Lucy::Plan::FieldType", ); $binding->bind_constructor( alias => 'new', initializer => 'init2' ); - $binding->bind_method( - alias => '_load', - method => 'Load', - ); $binding->set_pod_spec($pod_spec); $binding->add_class_alias("KinoSearch::Plan::FieldType"); $binding->add_class_alias("KinoSearch::FieldType"); @@ -282,10 +278,6 @@ END_CONSTRUCTOR parcel => "Lucy", class_name => "Lucy::Plan::Schema", ); - $binding->bind_method( - alias => '_load', - method => 'Load', - ); $binding->set_pod_spec($pod_spec); $binding->add_class_alias("KinoSearch::Plan::Schema"); $binding->add_class_alias("KinoSearch::Schema"); http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/buildlib/Lucy/Build/Binding/Search.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Build/Binding/Search.pm b/perl/buildlib/Lucy/Build/Binding/Search.pm index 1abd9e9..4293f1a 100644 --- a/perl/buildlib/Lucy/Build/Binding/Search.pm +++ b/perl/buildlib/Lucy/Build/Binding/Search.pm @@ -632,10 +632,6 @@ END_CONSTRUCTOR_CODE_SAMPLE parcel => "Lucy", class_name => "Lucy::Search::Query", ); - $binding->bind_method( - alias => '_load', - method => 'Load', - ); $binding->set_pod_spec($pod_spec); Clownfish::CFC::Binding::Perl::Class->register($binding); http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/lib/Lucy.pm ---------------------------------------------------------------------- diff --git a/perl/lib/Lucy.pm b/perl/lib/Lucy.pm index fb89abb..dd03ecc 100644 --- a/perl/lib/Lucy.pm +++ b/perl/lib/Lucy.pm @@ -29,14 +29,9 @@ BEGIN { our @EXPORT_OK = qw( STORABLE_freeze STORABLE_thaw - load ); } -sub load { - return $_[0]->_load( to_clownfish( $_[1] ) ); -} - # On most UNIX variants, this flag makes DynaLoader pass RTLD_GLOBAL to # dl_open, so extensions can resolve the needed symbols without explicitly # linking against the DSO. @@ -69,13 +64,6 @@ BEGIN { } { - package Lucy::Analysis::Analyzer; - our $VERSION = '0.004000'; - $VERSION = eval $VERSION; - use Lucy qw( load ); -} - -{ package Lucy::Analysis::RegexTokenizer; our $VERSION = '0.004000'; $VERSION = eval $VERSION; @@ -95,7 +83,7 @@ BEGIN { our $VERSION = '0.004000'; $VERSION = eval $VERSION; use Storable (); # Needed by serialize/deserialize. - use Lucy qw( STORABLE_freeze STORABLE_thaw load ); + use Lucy qw( STORABLE_freeze STORABLE_thaw ); use overload fallback => 1, @@ -149,22 +137,10 @@ BEGIN { } { - package Lucy::Index::Segment; - our $VERSION = '0.004000'; - $VERSION = eval $VERSION; - use Clownfish qw( to_clownfish ); - sub store_metadata { - my ( $self, %args ) = @_; - $self->_store_metadata( %args, - metadata => to_clownfish( $args{metadata} ) ); - } -} - -{ package Lucy::Index::Similarity; our $VERSION = '0.004000'; $VERSION = eval $VERSION; - use Lucy qw( STORABLE_freeze STORABLE_thaw load ); + use Lucy qw( STORABLE_freeze STORABLE_thaw ); } { @@ -194,20 +170,6 @@ BEGIN { } { - package Lucy::Plan::FieldType; - our $VERSION = '0.004000'; - $VERSION = eval $VERSION; - use Lucy qw( load ); -} - -{ - package Lucy::Plan::Schema; - our $VERSION = '0.004000'; - $VERSION = eval $VERSION; - use Lucy qw( load ); -} - -{ package Lucy::Search::MatchDoc; our $VERSION = '0.004000'; $VERSION = eval $VERSION; @@ -218,7 +180,7 @@ BEGIN { package Lucy::Search::Query; our $VERSION = '0.004000'; $VERSION = eval $VERSION; - use Lucy qw( STORABLE_freeze STORABLE_thaw load ); + use Lucy qw( STORABLE_freeze STORABLE_thaw ); } { http://git-wip-us.apache.org/repos/asf/lucy/blob/fd858d71/perl/lib/LucyX/Index/ZlibDocWriter.pm ---------------------------------------------------------------------- diff --git a/perl/lib/LucyX/Index/ZlibDocWriter.pm b/perl/lib/LucyX/Index/ZlibDocWriter.pm index 34dba6f..f6a7c11 100644 --- a/perl/lib/LucyX/Index/ZlibDocWriter.pm +++ b/perl/lib/LucyX/Index/ZlibDocWriter.pm @@ -21,7 +21,7 @@ use Carp; use Scalar::Util qw( blessed ); use Compress::Zlib qw( compress ); use Clownfish::Util::StringHelper qw( cat_bytes ); -use Clownfish qw( to_perl ); +use Clownfish; use bytes; no bytes;