Add explanation regarding SUPER::method invocations This will hopefully remind me why we have to use static dispatch in XSUBs.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/45be7f49 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/45be7f49 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/45be7f49 Branch: refs/heads/master Commit: 45be7f49b06826a8b46b796c8745b2ec941ca154 Parents: cd847f2 Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Sat Feb 25 17:22:57 2017 +0100 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Sat Feb 25 17:35:18 2017 +0100 ---------------------------------------------------------------------- compiler/src/CFCPerlClass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/45be7f49/compiler/src/CFCPerlClass.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPerlClass.c b/compiler/src/CFCPerlClass.c index 30e9043..fe40119 100644 --- a/compiler/src/CFCPerlClass.c +++ b/compiler/src/CFCPerlClass.c @@ -269,7 +269,9 @@ CFCPerlClass_method_bindings(CFCClass *klass) { * directly calls the implementing function, rather than invokes the * method on the object using vtable method dispatch. Doing things * this way allows SUPER:: invocations from Perl-space to work - * properly. + * properly. (The callback to the Perl method is stored in the + * vtable as well. Using dynamic dispatch for SUPER:: invocations + * would result in calling the Perl method over and over.) */ CFCPerlMethod *meth_binding = CFCPerlMethod_new(klass, method); size_t size = (num_bound + 2) * sizeof(CFCPerlMethod*);