Skip to content

Commit

Permalink
Refactor the implementation of #[pyclass] and try to let #[pyclass] s…
Browse files Browse the repository at this point in the history
…upport enum.

There's no functionality since it does not generate __eq__.

Also it only works on enums with only variants, and does not support C-like enums.
  • Loading branch information
jovenlin0527 committed Nov 21, 2021
1 parent 2f6ea2f commit 9aaa67e
Show file tree
Hide file tree
Showing 10 changed files with 593 additions and 272 deletions.
2 changes: 1 addition & 1 deletion pyo3-macros-backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod pyproto;

pub use from_pyobject::build_derive_from_pyobject;
pub use module::{process_functions_in_module, py_init, PyModuleOptions};
pub use pyclass::{build_py_class, PyClassArgs};
pub use pyclass::{build_py_class, build_py_enum, PyClassArgs};
pub use pyfunction::{build_py_function, PyFunctionOptions};
pub use pyimpl::{build_py_methods, PyClassMethodsType};
pub use pyproto::build_py_proto;
Expand Down
Loading

0 comments on commit 9aaa67e

Please sign in to comment.