lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [2/2] git commit: Roll _init_autobindings into XS boot section
Date Tue, 08 Jul 2014 14:53:21 GMT
Roll _init_autobindings into XS boot section


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f4e7f6c0
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f4e7f6c0
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f4e7f6c0

Branch: refs/heads/master
Commit: f4e7f6c098321d0574e46d4f2be07f01d8012d44
Parents: 7f78db4
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Tue Jul 8 16:45:11 2014 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Tue Jul 8 16:45:11 2014 +0200

----------------------------------------------------------------------
 compiler/src/CFCPerl.c        | 16 ++++------------
 runtime/perl/lib/Clownfish.pm |  1 -
 2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f4e7f6c0/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerl.c b/compiler/src/CFCPerl.c
index ef4a875..14534fe 100644
--- a/compiler/src/CFCPerl.c
+++ b/compiler/src/CFCPerl.c
@@ -366,15 +366,10 @@ S_xs_file_contents(CFCPerl *self, const char *generated_xs,
         "MODULE = %s   PACKAGE = %s\n"
         "\n"
         "BOOT:\n"
-        "    %s();\n"
-        "\n"
-        "void\n"
-        "_init_autobindings()\n"
-        "PPCODE:\n"
         "{\n"
         "    const char* file = __FILE__;\n"
-        "    CFISH_UNUSED_VAR(cv);\n"
-        "    CFISH_UNUSED_VAR(items); %s\n"
+        "    %s();\n"
+        "%s"
         "}\n"
         "\n"
         "%s\n"
@@ -392,11 +387,8 @@ static char*
 S_add_xs_init(char *xs_init, CFCPerlSub *xsub) {
     const char *c_name = CFCPerlSub_c_name(xsub);
     const char *perl_name = CFCPerlSub_perl_name(xsub);
-    if (strlen(xs_init)) {
-        xs_init = CFCUtil_cat(xs_init, "\n    ", NULL);
-    }
-    xs_init = CFCUtil_cat(xs_init, "newXS(\"", perl_name, "\", ", c_name,
-                          ", file);", NULL);
+    xs_init = CFCUtil_cat(xs_init, "    newXS(\"", perl_name, "\", ", c_name,
+                          ", file);\n", NULL);
     return xs_init;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f4e7f6c0/runtime/perl/lib/Clownfish.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/lib/Clownfish.pm b/runtime/perl/lib/Clownfish.pm
index 5b02103..e1baa6e 100644
--- a/runtime/perl/lib/Clownfish.pm
+++ b/runtime/perl/lib/Clownfish.pm
@@ -42,7 +42,6 @@ BEGIN {
     our @ISA = qw( DynaLoader );
     # This loads a large number of disparate subs.
     bootstrap Clownfish '0.3.0';
-    _init_autobindings();
 }
 
 sub kdump {


Mime
View raw message