From 804d5db27e36da8ca6a046f20a43130d1cfe6e1e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 26 Feb 2022 17:29:13 +0800 Subject: [PATCH] nac3artiq: make CompileError importable from Python --- nac3artiq/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index ae916d838..11aa56db6 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -797,13 +797,14 @@ extern "C" { } #[pymodule] -fn nac3artiq(_py: Python, m: &PyModule) -> PyResult<()> { +fn nac3artiq(py: Python, m: &PyModule) -> PyResult<()> { #[cfg(feature = "init-llvm-profile")] unsafe { __llvm_profile_initialize(); } Target::initialize_all(&InitializationConfig::default()); + m.add("CompileError", py.get_type::())?; m.add_class::()?; Ok(()) }