Skip to content

Commit f17241b

Browse files
author
Martin Larralde
committed
Fix aliased pyo3 macro in Python examples
1 parent 8c5c227 commit f17241b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

example_tomlgen/hello/english/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ fn hello(_py: Python) -> PyResult<()> {
1313
#[pymodule]
1414
/// Module documentation string
1515
fn english(_py: Python, m: &PyModule) -> PyResult<()> {
16-
m.add_wrapped(wrap_function!(hello))?;
16+
m.add_wrapped(wrap_pyfunction!(hello))?;
1717
Ok(())
1818
}

example_tomlgen/hello/french/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ fn hello(_py: Python) -> PyResult<()> {
1313
#[pymodule]
1414
/// Module documentation string
1515
fn french(_py: Python, m: &PyModule) -> PyResult<()> {
16-
m.add_wrapped(wrap_function!(hello))?;
16+
m.add_wrapped(wrap_pyfunction!(hello))?;
1717
Ok(())
1818
}

html-py-ever/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ fn parse_text(text: &str) -> PyResult<Document> {
5757

5858
#[pymodule]
5959
fn html_py_ever(_py: Python, m: &PyModule) -> PyResult<()> {
60-
m.add_wrapped(wrap_function!(parse_file))?;
61-
m.add_wrapped(wrap_function!(parse_text))?;
60+
m.add_wrapped(wrap_pyfunction!(parse_file))?;
61+
m.add_wrapped(wrap_pyfunction!(parse_text))?;
6262
m.add_class::<Document>()?;
6363

6464
Ok(())

0 commit comments

Comments
 (0)