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 <[email protected]> Authored: Sat Apr 23 18:34:45 2016 +0200 Committer: Nick Wellnhofer <[email protected]> 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
