コード例 #1
0
ファイル: CFError.c プロジェクト: cooljeanius/opencflite-code
CFStringRef CFErrorCopyRecoverySuggestion(CFErrorRef err) {
    if (CF_IS_OBJC(__kCFErrorTypeID, err)) {  // Since we have to return a retained result, we need to treat the toll-free bridging specially
        CFStringRef str;
        CF_OBJC_CALL0(CFStringRef, str, err, "localizedRecoverySuggestion");
        return str ? (CFStringRef)CFRetain(str) : NULL;    // It's possible for localizedRecoverySuggestion to return nil
    }
    __CFAssertIsError(err);
    return _CFErrorCreateLocalizedRecoverySuggestion(err);
}
コード例 #2
0
ファイル: CFError.c プロジェクト: DmitrySkiba/itoa-cleancf
CFStringRef CFErrorCopyRecoverySuggestion(CFErrorRef err) {
    if (CF_IS_OBJC(err)) {
        // Since we have to return a retained result, 
        //  we need to treat the toll-free bridging specially.
        CFStringRef str;
        CF_OBJC_CALL(CFStringRef, str, err, "localizedRecoverySuggestion");
        // It's possible for localizedRecoverySuggestion to return nil.
        return str ? (CFStringRef)CFRetain(str) : NULL;
    }
    CF_VALIDATE_ERROR_ARG(err);
    return _CFErrorCreateLocalizedRecoverySuggestion(err);
}