CFIndex CFDataGetLength (CFDataRef d) { CF_OBJC_FUNCDISPATCH0(_kCFDataTypeID, CFIndex, d, "length"); return d->_length; }
CFIndex CFSetGetCount (CFSetRef set) { CF_OBJC_FUNCDISPATCH0(_kCFSetTypeID, CFIndex, set, "count"); return GSHashTableGetCount ((GSHashTableRef)set); }
CFSetRef CFSetCreateCopy (CFAllocatorRef allocator, CFSetRef set) { CF_OBJC_FUNCDISPATCH0(_kCFSetTypeID, CFSetRef, set, "copy"); return (CFSetRef)GSHashTableCreateCopy (allocator, (GSHashTableRef)set); }
CFIndex CFCalendarGetFirstWeekday(CFCalendarRef calendar) { CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFIndex, calendar, "firstWeekday"); __CFGenericValidateType(calendar, CFCalendarGetTypeID()); if (!calendar->_cal) __CFCalendarSetupCal(calendar); if (calendar->_cal) { return ucal_getAttribute(calendar->_cal, UCAL_FIRST_DAY_OF_WEEK); } return -1; }
CFMutableSetRef CFSetCreateMutableCopy (CFAllocatorRef allocator, CFIndex capacity, CFSetRef set) { CF_OBJC_FUNCDISPATCH0(_kCFSetTypeID, CFMutableSetRef, set, "copy"); return (CFMutableSetRef)GSHashTableCreateMutableCopy (allocator, (GSHashTableRef)set, capacity); }
CFDateRef CFCalendarCopyGregorianStartDate(CFCalendarRef calendar) { CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFDateRef, calendar, "_gregorianStartDate"); __CFGenericValidateType(calendar, CFCalendarGetTypeID()); if (!calendar->_cal) __CFCalendarSetupCal(calendar); UErrorCode status = U_ZERO_ERROR; UDate udate = calendar->_cal ? ucal_getGregorianChange(calendar->_cal, &status) : 0; if (calendar->_cal && U_SUCCESS(status)) { CFAbsoluteTime at = (double)udate / 1000.0 - kCFAbsoluteTimeIntervalSince1970; return CFDateCreate(CFGetAllocator(calendar), at); } return NULL; }
/* A non-retained accessor for the userInfo. Might return NULL in some cases, if the subclass of NSError returned nil for some reason. It works with a CF or NSError. */ static CFDictionaryRef _CFErrorGetUserInfo(CFErrorRef err) { CF_OBJC_FUNCDISPATCH0(__kCFErrorTypeID, CFDictionaryRef, err, "userInfo"); __CFAssertIsError(err); return err->userInfo; }
CFIndex CFCalendarGetMinimumDaysInFirstWeek(CFCalendarRef calendar) { CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFIndex, calendar, "minimumDaysInFirstWeek"); __CFGenericValidateType(calendar, CFCalendarGetTypeID()); if (!calendar->_cal) __CFCalendarSetupCal(calendar); return calendar->_cal ? ucal_getAttribute(calendar->_cal, UCAL_MINIMAL_DAYS_IN_FIRST_WEEK) : -1; }
CFTimeZoneRef CFCalendarCopyTimeZone(CFCalendarRef calendar) { CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFTimeZoneRef, calendar, "_copyTimeZone"); __CFGenericValidateType(calendar, CFCalendarGetTypeID()); return (CFTimeZoneRef)CFRetain(calendar->_tz); }
CFLocaleRef CFCalendarCopyLocale(CFCalendarRef calendar) { CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFLocaleRef, calendar, "_copyLocale"); __CFGenericValidateType(calendar, CFCalendarGetTypeID()); return (CFLocaleRef)CFLocaleCreate(kCFAllocatorSystemDefault, calendar->_localeID); }
CFStringRef CFLocaleGetIdentifier(CFLocaleRef locale) { CF_OBJC_FUNCDISPATCH0(CFLocaleGetTypeID(), CFStringRef, locale, "localeIdentifier"); return locale->_identifier; }
CFIndex CFSetGetCount(CFSetRef set) { CF_OBJC_FUNCDISPATCH0(__kCFSetTypeID, CFIndex, set, "count"); __CFGenericValidateType(set, __kCFSetTypeID); return set->_count; }
CFIndex CFDataGetLength(CFDataRef data) { CF_OBJC_FUNCDISPATCH0(__kCFDataTypeID, CFIndex, data, "length"); __CFGenericValidateType(data, __kCFDataTypeID); return __CFDataLength(data); }
CFStringRef CFErrorGetDomain(CFErrorRef err) { CF_OBJC_FUNCDISPATCH0(__kCFErrorTypeID, CFStringRef, err, "domain"); __CFAssertIsError(err); return err->domain; }
CFStringRef CFCalendarGetIdentifier(CFCalendarRef calendar) { CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFStringRef, calendar, "calendarIdentifier"); __CFGenericValidateType(calendar, CFCalendarGetTypeID()); return calendar->_identifier; }
CFIndex CFErrorGetCode(CFErrorRef err) { CF_OBJC_FUNCDISPATCH0(__kCFErrorTypeID, CFIndex, err, "code"); __CFAssertIsError(err); return err->code; }
CFIndex CFArrayGetCount(CFArrayRef array) { CF_OBJC_FUNCDISPATCH0(__kCFArrayTypeID, CFIndex, array, "count"); __CFGenericValidateType(array, __kCFArrayTypeID); CHECK_FOR_MUTATION(array); return __CFArrayGetCount(array); }