Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit 0a64b2d

Browse files
4thel00zmre
authored andcommitted
[bump_pyo3_version] Bump pyo3 version and update incompatible API calls (#56)
1 parent 87767e6 commit 0a64b2d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ serde = "1.0.53"
1010
serde_derive = "1.0.53"
1111

1212
[dependencies.pyo3]
13-
version = "0.5.0"
13+
version = "0.6.0-alpha.2"
1414

1515
[lib]
1616
name = "hyperjson"

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn dump(
206206
}
207207

208208
/// A hyper-fast JSON encoder/decoder written in Rust
209-
#[pymodinit]
209+
#[pymodule]
210210
fn hyperjson(_py: Python, m: &PyModule) -> PyResult<()> {
211211
// See https://github.com/PyO3/pyo3/issues/171
212212
// Use JSONDecodeError from stdlib until issue is resolved.
@@ -215,10 +215,10 @@ fn hyperjson(_py: Python, m: &PyModule) -> PyResult<()> {
215215

216216
m.add("__version__", env!("CARGO_PKG_VERSION"))?;
217217

218-
m.add_function(wrap_function!(load))?;
219-
m.add_function(wrap_function!(loads))?;
220-
m.add_function(wrap_function!(dump))?;
221-
m.add_function(wrap_function!(dumps))?;
218+
m.add_wrapped(wrap_pyfunction!(load))?;
219+
m.add_wrapped(wrap_pyfunction!(loads))?;
220+
m.add_wrapped(wrap_pyfunction!(dump))?;
221+
m.add_wrapped(wrap_pyfunction!(dumps))?;
222222

223223
Ok(())
224224
}

0 commit comments

Comments
 (0)