fix: scs-rs is renamed to scs-sdk-rs

This commit is contained in:
2023-04-30 20:26:00 +08:00
parent 5440e129de
commit e3566620fa
Signed by: LuoRain
GPG key ID: 16B4D3D5372966A6
2 changed files with 5 additions and 3 deletions

2
proc_macros/README.md Normal file
View file

@ -0,0 +1,2 @@
# Procedural macros for scs-sdk-rs
This crate contains proc macros for [scs-sdk-rs](https://crates.io/crates/scs-sdk-rs)

View file

@ -21,7 +21,7 @@ pub fn scs_api(args: TokenStream, input: TokenStream) -> TokenStream {
input.sig.abi = syn::parse_str("extern \"C\"").unwrap();
if api_type == "result" {
input.sig.output = syn::parse_str("-> scs_rs::scs_result_t").unwrap();
input.sig.output = syn::parse_str("-> scs_sdk_rs::scs_result_t").unwrap();
}
TokenStream::from(quote!(#input))
@ -33,9 +33,9 @@ pub fn scs_telemetry_init(_args: TokenStream, input: TokenStream) -> TokenStream
let mut input = parse_macro_input!(input as ItemFn);
let mut punc = Punctuated::new();
punc.push_value(syn::parse_str::<FnArg>("version: scs_rs::scs_u32_t").unwrap());
punc.push_value(syn::parse_str::<FnArg>("version: scs_sdk_rs::scs_u32_t").unwrap());
punc.push_punct(syn::parse_str::<Comma>(",").unwrap());
punc.push_value(syn::parse_str("params: *const scs_rs::scs_telemetry_init_params_t").unwrap());
punc.push_value(syn::parse_str("params: *const scs_sdk_rs::scs_telemetry_init_params_t").unwrap());
input.sig.inputs = punc;
input.sig.ident = syn::parse_str("scs_telemetry_init").unwrap();