From ae1da5e2ac3157f98129115e9445e795df1fd88d Mon Sep 17 00:00:00 2001 From: Alexander Chernov Date: Wed, 21 Feb 2024 22:38:41 +0300 Subject: [PATCH] fix private field --- gen/prepare_meta.c | 6 +++--- include/ejudge/prepare.h | 2 +- lib/prepare.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gen/prepare_meta.c b/gen/prepare_meta.c index c44d8c181..03a008d82 100644 --- a/gen/prepare_meta.c +++ b/gen/prepare_meta.c @@ -1378,7 +1378,7 @@ static struct meta_info_item meta_info_section_problem_data_data[] = [CNTSPROB_unhandled_vars] = { CNTSPROB_unhandled_vars, 's', XSIZE(struct section_problem_data, unhandled_vars), "unhandled_vars", XOFFSET(struct section_problem_data, unhandled_vars) }, [CNTSPROB_score_view] = { CNTSPROB_score_view, 'x', XSIZE(struct section_problem_data, score_view), "score_view", XOFFSET(struct section_problem_data, score_view) }, [CNTSPROB_score_view_score] = { CNTSPROB_score_view_score, '?', XSIZE(struct section_problem_data, score_view_score), NULL, XOFFSET(struct section_problem_data, score_view_score) }, - [CNTSPROB_score_view_text] = { CNTSPROB_score_view_text, 'x', XSIZE(struct section_problem_data, score_view_text), "score_view_text", XOFFSET(struct section_problem_data, score_view_text) }, + [CNTSPROB_score_view_text] = { CNTSPROB_score_view_text, 'x', XSIZE(struct section_problem_data, score_view_text), NULL, XOFFSET(struct section_problem_data, score_view_text) }, [CNTSPROB_xml_file_path] = { CNTSPROB_xml_file_path, 's', XSIZE(struct section_problem_data, xml_file_path), NULL, XOFFSET(struct section_problem_data, xml_file_path) }, [CNTSPROB_var_xml_file_paths] = { CNTSPROB_var_xml_file_paths, 'x', XSIZE(struct section_problem_data, var_xml_file_paths), NULL, XOFFSET(struct section_problem_data, var_xml_file_paths) }, }; @@ -1800,7 +1800,7 @@ void cntsprob_copy(struct section_problem_data *dst, const struct section_proble } dst->score_view = (typeof(dst->score_view)) sarray_copy((char**) src->score_view); // private score_view_score - dst->score_view_text = (typeof(dst->score_view_text)) sarray_copy((char**) src->score_view_text); + // private score_view_text // private xml_file_path // private var_xml_file_paths // hidden xml @@ -1929,7 +1929,7 @@ void cntsprob_free(struct section_problem_data *ptr) free(ptr->unhandled_vars); sarray_free((char**) ptr->score_view); // private score_view_score - sarray_free((char**) ptr->score_view_text); + // private score_view_text // private xml_file_path // private var_xml_file_paths // hidden xml diff --git a/include/ejudge/prepare.h b/include/ejudge/prepare.h index 8560e1d5f..5860ec0cb 100644 --- a/include/ejudge/prepare.h +++ b/include/ejudge/prepare.h @@ -1317,7 +1317,7 @@ struct section_problem_data /** external score view */ char **score_view; int *score_view_score META_ATTRIB((meta_private)); - char **score_view_text; + char **score_view_text META_ATTRIB((meta_private)); /** full path to xml_file */ unsigned char *xml_file_path META_ATTRIB((meta_private)); diff --git a/lib/prepare.c b/lib/prepare.c index f477b08c9..6eaad089b 100644 --- a/lib/prepare.c +++ b/lib/prepare.c @@ -1275,6 +1275,7 @@ prepare_problem_free_func(struct generic_section_config *gp) free_deadline_penalties(p->dp_total, p->dp_infos); free_personal_deadlines(p->pd_total, p->pd_infos); xfree(p->score_view_score); + xfree(p->score_view_text); xfree(p->xml_file_path); if (p->variant_num > 0 && p->xml.a) {