mirror of
https://git.proxmox.com/git/perlmod
synced 2025-10-04 18:27:16 +00:00
macro: pass 'cv' as Value
to reduce the amount of required unsafe blocks Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
c25b213cc5
commit
2812f550d9
@ -320,7 +320,10 @@ fn handle_return_kind(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let (cv_arg_name, cv_arg_passed) = if cv_arg {
|
let (cv_arg_name, cv_arg_passed) = if cv_arg {
|
||||||
(quote! { cv }, quote! { cv })
|
(
|
||||||
|
quote! { cv },
|
||||||
|
quote! { ::perlmod::Value::from_raw_ref(cv as *mut ::perlmod::ffi::SV) },
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
(quote! { _cv }, TokenStream::new())
|
(quote! { _cv }, TokenStream::new())
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user