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 2015/09/19 17:03:20 UTC
lucy-clownfish git commit: Add POD for first implementation of
abstract methods
Repository: lucy-clownfish
Updated Branches:
refs/heads/master 957772687 -> cd536bbf4
Add POD for first implementation of abstract methods
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/cd536bbf
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/cd536bbf
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/cd536bbf
Branch: refs/heads/master
Commit: cd536bbf4bed5d53d62aaed393ba8c2269f7662c
Parents: 9577726
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Sep 19 17:02:35 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Sep 19 17:02:56 2015 +0200
----------------------------------------------------------------------
compiler/src/CFCPerlPod.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd536bbf/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c
index 822ee69..16d0957 100644
--- a/compiler/src/CFCPerlPod.c
+++ b/compiler/src/CFCPerlPod.c
@@ -204,7 +204,9 @@ CFCPerlPod_methods_pod(CFCPerlPod *self, CFCClass *klass) {
CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
CFCMethod *method = fresh_methods[meth_num];
- if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
+ const char *name = CFCMethod_get_name(method);
+
+ if (!CFCMethod_public(method)) {
continue;
}
if (CFCMethod_excluded_from_host(method)) {
@@ -213,8 +215,13 @@ CFCPerlPod_methods_pod(CFCPerlPod *self, CFCClass *klass) {
if (!CFCMethod_can_be_bound(method)) {
continue;
}
-
- const char *name = CFCMethod_get_name(method);
+ if (!CFCMethod_novel(method)) {
+ // Add POD for first implementation of abstract methods.
+ if (CFCMethod_abstract(method)) { continue; }
+ CFCClass *parent = CFCClass_get_parent(klass);
+ CFCMethod *parent_method = CFCClass_method(parent, name);
+ if (!CFCMethod_abstract(parent_method)) { continue; }
+ }
// Skip methods that were added manually.
int found = false;