Skip to content

Commit 25965b1

Browse files
committed
使用新宏
1 parent 18ba902 commit 25965b1

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

lib/xy.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ void p (const char *s) { printf ("%s\n", s); }
167167

168168
#define xy_c_array_len(arr) (sizeof (arr) / sizeof (arr[0]))
169169

170-
/* @deprecated 应迁移到后者 */
171-
#define xy_arylen xy_c_array_len
172-
173170

174171
static inline void *
175172
xy_malloc0 (size_t size)

src/chsrc-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ cli_print_available_mirrors ()
113113
say ("--------- -------------- ------------------------------------- ---------------------");
114114
}
115115

116-
for (int i = 0; i < xy_arylen (chsrc_available_mirrors); i++)
116+
for (int i = 0; i < xy_c_array_len (chsrc_available_mirrors); i++)
117117
{
118118
MirrorSite_t *mir = chsrc_available_mirrors[i];
119119
printf ("%-14s%-18s%-41s ", mir->code, mir->abbr, mir->site); say (mir->name);

src/framework/struct.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ Source_t;
9494
/* 由 prelude() 填充 */
9595
#define FeedByPrelude NULL
9696

97-
#define def_sources_n(t) const size_t t##_sources_n = xy_arylen(t##_sources)
98-
9997

10098
typedef enum Capability_t
10199
{
@@ -182,7 +180,7 @@ TargetRegisterInfo_t;
182180

183181
#define def_sources_begin() Source_t sources[] = {
184182
#define def_sources_end() }; \
185-
this->sources_n = xy_arylen(sources); \
183+
this->sources_n = xy_c_array_len(sources); \
186184
char *_sources_storage = xy_malloc0 (sizeof(sources)); \
187185
memcpy (_sources_storage, sources, sizeof(sources)); \
188186
this->sources = (Source_t *)_sources_storage;

src/recipe/lang/Python/PDM.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pl_python_pdm_prelude (void)
1717
chef_set_cooks (this, 1, "@ccmywish");
1818
chef_set_sauciers (this, 0);
1919

20-
chef_allow_local_mode (this, FullyCan, "支持项目级配置", "Supports project-level configuration");
20+
chef_allow_local_mode (this, FullyCan, NULL, NULL);
2121
chef_allow_english(this);
2222
chef_allow_user_define(this);
2323

src/recipe/lang/Python/Rye.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pl_python_rye_prelude (void)
1919
chef_set_cooks (this, 1, "@ccmywish");
2020
chef_set_sauciers (this, 0);
2121

22-
chef_allow_local_mode (this, FullyCan, "支持项目级配置", "Supports project-level configuration");
22+
chef_allow_local_mode (this, FullyCan, NULL, NULL);
2323
chef_allow_english(this);
2424
chef_allow_user_define(this);
2525

0 commit comments

Comments
 (0)