Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Enable #[new] to trigger the linker error
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Jan 18, 2020
1 parent c9ad3bf commit f5d68bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ struct MyClass {

#[pymethods]
impl MyClass {
// #[new]
// fn new(obj: &PyRawObject, num: i32) {
// obj.init({ MyClass { num } });
// }
#[new]
fn new(obj: &PyRawObject, num: i32) {
obj.init({ MyClass { num } });
}
}

#[pymodule]
Expand Down

0 comments on commit f5d68bd

Please sign in to comment.