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 2013/07/20 22:38:00 UTC

[lucy-commits] [4/6] git commit: refs/heads/cfc-pod - Documentation for CFCPerl

Documentation for CFCPerl


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

Branch: refs/heads/cfc-pod
Commit: 4d89fd69a76f938fddccf402ed96b9ec1f4caa94
Parents: e50bc68
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 20 20:18:03 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Jul 20 20:18:03 2013 +0200

----------------------------------------------------------------------
 .../buildlib/Clownfish/CFC/Build/Binding.pm     | 25 ++++++++++++++++++++
 clownfish/compiler/src/CFCPerl.h                |  3 +--
 2 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/4d89fd69/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
index a17a5c4..1623ade 100644
--- a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
+++ b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
@@ -18,10 +18,35 @@ use strict;
 
 sub bind_all {
     my $class = shift;
+    $class->bind_perl;
     $class->bind_perlclass;
     $class->bind_perlpod;
 }
 
+sub bind_perl {
+    class_from_c('CFCPerl', 'Clownfish::CFC::Binding::Perl');
+
+    my @exposed = qw(
+        Write_Pod
+        Write_Boot
+        Write_Bindings
+        Write_Callbacks
+        Write_Hostdefs
+        Write_Xs_Typemap
+    );
+
+    my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
+    $pod_spec->add_constructor( alias => 'new' );
+    $pod_spec->add_method( method => $_, alias => lc($_) ) for @exposed;
+
+    my $binding = Clownfish::CFC::Binding::Perl::Class->new(
+        class_name => 'Clownfish::CFC::Binding::Perl',
+    );
+    $binding->set_pod_spec($pod_spec);
+
+    Clownfish::CFC::Binding::Perl::Class->register($binding);
+}
+
 sub bind_perlclass {
     class_from_c('CFCPerlClass', 'Clownfish::CFC::Binding::Perl::Class');
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/4d89fd69/clownfish/compiler/src/CFCPerl.h
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerl.h b/clownfish/compiler/src/CFCPerl.h
index eef10ac..6427996 100644
--- a/clownfish/compiler/src/CFCPerl.h
+++ b/clownfish/compiler/src/CFCPerl.h
@@ -25,8 +25,7 @@ typedef struct CFCPerl CFCPerl;
 struct CFCParcel;
 struct CFCHierarchy;
 
-/** Clownfish::CFC::Binding::Perl - Perl bindings for a
- * Clownfish::CFC::Model::Hierarchy.
+/** Perl bindings for a Clownfish::CFC::Model::Hierarchy.
  * 
  * Clownfish::CFC::Binding::Perl presents an interface for auto-generating XS
  * and Perl code to bind C code for a Clownfish class hierarchy to Perl.