Skip to content

Commit

Permalink
fix private field
Browse files Browse the repository at this point in the history
  • Loading branch information
blackav committed Feb 21, 2024
1 parent 9d71e30 commit ae1da5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gen/prepare_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
};
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/ejudge/prepare.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions lib/prepare.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ae1da5e

Please sign in to comment.