@@ -141,10 +141,11 @@ impl NSValue {
141
141
pub fn get_point ( & self ) -> Option < NSPoint > {
142
142
if self . contains_encoding :: < NSPoint > ( ) {
143
143
// SAFETY: We just checked that this contains an NSPoint
144
- #[ cfg( any( feature = "gnustep-1-7" , target_os = "macos" ) ) ]
144
+ //
145
+ // Note: The documentation says that `pointValue`, `sizeValue` and
146
+ // `rectValue` is only available on macOS, but turns out that they
147
+ // are actually available everywhere!
145
148
let res = unsafe { msg_send ! [ self , pointValue] } ;
146
- #[ cfg( all( feature = "apple" , not( target_os = "macos" ) ) ) ]
147
- let res = unsafe { msg_send ! [ self , CGPointValue ] } ;
148
149
Some ( res)
149
150
} else {
150
151
None
@@ -154,10 +155,7 @@ impl NSValue {
154
155
pub fn get_size ( & self ) -> Option < NSSize > {
155
156
if self . contains_encoding :: < NSSize > ( ) {
156
157
// SAFETY: We just checked that this contains an NSSize
157
- #[ cfg( any( feature = "gnustep-1-7" , target_os = "macos" ) ) ]
158
158
let res = unsafe { msg_send ! [ self , sizeValue] } ;
159
- #[ cfg( all( feature = "apple" , not( target_os = "macos" ) ) ) ]
160
- let res = unsafe { msg_send ! [ self , CGSizeValue ] } ;
161
159
Some ( res)
162
160
} else {
163
161
None
@@ -167,10 +165,7 @@ impl NSValue {
167
165
pub fn get_rect ( & self ) -> Option < NSRect > {
168
166
if self . contains_encoding :: < NSRect > ( ) {
169
167
// SAFETY: We just checked that this contains an NSRect
170
- #[ cfg( any( feature = "gnustep-1-7" , target_os = "macos" ) ) ]
171
168
let res = unsafe { msg_send ! [ self , rectValue] } ;
172
- #[ cfg( all( feature = "apple" , not( target_os = "macos" ) ) ) ]
173
- let res = unsafe { msg_send ! [ self , CGRectValue ] } ;
174
169
Some ( res)
175
170
} else {
176
171
None
0 commit comments