Fix the `#[macro_export]` absolute path within the same crate issue

This commit is contained in:
Daniel Henry-Mantilla 2021-12-08 14:22:54 +01:00 committed by Georg Brandl
parent a5b76bc365
commit 2d49dc33b7
2 changed files with 4 additions and 1 deletions

View File

@ -266,7 +266,7 @@ fn add_shared_proto_slots(
let first_implemented = implemented_proto_fragments.remove($first); let first_implemented = implemented_proto_fragments.remove($first);
let second_implemented = implemented_proto_fragments.remove($second); let second_implemented = implemented_proto_fragments.remove($second);
if first_implemented || second_implemented { if first_implemented || second_implemented {
proto_impls.push(quote! { _pyo3::$slot!(#ty) }) proto_impls.push(quote! { _pyo3::class::impl_::$slot!(#ty) })
} }
}}; }};
} }

View File

@ -183,6 +183,7 @@ macro_rules! define_pyclass_setattr_slot {
} }
}}; }};
} }
pub use $generate_macro;
}; };
} }
@ -292,6 +293,7 @@ macro_rules! define_pyclass_binary_operator_slot {
} }
}}; }};
} }
pub use $generate_macro;
}; };
} }
@ -484,6 +486,7 @@ macro_rules! generate_pyclass_pow_slot {
} }
}}; }};
} }
pub use generate_pyclass_pow_slot;
pub trait PyClassAllocImpl<T> { pub trait PyClassAllocImpl<T> {
fn alloc_impl(self) -> Option<ffi::allocfunc>; fn alloc_impl(self) -> Option<ffi::allocfunc>;