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 2016/04/23 18:53:42 UTC
[1/2] lucy-clownfish git commit: Add inherited methods to C API docs
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 <we...@aevum.de>
Authored: Sat Apr 23 18:28:06 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
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)) {
[2/2] lucy-clownfish git commit: Remove C API documentation for
Destroy method
Posted by nw...@apache.org.
Remove C API documentation for Destroy method
Destroy must never be called directly. If we document this method,
novice users might think it should be called to free resources.
Fixes CLOWNFISH-94.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/6391cd8e
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/6391cd8e
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/6391cd8e
Branch: refs/heads/master
Commit: 6391cd8e3fe7b44ac290edd0c67ce9b37979540e
Parents: 3e5cbc9
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Apr 23 18:34:45 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Apr 23 18:42:29 2016 +0200
----------------------------------------------------------------------
compiler/src/CFCCHtml.c | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6391cd8e/compiler/src/CFCCHtml.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCHtml.c b/compiler/src/CFCCHtml.c
index 4516e31..72e4748 100644
--- a/compiler/src/CFCCHtml.c
+++ b/compiler/src/CFCCHtml.c
@@ -758,6 +758,11 @@ S_html_create_fresh_methods(CFCClass *klass, CFCClass *ancestor) {
}
const char *name = CFCMethod_get_name(method);
+ if (strcmp(name, "Destroy") == 0) {
+ // Destroy must not be called directly.
+ continue;
+ }
+
CFCMethod *other = CFCClass_method(klass, name);
if (!CFCMethod_is_fresh(other, ancestor)) {
// The method is implementated in a subclass and already