Skip to content

Commit

Permalink
Support super in msg_send_bool
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Apr 3, 2022
1 parent 731f888 commit 47d0bcd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions objc2/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ macro_rules! msg_send {
/// TODO
#[macro_export]
macro_rules! msg_send_bool {
(super($obj:expr, $superclass:expr), $name:ident) => ({
let result: $crate::runtime::Bool = $crate::msg_send!(super($obj, $superclass), $name);
result.as_bool()
});
(super($obj:expr, $superclass:expr), $($name:ident : $arg:expr $(,)?)+) => ({
let result: $crate::runtime::Bool = $crate::msg_send!(super($obj, $superclass), $($name: $arg),+);
result.as_bool()
});
($obj:expr, $name:ident) => ({
let result: $crate::runtime::Bool = $crate::msg_send!($obj, $name);
result.as_bool()
Expand Down

0 comments on commit 47d0bcd

Please sign in to comment.