Skip to content

Commit 8cf6e4f

Browse files
danielhenrymantillabirkenfeld
authored andcommitted
Fix the #[macro_export] absolute path within the same crate issue
1 parent efd06cb commit 8cf6e4f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pyo3-macros-backend/src/pyimpl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ fn add_shared_proto_slots(
266266
let first_implemented = implemented_proto_fragments.remove($first);
267267
let second_implemented = implemented_proto_fragments.remove($second);
268268
if first_implemented || second_implemented {
269-
proto_impls.push(quote! { _pyo3::$slot!(#ty) })
269+
proto_impls.push(quote! { _pyo3::class::impl_::$slot!(#ty) })
270270
}
271271
}};
272272
}

src/class/impl_.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ macro_rules! define_pyclass_setattr_slot {
183183
}
184184
}};
185185
}
186+
pub use $generate_macro;
186187
};
187188
}
188189

@@ -292,6 +293,7 @@ macro_rules! define_pyclass_binary_operator_slot {
292293
}
293294
}};
294295
}
296+
pub use $generate_macro;
295297
};
296298
}
297299

@@ -484,6 +486,7 @@ macro_rules! generate_pyclass_pow_slot {
484486
}
485487
}};
486488
}
489+
pub use generate_pyclass_pow_slot;
487490

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

0 commit comments

Comments
 (0)