From 7702906d7e77029e9b643b20010f9102b49d725b Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 21 Jan 2026 15:30:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20`chef=5Fuse=5Fthis()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/framework/mirror.c | 12 ++++++------ src/framework/struct.h | 12 ++++++------ src/recipe/os/APT/Ubuntu.c | 2 +- src/recipe/os/BSD/FreeBSD.c | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/framework/mirror.c b/src/framework/mirror.c index 40c4e70..8ae5c64 100644 --- a/src/framework/mirror.c +++ b/src/framework/mirror.c @@ -2,12 +2,12 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------- * File Name : mirror.c - * File Authors : 曾奥然 - * | 郭恒 <2085471348@qq.com> - * Contributors : Shengwei Chen <414685209@qq.com> - * | Jialin Lyu - * | Mikachu2333 - * | BingChunMoLi + * File Authors : @ccmywish + * | @G_I_Y + * Contributors : @livelycode36 + * | @jialinlvcn + * | @Mikachu2333 + * | @BingChunMoLi * | * Created On : <2023-08-29> * Last Modified : <2025-10-07> diff --git a/src/framework/struct.h b/src/framework/struct.h index 0800efd..7fa89f7 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -1,13 +1,13 @@ /** ------------------------------------------------------------ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------- - * File Name : struct.h - * File Authors : 曾奥然 - * | 郭恒 <2085471348@qq.com> - * Contributors : Shengwei Chen <414685209@qq.com> + * File Name : struct.h + * File Authors : @ccmywish + * | @G_I_Y + * Contributors : @livelycode36 * | * Created On : <2023-08-29> - * Last Modified : <2025-08-22> + * Last Modified : <2026-01-21> * * chsrc struct * ------------------------------------------------------------*/ @@ -168,7 +168,7 @@ Target_t; #define chef_allow_NOOP(t) #define chef_prep_this(t,op) Target_t *this = &t##_target; this->inited = true; chef_allow_##op(t); -#define use_this(t) Target_t *this = &t##_target; +#define chef_use_this(t) Target_t *this = &t##_target; #define chsrc_use_this_source(t) Target_t *this = &t##_target; Source_t source = chsrc_yield_source_and_confirm (this, option); #define def_sources_begin() Source_t sources[] = { diff --git a/src/recipe/os/APT/Ubuntu.c b/src/recipe/os/APT/Ubuntu.c index 641fbcb..227c0d1 100644 --- a/src/recipe/os/APT/Ubuntu.c +++ b/src/recipe/os/APT/Ubuntu.c @@ -148,7 +148,7 @@ os_ubuntu_setsrc (char *option) void os_ubuntu_resetsrc (char *option) { - use_this (os_ubuntu); + chef_use_this (os_ubuntu); char *arch = chsrc_get_cpuarch (); if (strncmp (arch, "x86_64", 6)!=0) { diff --git a/src/recipe/os/BSD/FreeBSD.c b/src/recipe/os/BSD/FreeBSD.c index 6c853e1..c459e50 100644 --- a/src/recipe/os/BSD/FreeBSD.c +++ b/src/recipe/os/BSD/FreeBSD.c @@ -46,7 +46,7 @@ os_freebsd_setsrc (char *option) // 据 @ykla,FreeBSD不自带sudo,但是我们依然要保证是root权限 chsrc_ensure_root (); - use_this (os_freebsd); + chef_use_this (os_freebsd); int index = use_specific_mirror_or_auto_select (option, this); Source_t source = this->sources[index];