Fix some invalid msg_send! usage (#2138)
* Fix some invalid msg_send! usage * Make the implementation of superclass clearer
This commit is contained in:
parent
8af222c1e3
commit
2a2abc4843
9 changed files with 53 additions and 45 deletions
|
|
@ -62,7 +62,8 @@
|
|||
// window size/position.
|
||||
macro_rules! assert_main_thread {
|
||||
($($t:tt)*) => {
|
||||
if !msg_send![class!(NSThread), isMainThread] {
|
||||
let is_main_thread: ::objc::runtime::BOOL = msg_send!(class!(NSThread), isMainThread);
|
||||
if is_main_thread == ::objc::runtime::NO {
|
||||
panic!($($t)*);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue