From bb2521e957860ad2a019599b18240835c1cd6b78 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 19 Nov 2024 00:43:30 +0200 Subject: [PATCH] v.markused: add tos5 to the whitelist, when C.cJSON_Parse is declared (i.e. after `import json`) --- vlib/v/markused/markused.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/v/markused/markused.v b/vlib/v/markused/markused.v index 754ce95e32dda5..50d384973d1f74 100644 --- a/vlib/v/markused/markused.v +++ b/vlib/v/markused/markused.v @@ -336,6 +336,10 @@ pub fn mark_used(mut table ast.Table, mut pref_ pref.Preferences, ast_files []&a } } + if 'C.cJSON_Parse' in all_fns { + all_fn_root_names << 'tos5' + + } mut walker := Walker{ table: table files: ast_files