]> ocean-lang.org Git - ocean/commitdiff
oceani: move free_value() to the other generic value code.
authorNeilBrown <neil@brown.name>
Sat, 27 Apr 2019 23:19:44 +0000 (09:19 +1000)
committerNeilBrown <neil@brown.name>
Wed, 1 May 2019 08:07:28 +0000 (18:07 +1000)
This doesn't belong wit the base types.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani.mdc

index 68027950c81415db606264b3b7fe56ef6cb45aa0..f3bf6a1456981f5ed491d884326aa8829aa27803 100644 (file)
@@ -498,6 +498,12 @@ which are often passed around by value.
                 */
        }
 
+       static void free_value(struct value v)
+       {
+               if (v.type)
+                       v.type->free(v);
+       }
+
        static struct value val_init(struct type *type)
        {
                struct value rv;
@@ -603,12 +609,6 @@ to parse each type from a string.
                }
        }
 
-       static void free_value(struct value v)
-       {
-               if (v.type)
-                       v.type->free(v);
-       }
-
        static int vtype_compat(struct type *require, struct type *have, int rules)
        {
                if ((rules & Rboolok) && have == Tbool)