Skip to content

Commit c75fe69

Browse files
committed
Don't make derive-py depend on chop. Closes #13.
1 parent 2e6db62 commit c75fe69

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

td-rs-chop/src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub use crate::cxx::AsPlugin;
22
pub use crate::*;
33

44
#[cfg(feature = "python")]
5-
pub use pyo3::impl_::pyclass::{PyClassImpl, PyMethods};
5+
pub use pyo3::impl_::pyclass::PyClassImpl;
66
#[cfg(feature = "python")]
77
pub use pyo3::prelude::*;
88
#[cfg(feature = "python")]

td-rs-dat/src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub use crate::cxx::AsPlugin;
22
pub use crate::*;
33

44
#[cfg(feature = "python")]
5-
pub use pyo3::impl_::pyclass::{PyClassImpl, PyMethods};
5+
pub use pyo3::impl_::pyclass::PyClassImpl;
66
#[cfg(feature = "python")]
77
pub use pyo3::prelude::*;
88
#[cfg(feature = "python")]

td-rs-derive-py/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ fn impl_py_op(input: &DeriveInput) -> TokenStream {
164164
impl PyGetSets for #struct_name {
165165
fn get_get_sets() -> &'static [pyo3::ffi::PyGetSetDef] {
166166
let clazz = pyo3::impl_::pyclass::PyClassImplCollector::<#struct_name>::new();
167-
let methods = clazz.py_methods();
167+
let methods = <pyo3::impl_::pyclass::PyClassImplCollector::<#struct_name> as pyo3::impl_::pyclass::PyMethods::<#struct_name>>::py_methods(clazz);
168168
let mut getset_builders = std::collections::HashMap::<&std::ffi::CStr, pyo3::pyclass::create_type_object::GetSetDefBuilder>::new();
169169
for method in methods.methods {
170170
let method_def = match method {
@@ -235,10 +235,10 @@ fn impl_py_op(input: &DeriveInput) -> TokenStream {
235235
}
236236
}
237237

238-
impl td_rs_chop::PyMethods for #struct_name {
238+
impl PyMethods for #struct_name {
239239
fn get_methods() -> &'static [pyo3::ffi::PyMethodDef] {
240240
let clazz = pyo3::impl_::pyclass::PyClassImplCollector::<#struct_name>::new();
241-
let methods = clazz.py_methods();
241+
let methods = <pyo3::impl_::pyclass::PyClassImplCollector::<#struct_name> as pyo3::impl_::pyclass::PyMethods::<#struct_name>>::py_methods(clazz);
242242
let mut method_defs = Vec::new();
243243
for method in methods.methods {
244244
let method_def = match method {

td-rs-sop/src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub use crate::cxx::AsPlugin;
22
pub use crate::*;
33

44
#[cfg(feature = "python")]
5-
pub use pyo3::impl_::pyclass::{PyClassImpl, PyMethods};
5+
pub use pyo3::impl_::pyclass::PyClassImpl;
66
#[cfg(feature = "python")]
77
pub use pyo3::prelude::*;
88
#[cfg(feature = "python")]

td-rs-top/src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub use crate::cxx::AsPlugin;
22
pub use crate::*;
33

44
#[cfg(feature = "python")]
5-
pub use pyo3::impl_::pyclass::{PyClassImpl, PyMethods};
5+
pub use pyo3::impl_::pyclass::PyClassImpl;
66
#[cfg(feature = "python")]
77
pub use pyo3::prelude::*;
88
#[cfg(feature = "python")]

0 commit comments

Comments
 (0)