Skip to content

Commit ed4545d

Browse files
committed
contributors 字段挪至 ProgStore
1 parent 5375a9d commit ed4545d

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/framework/chef.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* File Authors : 曾奥然 <[email protected]>
66
* Contributors : Nul None <[email protected]>
77
* Created On : <2025-08-09>
8-
* Last Modified : <2025-08-21>
8+
* Last Modified : <2025-08-22>
99
*
1010
* chef DSL: for chefs (recipe makers) to define a target
1111
* ------------------------------------------------------------*/
@@ -39,7 +39,7 @@ chef_register_contributor (char *id, char *name, char *email, char *display_name
3939
else
4040
contributor->display_name = xy_strdup (display_name);
4141

42-
xy_map_set (ProgStatus.contributors, id, contributor);
42+
xy_map_set (ProgStore.contributors, id, contributor);
4343
}
4444

4545

@@ -187,7 +187,7 @@ chef_verify_contributor (const char *id)
187187
{
188188
xy_cant_be_null (id);
189189

190-
Contributor_t *c = xy_map_get (ProgStatus.contributors, id);
190+
Contributor_t *c = xy_map_get (ProgStore.contributors, id);
191191
if (!c)
192192
{
193193
char error[256];

src/framework/core.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ typedef enum ChgType_t
122122
/* Global Program Status */
123123
struct
124124
{
125-
XyMap_t *contributors; /* 所有贡献者 */
126-
127125
int leader_selected_index; /* leader target 选中的索引 */
128126
ChgType_t chgtype; /* 换源实现的类型 */
129127

@@ -132,7 +130,6 @@ struct
132130
}
133131
ProgStatus =
134132
{
135-
.contributors = NULL,
136133
.leader_selected_index = -1,
137134
.chgtype = ChgType_Auto,
138135
.chsrc_run_faas = false
@@ -145,12 +142,14 @@ struct
145142
XySeq_t *pl;
146143
XySeq_t *os;
147144
XySeq_t *wr;
145+
XyMap_t *contributors; /* 所有贡献者 */
148146
}
149147
ProgStore =
150148
{
151149
.pl = NULL,
152150
.os = NULL,
153-
.wr = NULL
151+
.wr = NULL,
152+
.contributors = NULL,
154153
};
155154

156155

@@ -224,12 +223,11 @@ chsrc_alert2 (const char *str)
224223

225224

226225
void
227-
chsrc_framework_init ()
226+
chsrc_init_framework ()
228227
{
229228
xy_init ();
230229

231-
ProgStatus.contributors = xy_map_new ();
232-
230+
ProgStore.contributors = xy_map_new ();
233231
ProgStore.pl = xy_seq_new ();
234232
ProgStore.os = xy_seq_new ();
235233
ProgStore.wr = xy_seq_new ();

0 commit comments

Comments
 (0)