Repository: lucy-clownfish Updated Branches: refs/heads/overridden_exclusions fc8f8c8ce -> d6c876d13
Create callbacks for excluded methods for now Ultimately, we need a mechanism to disable the autogeneration of XSUBs and callbacks separately. For now, it seems safer to keep callbacks for excluded 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/d6c876d1 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d6c876d1 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d6c876d1 Branch: refs/heads/overridden_exclusions Commit: d6c876d139ec730b116f528cba90b4f22eb5a380 Parents: fc8f8c8 Author: Nick Wellnhofer <[email protected]> Authored: Wed Aug 20 00:21:55 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Wed Aug 20 00:25:02 2014 +0200 ---------------------------------------------------------------------- compiler/src/CFCPerlClass.c | 6 +++++- compiler/src/CFCPerlMethod.c | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d6c876d1/compiler/src/CFCPerlClass.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPerlClass.c b/compiler/src/CFCPerlClass.c index 52eb851..04d52ed 100644 --- a/compiler/src/CFCPerlClass.c +++ b/compiler/src/CFCPerlClass.c @@ -240,7 +240,11 @@ CFCPerlClass_method_bindings(CFCClass *klass) { CFCMethod *method = fresh_methods[i]; // Skip methods that shouldn't be bound. - if (!CFCPerlMethod_can_be_bound(method)) { continue; } + if (!CFCPerlMethod_can_be_bound(method) + || CFCMethod_excluded_from_host(method) + ) { + continue; + } /* Create the binding, add it to the array. * http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d6c876d1/compiler/src/CFCPerlMethod.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPerlMethod.c b/compiler/src/CFCPerlMethod.c index 24ee475..0dd7a98 100644 --- a/compiler/src/CFCPerlMethod.c +++ b/compiler/src/CFCPerlMethod.c @@ -140,11 +140,9 @@ CFCPerlMethod_can_be_bound(CFCMethod *method) { /* * Check for * - private methods - * - methods which have been explicitly excluded * - methods with types which cannot be mapped automatically */ return !CFCSymbol_private((CFCSymbol*)method) - && !CFCMethod_excluded_from_host(method) && CFCPerlSub_can_be_bound((CFCFunction*)method); }
