Skip to content

Commit cb792fd

Browse files
committed
Upgrade to pyo3 0.3.1
1 parent 2fa5066 commit cb792fd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

example/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ version = "0.1.0"
44
authors = ["Nikolay Kim <[email protected]>"]
55

66
[dependencies.pyo3]
7-
version = "^0.2.7"
8-
default-features = false
7+
version = "0.3.1"
98

109
[lib]
1110
crate-type = ["cdylib"]

example/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
#![feature(proc_macro)]
1+
#![feature(use_extern_macros)]
22

33
extern crate pyo3;
44

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

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

1211
#[pyfn(m, "run", args="*", kwargs="**")]
1312
fn run_fn(_py: Python, args: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> {

0 commit comments

Comments
 (0)