Repository: lucy-clownfish Updated Branches: refs/heads/master 679a68781 -> 6391cd8e3
Add inherited methods to C API docs The previous logic was wrong, resulting in missing documentation for inherited methods. (As discussed on lucy-dev, we want inherited methods to be documented for C.) Fixes CLOWNFISH-93. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/3e5cbc92 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/3e5cbc92 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/3e5cbc92 Branch: refs/heads/master Commit: 3e5cbc9224c38b7090c490836bf0b693acdfa9d6 Parents: 679a687 Author: Nick Wellnhofer <[email protected]> Authored: Sat Apr 23 18:28:06 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sat Apr 23 18:40:39 2016 +0200 ---------------------------------------------------------------------- compiler/src/CFCCHtml.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3e5cbc92/compiler/src/CFCCHtml.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCCHtml.c b/compiler/src/CFCCHtml.c index 222f5fd..4516e31 100644 --- a/compiler/src/CFCCHtml.c +++ b/compiler/src/CFCCHtml.c @@ -747,7 +747,7 @@ S_html_create_methods(CFCClass *klass) { */ static char* S_html_create_fresh_methods(CFCClass *klass, CFCClass *ancestor) { - CFCMethod **fresh_methods = CFCClass_fresh_methods(klass); + CFCMethod **fresh_methods = CFCClass_fresh_methods(ancestor); const char *prefix = CFCClass_get_prefix(klass); char *result = CFCUtil_strdup(""); @@ -757,7 +757,9 @@ S_html_create_fresh_methods(CFCClass *klass, CFCClass *ancestor) { continue; } - if (!CFCMethod_is_fresh(method, ancestor)) { + const char *name = CFCMethod_get_name(method); + CFCMethod *other = CFCClass_method(klass, name); + if (!CFCMethod_is_fresh(other, ancestor)) { // The method is implementated in a subclass and already // documented. continue; @@ -767,7 +769,6 @@ S_html_create_fresh_methods(CFCClass *klass, CFCClass *ancestor) { result = CFCUtil_cat(result, "<dl>\n", NULL); } - const char *name = CFCMethod_get_name(method); result = CFCUtil_cat(result, "<dt id=\"func_", name, "\">", name, NULL); if (CFCMethod_abstract(method)) {
