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 2012/01/26 04:23:37 UTC
[lucy-commits] svn commit: r1236033 - in /incubator/lucy/trunk:
clownfish/perl/lib/Clownfish/ clownfish/src/
perl/buildlib/Lucy/Build/Binding/ perl/buildlib/Lucy/Build/Binding/Index/
perl/buildlib/Lucy/Build/Binding/Test/
Author: marvin
Date: Thu Jan 26 03:23:37 2012
New Revision: 1236033
URL: http://svn.apache.org/viewvc?rev=1236033&view=rev
Log:
Finish simplifiying CFCPerlClass constructor.
Break xs_code out of CFCPerlClass_new(), adding it with new routine
CFCPerlClass_append_xs(). Remove "client" as an argument, deriving it instead
from "parcel" and "class_name".
Modified:
incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm
incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs
incubator/lucy/trunk/clownfish/src/CFCPerlClass.c
incubator/lucy/trunk/clownfish/src/CFCPerlClass.h
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm
Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm Thu Jan 26 03:23:37 2012
@@ -637,25 +637,13 @@ BEGIN { XSLoader::load( 'Clownfish::CFC'
our %new_PARAMS = (
parcel => undef,
class_name => undef,
- xs_code => undef,
);
sub new {
my ( $either, %args ) = @_;
verify_args( \%new_PARAMS, %args ) or confess $@;
$args{parcel} = Clownfish::CFC::Parcel->acquire( $args{parcel} );
-
- # Validate.
- confess("Missing required param 'class_name'")
- unless $args{class_name};
-
- # Retrieve Clownfish::CFC::Class client, if available.
- $args{client} ||= Clownfish::CFC::Class->fetch_singleton(
- parcel => $args{parcel},
- class_name => $args{class_name},
- );
-
- return _new( @args{qw( parcel class_name client xs_code )} );
+ return _new( @args{qw( parcel class_name )} );
}
our %bind_method_PARAMS = (
Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs Thu Jan 26 03:23:37 2012
@@ -1857,17 +1857,11 @@ OUTPUT: RETVAL
MODULE = Clownfish PACKAGE = Clownfish::CFC::Binding::Perl::Class
SV*
-_new(parcel, class_name, client, xs_code_sv)
+_new(parcel, class_name)
CFCParcel *parcel;
const char *class_name;
- CFCClass *client;
- SV *xs_code_sv;
CODE:
- const char *xs_code = SvOK(xs_code_sv)
- ? SvPV_nolen(xs_code_sv)
- : NULL;
- CFCPerlClass *self
- = CFCPerlClass_new(parcel, class_name, client, xs_code);
+ CFCPerlClass *self = CFCPerlClass_new(parcel, class_name);
RETVAL = S_cfcbase_to_perlref(self);
CFCBase_decref((CFCBase*)self);
OUTPUT: RETVAL
@@ -1921,6 +1915,13 @@ PPCODE:
const char *init = SvOK(init_sv) ? SvPVutf8_nolen(init_sv) : NULL;
CFCPerlClass_bind_constructor(self, alias, init);
+void
+append_xs(self, xs)
+ CFCPerlClass *self;
+ const char *xs;
+PPCODE:
+ CFCPerlClass_append_xs(self, xs);
+
SV*
method_bindings(self)
CFCPerlClass *self;
Modified: incubator/lucy/trunk/clownfish/src/CFCPerlClass.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlClass.c?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlClass.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlClass.c Thu Jan 26 03:23:37 2012
@@ -59,23 +59,22 @@ const static CFCMeta CFCPERLCLASS_META =
};
CFCPerlClass*
-CFCPerlClass_new(CFCParcel *parcel, const char *class_name, CFCClass *client,
- const char *xs_code) {
+CFCPerlClass_new(CFCParcel *parcel, const char *class_name) {
CFCPerlClass *self = (CFCPerlClass*)CFCBase_allocate(&CFCPERLCLASS_META);
- return CFCPerlClass_init(self, parcel, class_name, client, xs_code);
+ return CFCPerlClass_init(self, parcel, class_name);
}
CFCPerlClass*
CFCPerlClass_init(CFCPerlClass *self, CFCParcel *parcel,
- const char *class_name, CFCClass *client,
- const char *xs_code) {
+ const char *class_name) {
CFCUTIL_NULL_CHECK(parcel);
CFCUTIL_NULL_CHECK(class_name);
self->parcel = (CFCParcel*)CFCBase_incref((CFCBase*)parcel);
- self->client = (CFCClass*)CFCBase_incref((CFCBase*)client);
self->class_name = CFCUtil_strdup(class_name);
- self->pod_spec = NULL;
- self->xs_code = xs_code ? CFCUtil_strdup(xs_code) : NULL;
+ // Client may be NULL, since fetch_singleton() does not always succeed.
+ self->client = CFCClass_fetch_singleton(parcel, class_name);
+ self->pod_spec = NULL;
+ self->xs_code = NULL;
self->meth_aliases = NULL;
self->meth_names = NULL;
self->num_methods = 0;
@@ -406,6 +405,14 @@ CFCPerlClass_get_class_name(CFCPerlClass
return self->class_name;
}
+void
+CFCPerlClass_append_xs(CFCPerlClass *self, const char *xs) {
+ if (!self->xs_code) {
+ self->xs_code = CFCUtil_strdup("");
+ }
+ self->xs_code = CFCUtil_cat(self->xs_code, xs, NULL);
+}
+
const char*
CFCPerlClass_get_xs_code(CFCPerlClass *self) {
return self->xs_code;
Modified: incubator/lucy/trunk/clownfish/src/CFCPerlClass.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlClass.h?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlClass.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlClass.h Thu Jan 26 03:23:37 2012
@@ -30,13 +30,11 @@ struct CFCPerlMethod;
struct CFCPerlConstructor;
CFCPerlClass*
-CFCPerlClass_new(struct CFCParcel *parcel, const char *class_name,
- struct CFCClass *client, const char *xs_code);
+CFCPerlClass_new(struct CFCParcel *parcel, const char *class_name);
CFCPerlClass*
CFCPerlClass_init(CFCPerlClass *self, struct CFCParcel *parcel,
- const char *class_name, struct CFCClass *client,
- const char *xs_code);
+ const char *class_name);
void
CFCPerlClass_destroy(CFCPerlClass *self);
@@ -76,6 +74,11 @@ CFCPerlClass_get_client(CFCPerlClass *se
const char*
CFCPerlClass_get_class_name(CFCPerlClass *self);
+/** Concatenate verbatim XS code.
+ */
+void
+CFCPerlClass_append_xs(CFCPerlClass *self, const char *xs);
+
const char*
CFCPerlClass_get_xs_code(CFCPerlClass *self);
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm Thu Jan 26 03:23:37 2012
@@ -142,9 +142,9 @@ END_XS
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Analysis::Inversion",
- xs_code => $xs,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -410,9 +410,9 @@ END_XS
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Analysis::Token",
- xs_code => $xs,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm Thu Jan 26 03:23:37 2012
@@ -102,9 +102,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Document::Doc",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -167,9 +167,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Document::HitDoc",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm Thu Jan 26 03:23:37 2012
@@ -487,7 +487,6 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::IndexReader",
- xs_code => $xs_code,
);
$binding->bind_constructor(
alias => 'open',
@@ -495,6 +494,7 @@ END_XS_CODE
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
$binding->bind_method( alias => '_offsets', method => 'Offsets' );
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -676,10 +676,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::Indexer",
- xs_code => $xs_code,
);
$binding->bind_constructor( alias => '_new' );
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -822,11 +822,11 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::PolyReader",
- xs_code => $xs_code,
);
$binding->bind_constructor;
$binding->bind_constructor( alias => 'open', initializer => 'do_open' );
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -935,8 +935,8 @@ END_XS
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::PostingListWriter",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
$binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1148,10 +1148,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::Similarity",
- xs_code => $xs_code,
);
$binding->bind_constructor;
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1228,9 +1228,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::SortCache",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -1270,9 +1271,9 @@ END_XS
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::SortWriter",
- xs_code => $xs_code,
);
$binding->bind_constructor;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm Thu Jan 26 03:23:37 2012
@@ -72,9 +72,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Index::Posting::ScorePosting",
- xs_code => $xs_code,
);
$binding->bind_constructor;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm Thu Jan 26 03:23:37 2012
@@ -69,8 +69,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -292,8 +293,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Test",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -310,8 +312,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Test::TestUtils",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -329,8 +332,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Test::Search::TestQueryParserSyntax",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm Thu Jan 26 03:23:37 2012
@@ -119,9 +119,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::ByteBuf",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -189,8 +189,8 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::CharBuf",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -297,10 +297,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::Hash",
- xs_code => $xs_code,
);
$binding->bind_constructor;
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -386,8 +386,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::Host",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -463,9 +464,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::I32Array",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -505,9 +506,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::Float32",
- xs_code => $float32_xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($float32_xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -534,9 +535,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::Float64",
- xs_code => $float64_xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($float64_xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -746,11 +747,11 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::Obj",
- xs_code => $xs_code,
);
$binding->bind_constructor;
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
$binding->bind_method( alias => '_load', method => 'Load' );
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -837,10 +838,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::VArray",
- xs_code => $xs_code,
);
$binding->bind_constructor;
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -896,9 +897,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Object::VTable",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm Thu Jan 26 03:23:37 2012
@@ -893,10 +893,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Search::SortRule",
- xs_code => $xs_code,
);
$binding->bind_constructor( alias => '_new' );
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm Thu Jan 26 03:23:37 2012
@@ -123,10 +123,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Store::FileHandle",
- xs_code => $xs_code,
);
$binding->bind_constructor( alias => '_open', initializer => 'do_open' );
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -239,10 +239,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Store::InStream",
- xs_code => $xs_code,
);
$binding->bind_constructor( alias => 'open', initializer => 'do_open' );
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -440,10 +440,10 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Store::OutStream",
- xs_code => $xs_code,
);
$binding->bind_constructor( alias => 'open', initializer => 'do_open' );
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm Thu Jan 26 03:23:37 2012
@@ -69,9 +69,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Test::Util::BBSortEx",
- xs_code => $xs_code,
);
$binding->bind_constructor;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm?rev=1236033&r1=1236032&r2=1236033&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm Thu Jan 26 03:23:37 2012
@@ -101,8 +101,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Util::Debug",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
+
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -132,8 +133,8 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Util::IndexFileNames",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -192,9 +193,9 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Util::SortExternal",
- xs_code => $xs_code,
);
$binding->bind_method( method => $_, alias => lc($_) ) for @bound;
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -306,8 +307,8 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
class_name => "Lucy::Util::StringHelper",
- xs_code => $xs_code,
);
+ $binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
}