refactor: 拆分绑定函数与封装宏以简化模块实现

This commit is contained in:
爱特每羊队
2026-06-08 07:37:46 +08:00
parent 201d2e724b
commit 800386522d
26 changed files with 1186 additions and 1393 deletions
+8
View File
@@ -12,6 +12,14 @@ macro_rules! bind_method {
};
}
#[macro_export]
macro_rules! bind_methods {
($world:expr, $target:expr, $sf:expr, $sh:expr,
$(($name:literal, $func:path, $nargs:literal)),* $(,)?) => {
$( bind_method!($world, $target, $sf, $sh, $name, $func, $nargs); )*
};
}
pub struct ObjectMethods {
pub keys: *const (),
pub create: *const (),