Skip to content

Commit 3737c04

Browse files
committed
ObjFW message support (WIP)
1 parent e205a2e commit 3737c04

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

objc-sys/src/message.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//!
55
//! TODO: Some of these are only supported on _some_ GNUStep targets!
66
use crate::{objc_class, objc_object};
7-
#[cfg(gnustep)]
7+
#[cfg(any(gnustep, objfw))]
88
use crate::{objc_selector, IMP};
99

1010
/// Specifies data used when sending messages to superclasses.
@@ -21,10 +21,14 @@ pub struct objc_super {
2121
}
2222

2323
extern_c! {
24-
#[cfg(gnustep)]
24+
#[cfg(any(gnustep, objfw))]
2525
pub fn objc_msg_lookup(receiver: *mut objc_object, sel: *const objc_selector) -> IMP;
26-
#[cfg(gnustep)]
26+
#[cfg(objfw)]
27+
pub fn objc_msg_lookup_stret(receiver: *mut objc_object, sel: *const objc_selector) -> IMP;
28+
#[cfg(any(gnustep, objfw))]
2729
pub fn objc_msg_lookup_super(sup: *const objc_super, sel: *const objc_selector) -> IMP;
30+
#[cfg(objfw)]
31+
pub fn objc_msg_lookup_super_stret(sup: *const objc_super, sel: *const objc_selector) -> IMP;
2832
// #[cfg(gnustep)]
2933
// objc_msg_lookup_sender
3034
// objc_msgLookup family available in macOS >= 10.12

objc2/src/message/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ mod verify;
3333
#[cfg(apple)]
3434
#[path = "apple/mod.rs"]
3535
mod platform;
36-
#[cfg(gnustep)]
36+
// TODO: This is _not_ correct, struct return works differently!
37+
#[cfg(any(gnustep, objfw))]
3738
#[path = "gnustep.rs"]
3839
mod platform;
3940

0 commit comments

Comments
 (0)