contributors 字段挪至 ProgStore

This commit is contained in:
Aoran Zeng 2025-08-22 11:29:58 +08:00
parent 5375a9da19
commit ed4545d9f2
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
2 changed files with 8 additions and 10 deletions

View File

@ -5,7 +5,7 @@
* File Authors : <ccmywish@qq.com> * File Authors : <ccmywish@qq.com>
* Contributors : Nul None <nul@none.org> * Contributors : Nul None <nul@none.org>
* Created On : <2025-08-09> * 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 * 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 else
contributor->display_name = xy_strdup (display_name); 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); 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) if (!c)
{ {
char error[256]; char error[256];

View File

@ -122,8 +122,6 @@ typedef enum ChgType_t
/* Global Program Status */ /* Global Program Status */
struct struct
{ {
XyMap_t *contributors; /* 所有贡献者 */
int leader_selected_index; /* leader target 选中的索引 */ int leader_selected_index; /* leader target 选中的索引 */
ChgType_t chgtype; /* 换源实现的类型 */ ChgType_t chgtype; /* 换源实现的类型 */
@ -132,7 +130,6 @@ struct
} }
ProgStatus = ProgStatus =
{ {
.contributors = NULL,
.leader_selected_index = -1, .leader_selected_index = -1,
.chgtype = ChgType_Auto, .chgtype = ChgType_Auto,
.chsrc_run_faas = false .chsrc_run_faas = false
@ -145,12 +142,14 @@ struct
XySeq_t *pl; XySeq_t *pl;
XySeq_t *os; XySeq_t *os;
XySeq_t *wr; XySeq_t *wr;
XyMap_t *contributors; /* 所有贡献者 */
} }
ProgStore = ProgStore =
{ {
.pl = NULL, .pl = NULL,
.os = NULL, .os = NULL,
.wr = NULL .wr = NULL,
.contributors = NULL,
}; };
@ -224,12 +223,11 @@ chsrc_alert2 (const char *str)
void void
chsrc_framework_init () chsrc_init_framework ()
{ {
xy_init (); xy_init ();
ProgStatus.contributors = xy_map_new (); ProgStore.contributors = xy_map_new ();
ProgStore.pl = xy_seq_new (); ProgStore.pl = xy_seq_new ();
ProgStore.os = xy_seq_new (); ProgStore.os = xy_seq_new ();
ProgStore.wr = xy_seq_new (); ProgStore.wr = xy_seq_new ();