Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd97e80d

Browse files
authored
use fully qualified path in macro (#1011)
1 parent1fc58b8 commitd97e80d

File tree

1 file changed

+6
-3
lines changed
  • pgml-extension/src/bindings

1 file changed

+6
-3
lines changed

‎pgml-extension/src/bindings/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ use crate::orm::*;
1111
#[macro_export]
1212
macro_rules! create_pymodule{
1313
($pyfile:literal) =>{
14-
pubstaticPY_MODULE:Lazy<anyhow::Result<Py<PyModule>>> =Lazy::new(||{
15-
Python::with_gil(|py| -> anyhow::Result<Py<PyModule>>{
14+
pubstaticPY_MODULE: once_cell::sync::Lazy<
15+
anyhow::Result<pyo3::Py<pyo3::types::PyModule>>,
16+
> = once_cell::sync::Lazy::new(||{
17+
pyo3::Python::with_gil(|py| -> anyhow::Result<pyo3::Py<pyo3::types::PyModule>>{
18+
use $crate::bindings::TracebackError;
1619
let src = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), $pyfile));
17-
Ok(PyModule::from_code(py, src,"","")
20+
Ok(pyo3::types::PyModule::from_code(py, src,"","")
1821
.format_traceback(py)?
1922
.into())
2023
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp