diff --git a/src/framework/chef.c b/src/framework/chef.c index 5352459..be3b39a 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -5,7 +5,7 @@ * File Authors : 曾奥然 * Contributors : Nul None * Created On : <2025-08-09> - * Last Modified : <2025-08-21> + * Last Modified : <2025-08-22> * * chef DSL: for chefs (recipe makers) to define a target * ------------------------------------------------------------*/ @@ -39,7 +39,7 @@ chef_register_contributor (char *id, char *name, char *email, char *display_name else contributor->display_name = xy_strdup (display_name); - xy_map_set (ProgStatus.contributors, id, contributor); + xy_map_set (ProgStore.contributors, id, contributor); } @@ -187,7 +187,7 @@ chef_verify_contributor (const char *id) { xy_cant_be_null (id); - Contributor_t *c = xy_map_get (ProgStatus.contributors, id); + Contributor_t *c = xy_map_get (ProgStore.contributors, id); if (!c) { char error[256]; diff --git a/src/framework/core.c b/src/framework/core.c index 9b8a5f5..d2b90b1 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -122,8 +122,6 @@ typedef enum ChgType_t /* Global Program Status */ struct { - XyMap_t *contributors; /* 所有贡献者 */ - int leader_selected_index; /* leader target 选中的索引 */ ChgType_t chgtype; /* 换源实现的类型 */ @@ -132,7 +130,6 @@ struct } ProgStatus = { - .contributors = NULL, .leader_selected_index = -1, .chgtype = ChgType_Auto, .chsrc_run_faas = false @@ -145,12 +142,14 @@ struct XySeq_t *pl; XySeq_t *os; XySeq_t *wr; + XyMap_t *contributors; /* 所有贡献者 */ } ProgStore = { .pl = NULL, .os = NULL, - .wr = NULL + .wr = NULL, + .contributors = NULL, }; @@ -224,12 +223,11 @@ chsrc_alert2 (const char *str) void -chsrc_framework_init () +chsrc_init_framework () { xy_init (); - ProgStatus.contributors = xy_map_new (); - + ProgStore.contributors = xy_map_new (); ProgStore.pl = xy_seq_new (); ProgStore.os = xy_seq_new (); ProgStore.wr = xy_seq_new ();