mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
fix(python): remove the macro_export and use pub(crate) instead so that it doesn't leak into the documentations.
This commit is contained in:
parent
6afa212fe4
commit
f116f27b39
3 changed files with 5 additions and 5 deletions
|
@ -6,8 +6,8 @@ use crate::cursor::Controller as CursorController;
|
||||||
use pyo3::exceptions::PyValueError;
|
use pyo3::exceptions::PyValueError;
|
||||||
use pyo3::prelude::*;
|
use pyo3::prelude::*;
|
||||||
|
|
||||||
|
use super::a_sync_allow_threads;
|
||||||
use super::Promise;
|
use super::Promise;
|
||||||
use crate::a_sync_allow_threads;
|
|
||||||
|
|
||||||
// need to do manually since Controller is a trait implementation
|
// need to do manually since Controller is a trait implementation
|
||||||
#[pymethods]
|
#[pymethods]
|
||||||
|
|
|
@ -82,7 +82,6 @@ impl Promise {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! a_sync {
|
macro_rules! a_sync {
|
||||||
($x:expr) => {{
|
($x:expr) => {{
|
||||||
Ok($crate::ffi::python::Promise(Some(
|
Ok($crate::ffi::python::Promise(Some(
|
||||||
|
@ -91,8 +90,8 @@ macro_rules! a_sync {
|
||||||
)))
|
)))
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
pub(crate) use a_sync;
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! a_sync_allow_threads {
|
macro_rules! a_sync_allow_threads {
|
||||||
($py:ident, $x:expr) => {{
|
($py:ident, $x:expr) => {{
|
||||||
$py.allow_threads(move || {
|
$py.allow_threads(move || {
|
||||||
|
@ -103,6 +102,7 @@ macro_rules! a_sync_allow_threads {
|
||||||
})
|
})
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
pub(crate) use a_sync_allow_threads;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
struct LoggerProducer(mpsc::UnboundedSender<String>);
|
struct LoggerProducer(mpsc::UnboundedSender<String>);
|
||||||
|
|
|
@ -3,8 +3,8 @@ use crate::cursor::Controller as CursorController;
|
||||||
use crate::workspace::Workspace;
|
use crate::workspace::Workspace;
|
||||||
use pyo3::prelude::*;
|
use pyo3::prelude::*;
|
||||||
|
|
||||||
|
use super::a_sync_allow_threads;
|
||||||
use super::Promise;
|
use super::Promise;
|
||||||
use crate::a_sync_allow_threads;
|
|
||||||
|
|
||||||
#[pymethods]
|
#[pymethods]
|
||||||
impl Workspace {
|
impl Workspace {
|
||||||
|
|
Loading…
Reference in a new issue