refactor: 拆分绑定函数与封装宏以简化模块实现
This commit is contained in:
@@ -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 (),
|
||||
|
||||
Reference in New Issue
Block a user