You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2015/02/13 22:45:59 UTC

[09/16] lucy-clownfish git commit: Superficial changes to SUPER_DESTROY.

Superficial changes to SUPER_DESTROY.

Don't depend on Obj.h definitions.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/436a6850
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/436a6850
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/436a6850

Branch: refs/heads/master
Commit: 436a6850ffeecf0ad5b81aa2a0d50788ba15400f
Parents: e579491
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sat Feb 7 15:40:49 2015 -0800
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sat Feb 7 15:40:49 2015 -0800

----------------------------------------------------------------------
 runtime/core/Clownfish/Obj.cfh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/436a6850/runtime/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Obj.cfh b/runtime/core/Clownfish/Obj.cfh
index 028d802..2feadfa 100644
--- a/runtime/core/Clownfish/Obj.cfh
+++ b/runtime/core/Clownfish/Obj.cfh
@@ -112,6 +112,11 @@ public class Clownfish::Obj {
 }
 
 __C__
+
+typedef void
+(*cfish_destroy_t)(void *vself);
+extern CFISH_VISIBLE size_t CFISH_Obj_Destroy_OFFSET;
+
 /** Invoke the [](cfish:.Destroy) method found in `klass` on
  * `self`.
  *
@@ -121,8 +126,8 @@ static CFISH_INLINE void
 cfish_super_destroy(void *vself, cfish_Class *klass) {
     cfish_Obj *self = (cfish_Obj*)vself;
     if (self != NULL) {
-        CFISH_Obj_Destroy_t super_destroy
-            = CFISH_SUPER_METHOD_PTR(klass, CFISH_Obj_Destroy);
+        cfish_destroy_t super_destroy
+            = (cfish_destroy_t)cfish_super_method(klass, CFISH_Obj_Destroy_OFFSET);
         super_destroy(self);
     }
 }