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/02/17 01:15:35 UTC
[lucy-commits] svn commit: r1245260 - 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/Search/
perl/buildlib/Lucy/Build/Binding/Test/
Author: marvin
Date: Fri Feb 17 00:15:34 2012
New Revision: 1245260
URL: http://svn.apache.org/viewvc?rev=1245260&view=rev
Log:
Automatically bind constructors when possible.
When a Clownfish-based class provides an init() function, assume that we
should try to bind it to a Perl-space new() constructor. The user must now
blacklist constructors they *don't* want rather than whitelist each
constructor binding they want.
Modified:
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/Highlight.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/Plan.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.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.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs?rev=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs Fri Feb 17 00:15:34 2012
@@ -1923,6 +1923,12 @@ PPCODE:
CFCPerlClass_exclude_method(self, method);
void
+exclude_constructor(self)
+ CFCPerlClass *self;
+PPCODE:
+ CFCPerlClass_exclude_constructor(self);
+
+void
append_xs(self, xs)
CFCPerlClass *self;
const char *xs;
Modified: incubator/lucy/trunk/clownfish/src/CFCPerlClass.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlClass.c?rev=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlClass.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlClass.c Fri Feb 17 00:15:34 2012
@@ -51,6 +51,7 @@ struct CFCPerlClass {
char **cons_aliases;
char **cons_inits;
size_t num_cons;
+ int exclude_cons;
};
static CFCPerlClass **registry = NULL;
@@ -88,6 +89,7 @@ CFCPerlClass_init(CFCPerlClass *self, CF
self->cons_aliases = NULL;
self->cons_inits = NULL;
self->num_cons = 0;
+ self->exclude_cons = 0;
return self;
}
@@ -213,10 +215,14 @@ CFCPerlClass_bind_constructor(CFCPerlCla
}
}
+void
+CFCPerlClass_exclude_constructor(CFCPerlClass *self) {
+ self->exclude_cons = 1;
+}
+
static int
-S_method_can_be_bound(CFCMethod *method) {
+S_can_be_bound(CFCParamList *param_list, CFCType *return_type) {
int success = 1;
- CFCParamList *param_list = CFCMethod_get_param_list(method);
CFCVariable **arg_vars = CFCParamList_get_variables(param_list);
for (size_t i = 0; arg_vars[i] != NULL; i++) {
@@ -225,8 +231,6 @@ S_method_can_be_bound(CFCMethod *method)
if (conversion) { FREEMEM(conversion); }
else { success = 0; }
}
-
- CFCType *return_type = CFCMethod_get_return_type(method);
if (!CFCType_is_void(return_type)) {
char *conversion = CFCPerlTypeMap_to_perl(return_type, "foo");
if (conversion) { FREEMEM(conversion); }
@@ -269,7 +273,9 @@ CFCPerlClass_method_bindings(CFCPerlClas
if (is_excluded) { continue; }
// Skip methods with types which cannot be mapped automatically.
- if (!S_method_can_be_bound(method)) {
+ CFCParamList *param_list = CFCMethod_get_param_list(method);
+ CFCType *return_type = CFCMethod_get_return_type(method);
+ if (!S_can_be_bound(param_list, return_type)) {
continue;
}
@@ -311,19 +317,60 @@ CFCPerlClass_method_bindings(CFCPerlClas
return bound;
}
+static const char NEW[] = "new";
+
CFCPerlConstructor**
CFCPerlClass_constructor_bindings(CFCPerlClass *self) {
- CFCClass *client = self->client;
- size_t num_bound = 0;
+ CFCClass *client = self->client;
+ CFCFunction **functions = CFCClass_functions(self->client);
+ size_t num_bound = 0;
CFCPerlConstructor **bound
= (CFCPerlConstructor**)CALLOCATE(1, sizeof(CFCPerlConstructor*));
- // Iterate over the list of constructors to be bound.
- for (size_t i = 0; i < self->num_cons; i++) {
+ // Iterate over the list of possible initialization functions.
+ for (size_t i = 0; functions[i] != NULL; i++) {
+ CFCFunction *function = functions[i];
+ const char *micro_sym = CFCFunction_micro_sym(function);
+ CFCParamList *param_list = CFCFunction_get_param_list(function);
+ CFCType *return_type = CFCFunction_get_return_type(function);
+ const char *alias = NULL;
+
+ // Find user-specified alias.
+ for (size_t j = 0; j < self->num_cons; j++) {
+ if (strcmp(micro_sym, self->cons_inits[j]) == 0) {
+ alias = self->cons_aliases[j];
+ if (!S_can_be_bound(param_list, return_type)) {
+ CFCUtil_die("Can't bind %s as %s -- types can't be mapped",
+ micro_sym, alias);
+ }
+ break;
+ }
+ }
+
+ // Automatically bind init() to new() when possible.
+ if (!alias
+ && !self->exclude_cons
+ && strcmp(micro_sym, "init") == 0
+ && S_can_be_bound(param_list, return_type)
+ ) {
+ int saw_new = 0;
+ for (size_t j = 0; j < self->num_cons; j++) {
+ if (strcmp(self->cons_aliases[j], "new") == 0) {
+ saw_new = 1;
+ }
+ }
+ if (!saw_new) {
+ alias = NEW;
+ }
+ }
+
+ if (!alias) {
+ continue;
+ }
+
// Create the binding, add it to the array.
CFCPerlConstructor *cons_binding
- = CFCPerlConstructor_new(client, self->cons_aliases[i],
- self->cons_inits[i]);
+ = CFCPerlConstructor_new(client, alias, micro_sym);
size_t size = (num_bound + 2) * sizeof(CFCPerlConstructor*);
bound = (CFCPerlConstructor**)REALLOCATE(bound, size);
bound[num_bound] = cons_binding;
Modified: incubator/lucy/trunk/clownfish/src/CFCPerlClass.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlClass.h?rev=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlClass.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlClass.h Fri Feb 17 00:15:34 2012
@@ -59,9 +59,16 @@ void
CFCPerlClass_bind_constructor(CFCPerlClass *self, const char *alias,
const char *initializer);
+/** Don't generate a binding for the specified method automatically.
+ */
void
CFCPerlClass_exclude_method(CFCPerlClass *self, const char *method);
+/** Don't generate a constructor named "new" from "init" automatically.
+ */
+void
+CFCPerlClass_exclude_constructor(CFCPerlClass *self);
+
struct CFCPerlMethod**
CFCPerlClass_method_bindings(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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm Fri Feb 17 00:15:34 2012
@@ -39,7 +39,6 @@ sub bind_analyzer {
parcel => "Lucy",
class_name => "Lucy::Analysis::Analyzer",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -64,7 +63,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::CaseFolder",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -95,7 +93,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::EasyAnalyzer",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -166,7 +163,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::Normalizer",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -202,7 +198,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::PolyAnalyzer",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -265,7 +260,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::SnowballStemmer",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -298,7 +292,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::SnowballStopFilter",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -323,7 +316,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Analysis::StandardTokenizer",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -397,6 +389,7 @@ END_XS
);
$binding->append_xs($xs);
$binding->exclude_method($_) for @hand_rolled;
+ $binding->exclude_constructor;
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm Fri Feb 17 00:15:34 2012
@@ -105,6 +105,7 @@ END_XS_CODE
);
$binding->append_xs($xs_code);
$binding->exclude_method($_) for @hand_rolled;
+ $binding->exclude_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -169,6 +170,7 @@ END_XS_CODE
);
$binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
+ $binding->exclude_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm?rev=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm Fri Feb 17 00:15:34 2012
@@ -36,7 +36,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Highlight::HeatMap",
);
- $binding->bind_constructor;
#$binding->set_pod_spec($pod_spec); TODO
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -87,7 +86,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Highlight::Highlighter",
);
- $binding->bind_constructor;
$binding->bind_method(
alias => '_find_best_fragment',
method => 'Find_Best_Fragment'
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm Fri Feb 17 00:15:34 2012
@@ -87,7 +87,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Index::BackgroundMerger",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -125,7 +124,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Index::DataReader",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -166,7 +164,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Index::DataWriter",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -177,8 +174,6 @@ sub bind_deletionsreader {
parcel => "Lucy",
class_name => "Lucy::Index::DeletionsReader",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -187,7 +182,6 @@ sub bind_defaultdeletionsreader {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultDeletionsReader",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -225,7 +219,6 @@ sub bind_defaultdeletionswriter {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultDeletionsWriter",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -244,7 +237,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::DocReader",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -255,7 +247,6 @@ sub bind_defaultdocreader {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultDocReader",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -264,7 +255,6 @@ sub bind_docvector {
parcel => "Lucy",
class_name => "Lucy::Index::DocVector",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -273,7 +263,6 @@ sub bind_docwriter {
parcel => "Lucy",
class_name => "Lucy::Index::DocWriter",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -282,7 +271,6 @@ sub bind_filepurger {
parcel => "Lucy",
class_name => "Lucy::Index::FilePurger",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -291,7 +279,6 @@ sub bind_highlightreader {
parcel => "Lucy",
class_name => "Lucy::Index::HighlightReader",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -300,7 +287,6 @@ sub bind_defaulthighlightreader {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultHighlightReader",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -309,7 +295,6 @@ sub bind_highlightwriter {
parcel => "Lucy",
class_name => "Lucy::Index::HighlightWriter",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -360,7 +345,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Index::IndexManager",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -438,6 +422,7 @@ END_XS_CODE
alias => 'open',
initializer => 'do_open',
);
+ $binding->exclude_constructor;
$binding->bind_method( alias => '_offsets', method => 'Offsets' );
$binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
@@ -636,8 +621,6 @@ sub bind_inverter {
parcel => "Lucy",
class_name => "Lucy::Index::Inverter",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -664,7 +647,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::Lexicon",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -685,7 +667,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::LexiconReader",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -696,7 +677,6 @@ sub bind_defaultlexiconreader {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultLexiconReader",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -705,7 +685,6 @@ sub bind_lexiconwriter {
parcel => "Lucy",
class_name => "Lucy::Index::LexiconWriter",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -714,7 +693,6 @@ sub bind_polylexicon {
parcel => "Lucy",
class_name => "Lucy::Index::PolyLexicon",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -749,7 +727,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Index::PolyReader",
);
- $binding->bind_constructor;
$binding->bind_constructor( alias => 'open', initializer => 'do_open' );
$binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
@@ -794,7 +771,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::PostingList",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -819,7 +795,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::PostingListReader",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -830,7 +805,6 @@ sub bind_defaultpostinglistreader {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultPostingListReader",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -850,7 +824,6 @@ END_XS
class_name => "Lucy::Index::PostingListWriter",
);
$binding->append_xs($xs_code);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -860,8 +833,6 @@ sub bind_seglexicon {
parcel => "Lucy",
class_name => "Lucy::Index::SegLexicon",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -870,8 +841,6 @@ sub bind_segpostinglist {
parcel => "Lucy",
class_name => "Lucy::Index::SegPostingList",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -905,7 +874,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::SegReader",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -926,7 +894,6 @@ sub bind_segwriter {
parcel => "Lucy",
class_name => "Lucy::Index::SegWriter",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -984,7 +951,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Index::Segment",
);
- $binding->bind_constructor;
$binding->bind_method(
alias => '_store_metadata',
method => 'Store_Metadata',
@@ -1032,7 +998,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Index::Similarity",
);
- $binding->bind_constructor;
$binding->exclude_method($_) for @hand_rolled;
$binding->append_xs($xs_code);
$binding->set_pod_spec($pod_spec);
@@ -1070,7 +1035,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Index::Snapshot",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1121,8 +1085,6 @@ sub bind_sortreader {
parcel => "Lucy",
class_name => "Lucy::Index::SortReader",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -1131,8 +1093,6 @@ sub bind_defaultsortreader {
parcel => "Lucy",
class_name => "Lucy::Index::DefaultSortReader",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -1151,7 +1111,6 @@ END_XS
parcel => "Lucy",
class_name => "Lucy::Index::SortWriter",
);
- $binding->bind_constructor;
$binding->append_xs($xs_code);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -1162,8 +1121,6 @@ sub bind_terminfo {
parcel => "Lucy",
class_name => "Lucy::Index::TermInfo",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -1172,8 +1129,6 @@ sub bind_termvector {
parcel => "Lucy",
class_name => "Lucy::Index::TermVector",
);
- $binding->bind_constructor;
-
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=1245260&r1=1245259&r2=1245260&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 Fri Feb 17 00:15:34 2012
@@ -28,8 +28,6 @@ sub bind_matchposting {
parcel => "Lucy",
class_name => "Lucy::Index::Posting::MatchPosting",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -38,8 +36,6 @@ sub bind_richposting {
parcel => "Lucy",
class_name => "Lucy::Index::Posting::RichPosting",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -72,7 +68,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Index::Posting::ScorePosting",
);
- $binding->bind_constructor;
$binding->append_xs($xs_code);
$binding->exclude_method($_) for @hand_rolled;
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm Fri Feb 17 00:15:34 2012
@@ -343,7 +343,6 @@ sub bind_testschema {
parcel => "Lucy",
class_name => "Lucy::Test::TestSchema",
);
- $binding->bind_constructor;
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm Fri Feb 17 00:15:34 2012
@@ -73,7 +73,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Object::BitVector",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -113,6 +112,7 @@ END_XS_CODE
class_name => "Lucy::Object::ByteBuf",
);
$binding->append_xs($xs_code);
+ $binding->exclude_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -182,6 +182,7 @@ END_XS_CODE
class_name => "Lucy::Object::CharBuf",
);
$binding->append_xs($xs_code);
+ $binding->exclude_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -280,7 +281,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Object::Hash",
);
- $binding->bind_constructor;
$binding->exclude_method($_) for @hand_rolled;
$binding->append_xs($xs_code);
@@ -446,6 +446,7 @@ END_XS_CODE
class_name => "Lucy::Object::I32Array",
);
$binding->append_xs($xs_code);
+ $binding->exclude_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -455,8 +456,6 @@ sub bind_lockfreeregistry {
parcel => "Lucy",
class_name => "Lucy::Object::LockFreeRegistry",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -482,6 +481,7 @@ END_XS_CODE
class_name => "Lucy::Object::Float32",
);
$binding->append_xs($float32_xs_code);
+ $binding->exclude_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -508,6 +508,7 @@ END_XS_CODE
class_name => "Lucy::Object::Float64",
);
$binding->append_xs($float64_xs_code);
+ $binding->exclude_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -703,7 +704,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Object::Obj",
);
- $binding->bind_constructor;
$binding->bind_method( alias => '_load', method => 'Load' );
$binding->exclude_method($_) for @hand_rolled;
$binding->append_xs($xs_code);
@@ -794,7 +794,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Object::VArray",
);
- $binding->bind_constructor;
$binding->exclude_method($_) for @hand_rolled;
$binding->append_xs($xs_code);
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm?rev=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm Fri Feb 17 00:15:34 2012
@@ -89,7 +89,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Plan::Architecture",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -116,7 +115,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Plan::BlobType",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -270,7 +268,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Plan::Schema",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm Fri Feb 17 00:15:34 2012
@@ -59,7 +59,6 @@ sub bind_andmatcher {
parcel => "Lucy",
class_name => "Lucy::Search::ANDMatcher",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -87,7 +86,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::ANDQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -98,7 +96,6 @@ sub bind_bitvecmatcher {
parcel => "Lucy",
class_name => "Lucy::Search::BitVecMatcher",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -125,7 +122,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::Collector",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -136,7 +132,6 @@ sub bind_offsetcollector {
parcel => "Lucy",
class_name => "Lucy::Search::Collector::OffsetCollector",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -190,7 +185,6 @@ sub bind_hitqueue {
parcel => "Lucy",
class_name => "Lucy::Search::HitQueue",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -215,7 +209,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Search::Hits",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -256,7 +249,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::IndexSearcher",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -297,7 +289,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::LeafQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -314,7 +305,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::MatchAllQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -325,8 +315,6 @@ sub bind_matchdoc {
parcel => "Lucy",
class_name => "Lucy::Search::MatchDoc",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -353,7 +341,6 @@ END_CONSTRUCTOR_CODE_SAMPLE
parcel => "Lucy",
class_name => "Lucy::Search::Matcher",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -364,7 +351,6 @@ sub bind_notmatcher {
parcel => "Lucy",
class_name => "Lucy::Search::NOTMatcher",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -398,7 +384,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::NOTQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -415,7 +400,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::NoMatchQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -445,7 +429,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::ORQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -456,7 +439,6 @@ sub bind_orscorer {
parcel => "Lucy",
class_name => "Lucy::Search::ORScorer",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -479,7 +461,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Search::PhraseQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -516,7 +497,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Search::PolyQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -557,7 +537,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::PolySearcher",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -597,7 +576,6 @@ END_CONSTRUCTOR_CODE_SAMPLE
parcel => "Lucy",
class_name => "Lucy::Search::Query",
);
- $binding->bind_constructor;
$binding->bind_method(
alias => '_make_compiler',
method => 'Make_Compiler',
@@ -648,7 +626,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::QueryParser",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -689,7 +666,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::RangeQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -700,7 +676,6 @@ sub bind_requiredoptionalmatcher {
parcel => "Lucy",
class_name => "Lucy::Search::RequiredOptionalMatcher",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -735,7 +710,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::RequiredOptionalQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -770,7 +744,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::Searcher",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -858,7 +831,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::SortSpec",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -899,7 +871,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::Span",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -930,7 +901,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::TermQuery",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -950,8 +920,6 @@ sub bind_topdocs {
parcel => "Lucy",
class_name => "Lucy::Search::TopDocs",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm?rev=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm Fri Feb 17 00:15:34 2012
@@ -51,7 +51,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Search::Collector::BitCollector",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -62,8 +61,6 @@ sub bind_sortcollector {
parcel => "Lucy",
class_name => "Lucy::Search::Collector::SortCollector",
);
- $binding->bind_constructor;
-
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm Fri Feb 17 00:15:34 2012
@@ -58,7 +58,6 @@ END_SYNOPSIS
parcel => "Lucy",
class_name => "Lucy::Store::FSFolder",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -136,7 +135,6 @@ sub bind_folder {
parcel => "Lucy",
class_name => "Lucy::Store::Folder",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -251,7 +249,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Store::Lock",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -262,7 +259,6 @@ sub bind_lockfilelock {
parcel => "Lucy",
class_name => "Lucy::Store::LockFileLock",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -271,7 +267,6 @@ sub bind_sharedlock {
parcel => "Lucy",
class_name => "Lucy::Store::SharedLock",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -340,7 +335,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Store::LockFactory",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -391,8 +385,6 @@ sub bind_ramfile {
parcel => "Lucy",
class_name => "Lucy::Store::RAMFile",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -428,7 +420,6 @@ END_CONSTRUCTOR
parcel => "Lucy",
class_name => "Lucy::Store::RAMFolder",
);
- $binding->bind_constructor;
$binding->set_pod_spec($pod_spec);
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=1245260&r1=1245259&r2=1245260&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 Fri Feb 17 00:15:34 2012
@@ -75,7 +75,6 @@ END_XS_CODE
parcel => "Lucy",
class_name => "Lucy::Test::Util::BBSortEx",
);
- $binding->bind_constructor;
$binding->exclude_method($_) for @hand_rolled;
$binding->append_xs($xs_code);
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=1245260&r1=1245259&r2=1245260&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm Fri Feb 17 00:15:34 2012
@@ -144,7 +144,6 @@ sub bind_memorypool {
parcel => "Lucy",
class_name => "Lucy::Util::MemoryPool",
);
- $binding->bind_constructor;
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
@@ -153,8 +152,6 @@ sub bind_priorityqueue {
parcel => "Lucy",
class_name => "Lucy::Util::PriorityQueue",
);
- $binding->bind_constructor;
-
Clownfish::CFC::Binding::Perl::Class->register($binding);
}