You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/07/08 16:53:20 UTC

[1/2] git commit: Autogenerate call to Perl bootstrap function

Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 2433806e8 -> f4e7f6c09


Autogenerate call to Perl bootstrap function


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

Branch: refs/heads/master
Commit: 7f78db45f5deaec077add980603b40331de0a127
Parents: 2433806
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Jul 8 14:25:25 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Jul 8 14:25:25 2014 +0200

----------------------------------------------------------------------
 compiler/src/CFCPerl.c                           | 7 +++++--
 runtime/perl/buildlib/Clownfish/Build/Binding.pm | 3 ---
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7f78db45/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerl.c b/compiler/src/CFCPerl.c
index df5d7d4..ef4a875 100644
--- a/compiler/src/CFCPerl.c
+++ b/compiler/src/CFCPerl.c
@@ -365,6 +365,9 @@ S_xs_file_contents(CFCPerl *self, const char *generated_xs,
         "\n"
         "MODULE = %s   PACKAGE = %s\n"
         "\n"
+        "BOOT:\n"
+        "    %s();\n"
+        "\n"
         "void\n"
         "_init_autobindings()\n"
         "PPCODE:\n"
@@ -379,8 +382,8 @@ S_xs_file_contents(CFCPerl *self, const char *generated_xs,
         "%s";
     char *contents
         = CFCUtil_sprintf(pattern, self->header, generated_xs,
-                          self->boot_class, self->boot_class, xs_init,
-                          hand_rolled_xs, self->footer);
+                          self->boot_class, self->boot_class, self->boot_func,
+                          xs_init, hand_rolled_xs, self->footer);
 
     return contents;
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7f78db45/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/buildlib/Clownfish/Build/Binding.pm b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index 3fc9bf1..01f87f8 100644
--- a/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -39,9 +39,6 @@ sub bind_clownfish {
     my $xs_code = <<'END_XS_CODE';
 MODULE = Clownfish    PACKAGE = Clownfish
 
-BOOT:
-    cfish_Clownfish_bootstrap();
-
 IV
 _dummy_function()
 CODE:


[2/2] git commit: Roll _init_autobindings into XS boot section

Posted by nw...@apache.org.
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 <we...@aevum.de>
Authored: Tue Jul 8 16:45:11 2014 +0200
Committer: Nick Wellnhofer <we...@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 {