Skip to content

Commit 69d2306

Browse files
author
ydhcui
committed
更新插件入口
1 parent 5ac2ed7 commit 69d2306

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ use protobuf::Message;
8989
use protobuf::RepeatedField;
9090

9191
#[no_mangle]
92-
pub unsafe extern "C" fn plugmain(s: *const c_char) -> *const c_char {
93-
let r_str = CStr::from_ptr(s).to_str().unwrap();
92+
pub unsafe extern "C" fn plugmain(args: *const c_char) -> *const c_char {
93+
let args = CStr::from_ptr(args).to_str().unwrap();
9494

9595
let mut prs = Vec::<plug::PassResult>::new();
9696
prs.push(plug::PassResult::new());

plug_demo/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use protobuf::Message;
66
use protobuf::RepeatedField;
77

88
#[no_mangle]
9-
pub unsafe extern "C" fn plugmain(s: *const c_char) -> *const c_char {
10-
let r_str = CStr::from_ptr(s).to_str().unwrap();
9+
pub unsafe extern "C" fn plugmain(args: *const c_char) -> *const c_char {
10+
let args = CStr::from_ptr(args).to_str().unwrap();
1111

1212
let mut prs = Vec::<plug::PassResult>::new();
1313
prs.push(plug::PassResult::new());

0 commit comments

Comments
 (0)