From: NeilBrown Date: Sat, 27 Apr 2019 23:19:44 +0000 (+1000) Subject: oceani: move free_value() to the other generic value code. X-Git-Tag: JamisonCreek-3~41 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=db571f9737d8d3f14921ae53f41d13897cadd1f5 oceani: move free_value() to the other generic value code. This doesn't belong wit the base types. Signed-off-by: NeilBrown --- diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index 6802795..f3bf6a1 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -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)