mirror of
git://git.proxmox.com/git/perlmod.git
synced 2025-03-12 00:58:16 +03:00
macro: fixup export visibility
commi 54919078765f was incomplete, this fixes up the remaining 2 cases Fixes: 54919078765f ("don't export xs wrappers from modules") Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
577f68753f
commit
100414d678
@ -289,6 +289,12 @@ fn handle_return_kind(
|
||||
let mut handle_return;
|
||||
let wrapper_func;
|
||||
|
||||
let vis = if export_public {
|
||||
quote! { #[no_mangle] pub }
|
||||
} else {
|
||||
quote! { #[allow(non_snake_case)] }
|
||||
};
|
||||
|
||||
let pthx = crate::pthx_param();
|
||||
match ret {
|
||||
Return::None(result) => {
|
||||
@ -319,12 +325,6 @@ fn handle_return_kind(
|
||||
};
|
||||
}
|
||||
|
||||
let vis = if export_public {
|
||||
quote! { #[no_mangle] pub }
|
||||
} else {
|
||||
quote! { #[allow(non_snake_case)] }
|
||||
};
|
||||
|
||||
wrapper_func = quote! {
|
||||
#[doc(hidden)]
|
||||
#vis extern "C" fn #xs_name(#pthx _cv: &::perlmod::ffi::CV) {
|
||||
@ -373,9 +373,8 @@ fn handle_return_kind(
|
||||
};
|
||||
|
||||
wrapper_func = quote! {
|
||||
#[no_mangle]
|
||||
#[doc(hidden)]
|
||||
pub extern "C" fn #xs_name(#pthx _cv: &::perlmod::ffi::CV) {
|
||||
#vis extern "C" fn #xs_name(#pthx _cv: &::perlmod::ffi::CV) {
|
||||
unsafe {
|
||||
match #impl_xs_name() {
|
||||
Ok(sv) => ::perlmod::ffi::stack_push_raw(sv),
|
||||
@ -460,9 +459,8 @@ fn handle_return_kind(
|
||||
//}
|
||||
|
||||
wrapper_func = quote! {
|
||||
#[no_mangle]
|
||||
#[doc(hidden)]
|
||||
pub extern "C" fn #xs_name(#pthx _cv: &::perlmod::ffi::CV) {
|
||||
#vis extern "C" fn #xs_name(#pthx _cv: &::perlmod::ffi::CV) {
|
||||
unsafe {
|
||||
match #impl_xs_name() {
|
||||
Ok(sv) => { #push },
|
||||
|
Loading…
x
Reference in New Issue
Block a user