plugin_framework, debug config, mid commit

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-04-24 18:45:22 +08:00
parent 8340573277
commit d8dc56a743
15 changed files with 623 additions and 276 deletions

View File

@@ -60,14 +60,14 @@ struct MsgToConfig {
/// id: The id of this plugin.
/// content: The content.
/// len: The length of the content.
pub fn callback_msg(
pub fn cb_msg(
peer: *const c_char,
target: *const c_char,
id: *const c_char,
content: *const c_void,
len: usize,
) {
macro_rules! callback_msg_field {
macro_rules! cb_msg_field {
($field: ident) => {
let $field = match cstr_to_string($field) {
Err(e) => {
@@ -78,9 +78,9 @@ pub fn callback_msg(
};
};
}
callback_msg_field!(peer);
callback_msg_field!(target);
callback_msg_field!(id);
cb_msg_field!(peer);
cb_msg_field!(target);
cb_msg_field!(id);
match &target as _ {
MSG_TO_PEER_TARGET => {