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/02/06 15:17:46 UTC

[13/14] lucy-clownfish git commit: Move Destroy methods to the bottom

Move Destroy methods to the bottom

We should think about making Destroy non-public. This method shouldn't
be called directly.


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

Branch: refs/heads/master
Commit: 14e8a24dae05dd3560b715a8a04e24a76c5d7cf2
Parents: a452c42
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Feb 4 14:06:52 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu Feb 4 14:35:13 2016 +0100

----------------------------------------------------------------------
 runtime/core/Clownfish/Boolean.cfh |  6 +++---
 runtime/core/Clownfish/CharBuf.cfh |  6 +++---
 runtime/core/Clownfish/Err.cfh     |  6 +++---
 runtime/core/Clownfish/Obj.cfh     | 12 ++++++------
 runtime/core/Clownfish/String.cfh  |  6 +++---
 5 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/14e8a24d/runtime/core/Clownfish/Boolean.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Boolean.cfh b/runtime/core/Clownfish/Boolean.cfh
index 17d637e..36a7d28 100644
--- a/runtime/core/Clownfish/Boolean.cfh
+++ b/runtime/core/Clownfish/Boolean.cfh
@@ -38,9 +38,6 @@ public final class Clownfish::Boolean nickname Bool {
     public inert Boolean*
     singleton(bool value);
 
-    public void
-    Destroy(Boolean *self);
-
     void*
     To_Host(Boolean *self);
 
@@ -64,6 +61,9 @@ public final class Clownfish::Boolean nickname Bool {
      */
     public incremented String*
     To_String(Boolean *self);
+
+    public void
+    Destroy(Boolean *self);
 }
 
 __C__

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/14e8a24d/runtime/core/Clownfish/CharBuf.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/CharBuf.cfh b/runtime/core/Clownfish/CharBuf.cfh
index e4ab770..6c643f4 100644
--- a/runtime/core/Clownfish/CharBuf.cfh
+++ b/runtime/core/Clownfish/CharBuf.cfh
@@ -121,9 +121,6 @@ public final class Clownfish::CharBuf nickname CB
     public incremented CharBuf*
     Clone(CharBuf *self);
 
-    public void
-    Destroy(CharBuf *self);
-
     /** Return the content of the CharBuf as String.
      */
     public incremented String*
@@ -134,6 +131,9 @@ public final class Clownfish::CharBuf nickname CB
      */
     public incremented String*
     Yield_String(CharBuf *self);
+
+    public void
+    Destroy(CharBuf *self);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/14e8a24d/runtime/core/Clownfish/Err.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Err.cfh b/runtime/core/Clownfish/Err.cfh
index 8136caa..d825fcf 100644
--- a/runtime/core/Clownfish/Err.cfh
+++ b/runtime/core/Clownfish/Err.cfh
@@ -49,9 +49,6 @@ public class Clownfish::Err inherits Clownfish::Obj {
     inert Err*
     init(Err *self, decremented String *mess);
 
-    public void
-    Destroy(Err *self);
-
     /** Return a copy of the error message.
      */
     public incremented String*
@@ -72,6 +69,9 @@ public class Clownfish::Err inherits Clownfish::Obj {
     void
     Add_Frame(Err *self, const char *file, int line, const char *func);
 
+    public void
+    Destroy(Err *self);
+
     /** Set the global error object, a per-thread Err shared variable.
      */
     public inert void

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/14e8a24d/runtime/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Obj.cfh b/runtime/core/Clownfish/Obj.cfh
index 89c3dc9..30b14e0 100644
--- a/runtime/core/Clownfish/Obj.cfh
+++ b/runtime/core/Clownfish/Obj.cfh
@@ -38,12 +38,6 @@ public abstract class Clownfish::Obj {
     public abstract incremented Obj*
     Clone(Obj *self);
 
-    /** Generic destructor.  Frees the struct itself but not any complex
-     * member elements.
-     */
-    public void
-    Destroy(Obj *self);
-
     /** Indicate whether two objects are the same.  By default, compares the
      * memory address.
      *
@@ -63,6 +57,12 @@ public abstract class Clownfish::Obj {
     public abstract int32_t
     Compare_To(Obj *self, Obj *other);
 
+    /** Generic destructor.  Frees the struct itself but not any complex
+     * member elements.
+     */
+    public void
+    Destroy(Obj *self);
+
     /** Return the object's Class.
      */
     public inert Class*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/14e8a24d/runtime/core/Clownfish/String.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/String.cfh b/runtime/core/Clownfish/String.cfh
index 6479930..dca2109 100644
--- a/runtime/core/Clownfish/String.cfh
+++ b/runtime/core/Clownfish/String.cfh
@@ -292,9 +292,6 @@ public final class Clownfish::String nickname Str
     bool
     Is_Copy_On_IncRef(String *self);
 
-    public void
-    Destroy(String *self);
-
     /** Indicate whether one String is less than, equal to, or greater than
      * another.  The Unicode code points of the Strings are compared
      * lexicographically.  Throws an exception if `other` is not a String.
@@ -363,6 +360,9 @@ public final class Clownfish::String nickname Str
      */
     public incremented StringIterator*
     Tail(String *self);
+
+    public void
+    Destroy(String *self);
 }
 
 /**