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 2011/07/10 06:14:56 UTC
[lucy-commits] svn commit: r1144773 - in /incubator/lucy/trunk/clownfish: lib/Clownfish.xs
lib/Clownfish/Binding/Core.pm src/CFCBindCore.c src/CFCBindCore.h
Author: marvin
Date: Sun Jul 10 04:14:56 2011
New Revision: 1144773
URL: http://svn.apache.org/viewvc?rev=1144773&view=rev
Log:
Remove transitional code.
Now that CFCBindCore has been ported, remove code that was necessary while it
was in transition between Perl and C.
Modified:
incubator/lucy/trunk/clownfish/lib/Clownfish.xs
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core.pm
incubator/lucy/trunk/clownfish/src/CFCBindCore.c
incubator/lucy/trunk/clownfish/src/CFCBindCore.h
Modified: incubator/lucy/trunk/clownfish/lib/Clownfish.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish.xs?rev=1144773&r1=1144772&r2=1144773&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish.xs (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish.xs Sun Jul 10 04:14:56 2011
@@ -1724,40 +1724,6 @@ DESTROY(self);
PPCODE:
CFCBindCore_destroy(self);
-void
-_set_or_get(self, ...)
- CFCBindCore *self;
-ALIAS:
- _get_hierarchy = 2
- _get_dest = 4
- _get_header = 6
- _get_footer = 8
-PPCODE:
-{
- START_SET_OR_GET_SWITCH
- case 2: {
- CFCHierarchy *hierarchy = CFCBindCore_get_hierarchy(self);
- retval = S_cfcbase_to_perlref(hierarchy);
- }
- break;
- case 4: {
- const char *value = CFCBindCore_get_dest(self);
- retval = newSVpvn(value, strlen(value));
- }
- break;
- case 6: {
- const char *value = CFCBindCore_get_header(self);
- retval = newSVpvn(value, strlen(value));
- }
- break;
- case 8: {
- const char *value = CFCBindCore_get_footer(self);
- retval = newSVpvn(value, strlen(value));
- }
- break;
- END_SET_OR_GET_SWITCH
-}
-
int
write_all_modified(self, ...)
CFCBindCore *self;
@@ -1771,17 +1737,6 @@ CODE:
}
OUTPUT: RETVAL
-void
-_write_parcel_h(self)
- CFCBindCore *self;
-PPCODE:
- CFCBindCore_write_parcel_h(self);
-
-void
-_write_parcel_c(self)
- CFCBindCore *self;
-PPCODE:
- CFCBindCore_write_parcel_c(self);
MODULE = Clownfish PACKAGE = Clownfish::Binding::Core::Function
Modified: incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core.pm?rev=1144773&r1=1144772&r2=1144773&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core.pm (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core.pm Sun Jul 10 04:14:56 2011
@@ -23,9 +23,6 @@ use Clownfish::Binding::Core::Method;
use Clownfish::Binding::Core::Class;
use Clownfish::Binding::Core::File;
use Clownfish::Binding::Core::Aliases;
-use File::Spec::Functions qw( catfile );
-use Fcntl;
-use Scalar::Util qw( blessed );
our %new_PARAMS = (
hierarchy => undef,
@@ -34,11 +31,6 @@ our %new_PARAMS = (
footer => undef,
);
-our %hierarchy;
-our %dest;
-our %header;
-our %footer;
-
sub new {
my ( $either, %args ) = @_;
verify_args( \%new_PARAMS, %args ) or confess $@;
Modified: incubator/lucy/trunk/clownfish/src/CFCBindCore.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindCore.c?rev=1144773&r1=1144772&r2=1144773&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindCore.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindCore.c Sun Jul 10 04:14:56 2011
@@ -44,6 +44,17 @@ struct CFCBindCore {
#define PATH_SEP_CHAR '/'
#endif
+/* Write the "parcel.h" header file, which contains common symbols needed by
+ * all classes, plus typedefs for all class structs.
+ */
+static char*
+S_write_parcel_h(CFCBindCore *self);
+
+/* Write the "parcel.c" file containing autogenerated implementation code.
+ */
+static char*
+S_write_parcel_c(CFCBindCore *self);
+
CFCBindCore*
CFCBindCore_new(CFCHierarchy *hierarchy, const char *dest, const char *header,
const char *footer) {
@@ -98,8 +109,8 @@ CFCBindCore_write_all_modified(CFCBindCo
// If any class definition has changed, rewrite the parcel.h and parcel.c
// files.
if (modified) {
- CFCBindCore_write_parcel_h(self);
- CFCBindCore_write_parcel_c(self);
+ S_write_parcel_h(self);
+ S_write_parcel_c(self);
}
return modified;
@@ -108,8 +119,8 @@ CFCBindCore_write_all_modified(CFCBindCo
/* Write the "parcel.h" header file, which contains common symbols needed by
* all classes, plus typedefs for all class structs.
*/
-char*
-CFCBindCore_write_parcel_h(CFCBindCore *self) {
+static char*
+S_write_parcel_h(CFCBindCore *self) {
CFCHierarchy *hierarchy = self->hierarchy;
// Declare object structs for all instantiable classes.
@@ -231,8 +242,8 @@ CFCBindCore_write_parcel_h(CFCBindCore *
FREEMEM(file_content);
}
-char*
-CFCBindCore_write_parcel_c(CFCBindCore *self) {
+static char*
+S_write_parcel_c(CFCBindCore *self) {
CFCHierarchy *hierarchy = self->hierarchy;
// Aggregate C code from all files.
@@ -296,23 +307,3 @@ CFCBindCore_write_parcel_c(CFCBindCore *
FREEMEM(file_content);
}
-CFCHierarchy*
-CFCBindCore_get_hierarchy(CFCBindCore *self) {
- return self->hierarchy;
-}
-
-const char*
-CFCBindCore_get_dest(CFCBindCore *self) {
- return self->dest;
-}
-
-const char*
-CFCBindCore_get_header(CFCBindCore *self) {
- return self->header;
-}
-
-const char*
-CFCBindCore_get_footer(CFCBindCore *self) {
- return self->footer;
-}
-
Modified: incubator/lucy/trunk/clownfish/src/CFCBindCore.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindCore.h?rev=1144773&r1=1144772&r2=1144773&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindCore.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindCore.h Sun Jul 10 04:14:56 2011
@@ -38,24 +38,6 @@ CFCBindCore_destroy(CFCBindCore *self);
int
CFCBindCore_write_all_modified(CFCBindCore *self, int modified);
-char*
-CFCBindCore_write_parcel_h(CFCBindCore *self);
-
-char*
-CFCBindCore_write_parcel_c(CFCBindCore *self);
-
-struct CFCHierarchy*
-CFCBindCore_get_hierarchy(CFCBindCore *self);
-
-const char*
-CFCBindCore_get_dest(CFCBindCore *self);
-
-const char*
-CFCBindCore_get_header(CFCBindCore *self);
-
-const char*
-CFCBindCore_get_footer(CFCBindCore *self);
-
#ifdef __cplusplus
}
#endif