From b79b4bfc8141006909eb669eb67744e38ea54c7c Mon Sep 17 00:00:00 2001 From: yuyi Date: Mon, 2 Dec 2024 13:29:31 +0800 Subject: [PATCH] cgen: cleanup gen_jsons() a bit (#23044) --- vlib/v/gen/c/json.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/json.v b/vlib/v/gen/c/json.v index 6ca497f5576267..4209e9bc5f4106 100644 --- a/vlib/v/gen/c/json.v +++ b/vlib/v/gen/c/json.v @@ -139,7 +139,7 @@ ${enc_fn_dec} { \tcJSON *o;') if is_js_prim(sym.name) && utyp.is_ptr() { g.gen_prim_enc_dec(utyp, mut enc, mut dec) - } else if sym.kind == .array || sym.kind == .array_fixed { + } else if sym.kind in [.array, .array_fixed] { array_size := if sym.kind == .array_fixed { (sym.info as ast.ArrayFixed).size } else {