You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesatee.apache.org by di...@apache.org on 2019/12/09 06:33:50 UTC

[incubator-mesatee-sgx] branch v1.1.0-beta updated: Revert back to box_me_up

This is an automated email from the ASF dual-hosted git repository.

dingyu pushed a commit to branch v1.1.0-beta
in repository https://gitbox.apache.org/repos/asf/incubator-mesatee-sgx.git


The following commit(s) were added to refs/heads/v1.1.0-beta by this push:
     new 5b5e512  Revert back to box_me_up
5b5e512 is described below

commit 5b5e512abbbfc3030e8cb274989fb372b685b168
Author: Yu Ding <di...@gmail.com>
AuthorDate: Sun Dec 8 22:33:40 2019 -0800

    Revert back to box_me_up
---
 sgx_panic_unwind/lib.rs   | 2 +-
 sgx_tstd/src/panicking.rs | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sgx_panic_unwind/lib.rs b/sgx_panic_unwind/lib.rs
index 2166bb6..a2b9ba4 100644
--- a/sgx_panic_unwind/lib.rs
+++ b/sgx_panic_unwind/lib.rs
@@ -71,5 +71,5 @@ pub unsafe extern "C" fn __rust_maybe_catch_panic(f: fn(*mut u8),
 #[unwind(allowed)]
 pub unsafe extern "C" fn __rust_start_panic(payload: usize) -> u32 {
     let payload = payload as *mut &mut dyn BoxMeUp;
-    imp::panic(Box::from_raw((*payload).take_box()))
+    imp::panic(Box::from_raw((*payload).box_me_up()))
 }
diff --git a/sgx_tstd/src/panicking.rs b/sgx_tstd/src/panicking.rs
index 582bfda..234c23b 100644
--- a/sgx_tstd/src/panicking.rs
+++ b/sgx_tstd/src/panicking.rs
@@ -262,7 +262,7 @@ fn continue_panic_fmt(info: &PanicInfo<'_>) -> ! {
     }
 
     unsafe impl<'a> BoxMeUp for PanicPayload<'a> {
-        fn take_box(&mut self) -> *mut (dyn Any + Send) {
+        fn box_me_up(&mut self) -> *mut (dyn Any + Send) {
             let contents = mem::take(self.fill());
             Box::into_raw(Box::new(contents))
         }
@@ -310,7 +310,7 @@ pub fn begin_panic<M: Any + Send>(msg: M, file_line_col: &(&'static str, u32, u3
     }
 
     unsafe impl<A: Send + 'static> BoxMeUp for PanicPayload<A> {
-        fn take_box(&mut self) -> *mut (dyn Any + Send) {
+        fn box_me_up(&mut self) -> *mut (dyn Any + Send) {
             let data = match self.inner.take() {
                 Some(a) => Box::new(a) as Box<dyn Any + Send>,
                 None => Box::new(()),
@@ -380,7 +380,7 @@ pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! {
     struct RewrapBox(Box<dyn Any + Send>);
 
     unsafe impl BoxMeUp for RewrapBox {
-        fn take_box(&mut self) -> *mut (dyn Any + Send) {
+        fn box_me_up(&mut self) -> *mut (dyn Any + Send) {
             Box::into_raw(mem::replace(&mut self.0, Box::new(())))
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@mesatee.apache.org
For additional commands, e-mail: commits-help@mesatee.apache.org