Skip to content

Commit

Permalink
Fix the #[macro_export] absolute path within the same crate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhenrymantilla authored and birkenfeld committed Dec 9, 2021
1 parent a5b76bc commit 2d49dc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyo3-macros-backend/src/pyimpl.rs
Expand Up @@ -266,7 +266,7 @@ fn add_shared_proto_slots(
let first_implemented = implemented_proto_fragments.remove($first);
let second_implemented = implemented_proto_fragments.remove($second);
if first_implemented || second_implemented {
proto_impls.push(quote! { _pyo3::$slot!(#ty) })
proto_impls.push(quote! { _pyo3::class::impl_::$slot!(#ty) })
}
}};
}
Expand Down
3 changes: 3 additions & 0 deletions src/class/impl_.rs
Expand Up @@ -183,6 +183,7 @@ macro_rules! define_pyclass_setattr_slot {
}
}};
}
pub use $generate_macro;
};
}

Expand Down Expand Up @@ -292,6 +293,7 @@ macro_rules! define_pyclass_binary_operator_slot {
}
}};
}
pub use $generate_macro;
};
}

Expand Down Expand Up @@ -484,6 +486,7 @@ macro_rules! generate_pyclass_pow_slot {
}
}};
}
pub use generate_pyclass_pow_slot;

pub trait PyClassAllocImpl<T> {
fn alloc_impl(self) -> Option<ffi::allocfunc>;
Expand Down

0 comments on commit 2d49dc3

Please sign in to comment.