forked from M-Labs/nac3
nac3artiq: make CompileError importable from Python
This commit is contained in:
parent
cbc77dddb0
commit
804d5db27e
@ -797,13 +797,14 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[pymodule]
|
#[pymodule]
|
||||||
fn nac3artiq(_py: Python, m: &PyModule) -> PyResult<()> {
|
fn nac3artiq(py: Python, m: &PyModule) -> PyResult<()> {
|
||||||
#[cfg(feature = "init-llvm-profile")]
|
#[cfg(feature = "init-llvm-profile")]
|
||||||
unsafe {
|
unsafe {
|
||||||
__llvm_profile_initialize();
|
__llvm_profile_initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
Target::initialize_all(&InitializationConfig::default());
|
Target::initialize_all(&InitializationConfig::default());
|
||||||
|
m.add("CompileError", py.get_type::<CompileError>())?;
|
||||||
m.add_class::<Nac3>()?;
|
m.add_class::<Nac3>()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user