Skip to content

Commit d7e7c89

Browse files
author
Lasse Nielsen
committed
Fixes
1 parent e69c737 commit d7e7c89

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66
license = "GPL-3.0-only"
77
authors = ["Lasse Nielsen <lasse@xerrion.dk>"]
88
readme = "README.md"
9-
documentation = "https://docs.rs/shr_parser"
9+
documentation = "https://docs.rs/shr_parser_py"
1010
repository = "https://github.com/Xerrion/shr_parser_py"
1111

1212
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -15,5 +15,5 @@ crate-type = ["cdylib"]
1515
name = "shr_parser"
1616

1717
[dependencies]
18-
pyo3 = "0.22.1"
18+
pyo3 = { version = "0.22.1", features = ["extension-module"] }
1919
shr_parser = "1.0.5"

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ fn create_parser(file_path: String, parsing_type: i32) -> PyResult<PySHRParser>
5454

5555
/// A Python module implemented in Rust.
5656
#[pymodule]
57-
fn shr_parser_py(_py: Python, m: &PyModule) -> PyResult<()> {
58-
m.add_class::<PySHRParser>()?;
59-
m.add_function(wrap_pyfunction!(create_parser, m)?)?;
57+
fn my_module(module: &Bound<'_, PyModule>) -> PyResult<()> {
58+
module.add_class::<PySHRParser>()?;
59+
module.add_function(wrap_pyfunction!(create_parser, module)?)?;
6060
Ok(())
6161
}

0 commit comments

Comments
 (0)