Skip to content

Commit 9f1a56a

Browse files
author
Martin Larralde
committed
Fix failing examples compilation
1 parent aba51b9 commit 9f1a56a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

example/src/lib.rs

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

55
use pyo3::prelude::*;
6+
use pyo3::py::modinit;
67

78
/// Module documentation string
8-
#[py::modinit(_helloworld)]
9+
#[modinit("_helloworld")]
910
fn init(py: Python, m: &PyModule) -> PyResult<()> {
1011

1112
#[pyfn(m, "run", args="*", kwargs="**")]

example_tomlgen/hello/english/lib.rs

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

55
use pyo3::prelude::*;
6+
use pyo3::py::modinit;
67

78
/// Module documentation string
8-
#[py::modinit(english)]
9+
#[modinit("english")]
910
fn init(py: Python, m: &PyModule) -> PyResult<()> {
1011

1112
#[pyfn(m, "hello")]

example_tomlgen/hello/french/lib.rs

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

55
use pyo3::prelude::*;
6+
use pyo3::py::modinit;
67

78
/// Module documentation string
8-
#[py::modinit(french)]
9+
#[modinit("french")]
910
fn init(py: Python, m: &PyModule) -> PyResult<()> {
1011

1112
#[pyfn(m, "hello")]

0 commit comments

Comments
 (0)