590: wasmer-c-api: error visibility changes  r=bjfish a=YaronWittenstein

I've changed the visibility to `public` in order to support code like here:
https://github.com/spacemeshos/svm/blob/52f04b52cc/crates/svm-wasmer-c-api/src/macros.rs#L150

@syrusakbary @bjfish @Hywan 

Co-authored-by: Yaron Wittenstein <yaron.wittenstein@gmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
This commit is contained in:
bors[bot] 2019-08-01 01:59:12 +00:00
commit 3e27b0ca79

View File

@ -11,7 +11,7 @@ thread_local! {
static LAST_ERROR: RefCell<Option<Box<Error>>> = RefCell::new(None);
}
pub(crate) fn update_last_error<E: Error + 'static>(err: E) {
pub fn update_last_error<E: Error + 'static>(err: E) {
LAST_ERROR.with(|prev| {
*prev.borrow_mut() = Some(Box::new(err));
});
@ -89,8 +89,8 @@ pub unsafe extern "C" fn wasmer_last_error_message(buffer: *mut c_char, length:
}
#[derive(Debug)]
pub(crate) struct CApiError {
pub(crate) msg: String,
pub struct CApiError {
pub msg: String,
}
impl Display for CApiError {