增加 sources_dish 字段

This commit is contained in:
Aoran Zeng committed 2026-09-01 20:09:15 +08:00
1 parent 75d1f50868
commit 35f5090e07
3 files changed
+22 -7

No files matched your search

+3 -5
View File
@@ -5,7 +5,7 @@
* File Authors : @ccmywish
* Contributors : @BingChunMoLi
* Created On : <2025-08-09>
* Last Modified : <2026-08-22>
* Last Modified : <2026-09-01>
*
* 本文件的函数能够帮助 chefs 为一个 dish 定义 recipe
* ------------------------------------------------------------*/
@@ -16,7 +16,7 @@
#define def_combo_dish(t, aliases) Dish_t t##_dish={aliases};
/* 仅内部使用的 "源dish",只用来存储源信息,请参考 pl_nodejs_binary 以及 pl_pypi */
#define def_sources_dish(t, name) Dish_t t##_dish={"__internal_dish_only_for_storing_sources__" name "__"}
#define def_sources_dish(t, name) Dish_t t##_dish={"__internal__sources_only_dish__" name "__"}
@@ -297,9 +297,6 @@ chef_set_rest_smURL_with_postfix (Dish_t *dish, char *postfix)
}
/**
* @note 用于: 组中的 sub dish 在 standalone 模式时正确填充源信息
*/
void
chef_use_other_dish_sources (Dish_t *this, Dish_t *other)
{
@@ -314,6 +311,7 @@ chef_use_other_dish_sources (Dish_t *this, Dish_t *other)
}
}
this->sources_dish = other;
this->sources = other->sources;
this->sources_n = other->sources_n;
}
+16 -1
View File
@@ -6,7 +6,7 @@
* Contributors : @Mikachu2333
* |
* Created On : <2026-08-13>
* Last Modified : <2026-08-20>
* Last Modified : <2026-09-01>
*
* dish 为主体的一些函数
* ------------------------------------------------------------*/
@@ -39,6 +39,21 @@ dish_has_sub_dishes (Dish_t *dish)
bool
dish_use_other_dish_sources (Dish_t *dish)
{
if (dish->sources_dish)
{
return true;
}
else
{
return false;
}
}
void
push_combo_stack (Dish_t *combo_dish)
{
+3 -1
View File
@@ -7,7 +7,7 @@
* Contributors : @livelycode36
* |
* Created On : <2023-08-29>
* Last Modified : <2026-08-19>
* Last Modified : <2026-09-01>
*
* chsrc struct
* ------------------------------------------------------------*/
@@ -200,6 +200,8 @@ typedef struct Dish_t
Source_t *sources;
int sources_n;
struct Dish_t *sources_dish; /* 有些Dish用的是其它Dish的sources */
/* Features */
bool can_english; /* 是否支持英文输出 */