Add the equivalent of #276 and #277 to define_class!.
Effectively the implementation is:
// Result<(), Retained<NSError>> -> Bool
match res {
Ok(()) => Bool::YES,
Err(err) => {
// Intentionally not objc_autoreleaseReturnValue, since the optimization that enables will not be able to kick in
*__err_param = objc_autorelease(err);
Bool::NO
},
}
// Result<Retained<T, O>, Retained<NSError>> -> *mut T
match res {
Ok(obj) => obj.release_according_to_memory_management_rules(sel), // See #282
Err(err) => {
// Intentionally not objc_autoreleaseReturnValue
*__err_param = objc_autorelease(err);
ptr::null_mut()
},
}
See #277 (comment) for further ABI details.
Add the equivalent of #276 and #277 to
define_class!.Effectively the implementation is:
See #277 (comment) for further ABI details.