Skip to content

Commit eb2eba5

Browse files
committed
Upgrade to pyo3 0.3.1, part 2
1 parent cb792fd commit eb2eba5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

example_tomlgen/hello/english/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
extern crate pyo3;
44

55
use pyo3::prelude::*;
6-
use pyo3::py::modinit;
76

87
/// Module documentation string
9-
#[modinit(english)]
10-
fn init(py: Python, m: &PyModule) -> PyResult<()> {
8+
#[pymodinit]
9+
fn english(py: Python, m: &PyModule) -> PyResult<()> {
1110

1211
#[pyfn(m, "hello")]
1312
fn hello(_py: Python) -> PyResult<()> {

example_tomlgen/hello/french/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
extern crate pyo3;
44

55
use pyo3::prelude::*;
6-
use pyo3::py::modinit;
76

87
/// Module documentation string
9-
#[modinit(french)]
10-
fn init(py: Python, m: &PyModule) -> PyResult<()> {
8+
#[pymodinit]
9+
fn french(py: Python, m: &PyModule) -> PyResult<()> {
1110

1211
#[pyfn(m, "hello")]
1312
fn hello(_py: Python) -> PyResult<()> {

0 commit comments

Comments
 (0)