mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-03 20:27:22 +00:00
Disable CORS validation, improve logging, fix build on nightly. (#129)
* Disable CORS validation, improve logging. * Fix build from nightly API change. * Rebuilt binaries
This commit is contained in:
committed by
Robert Habermeier
parent
40c7820c31
commit
8ff246eb8a
@@ -20,17 +20,17 @@ mod __impl {
|
||||
extern crate alloc;
|
||||
extern crate pwasm_libc;
|
||||
|
||||
use self::alloc::heap::{Alloc, Layout, AllocErr};
|
||||
use self::alloc::heap::{GlobalAlloc, Layout, Opaque};
|
||||
|
||||
use super::WasmAllocator;
|
||||
|
||||
unsafe impl<'a> Alloc for &'a WasmAllocator {
|
||||
unsafe fn alloc(&mut self, layout: Layout) -> Result<*mut u8, AllocErr> {
|
||||
Ok(pwasm_libc::malloc(layout.size()))
|
||||
unsafe impl GlobalAlloc for WasmAllocator {
|
||||
unsafe fn alloc(&self, layout: Layout) -> *mut Opaque {
|
||||
pwasm_libc::malloc(layout.size()) as *mut Opaque
|
||||
}
|
||||
|
||||
unsafe fn dealloc(&mut self, ptr: *mut u8, _layout: Layout) {
|
||||
pwasm_libc::free(ptr)
|
||||
unsafe fn dealloc(&self, ptr: *mut Opaque, _layout: Layout) {
|
||||
pwasm_libc::free(ptr as *mut u8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user