コード例 #1
0
ファイル: CFData.c プロジェクト: Ibadinov/gnustep-corebase
CFIndex
CFDataGetLength (CFDataRef d)
{
  CF_OBJC_FUNCDISPATCH0(_kCFDataTypeID, CFIndex, d, "length");
  
  return d->_length;
}
コード例 #2
0
ファイル: CFSet.c プロジェクト: crwulff/gnustep-corebase
CFIndex
CFSetGetCount (CFSetRef set)
{
  CF_OBJC_FUNCDISPATCH0(_kCFSetTypeID, CFIndex, set, "count");
  
  return GSHashTableGetCount ((GSHashTableRef)set);
}
コード例 #3
0
ファイル: CFSet.c プロジェクト: crwulff/gnustep-corebase
CFSetRef
CFSetCreateCopy (CFAllocatorRef allocator, CFSetRef set)
{
  CF_OBJC_FUNCDISPATCH0(_kCFSetTypeID, CFSetRef, set,
    "copy");
  
  return (CFSetRef)GSHashTableCreateCopy (allocator, (GSHashTableRef)set);
}
コード例 #4
0
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;
}
コード例 #5
0
ファイル: CFSet.c プロジェクト: crwulff/gnustep-corebase
CFMutableSetRef
CFSetCreateMutableCopy (CFAllocatorRef allocator, CFIndex capacity,
  CFSetRef set)
{
  CF_OBJC_FUNCDISPATCH0(_kCFSetTypeID, CFMutableSetRef, set,
    "copy");
  
  return (CFMutableSetRef)GSHashTableCreateMutableCopy (allocator,
    (GSHashTableRef)set, capacity);
}
コード例 #6
0
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;
}
コード例 #7
0
ファイル: CFError.c プロジェクト: cooljeanius/opencflite-code
/* 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;
}
コード例 #8
0
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;
}
コード例 #9
0
CFTimeZoneRef CFCalendarCopyTimeZone(CFCalendarRef calendar) {
    CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFTimeZoneRef, calendar, "_copyTimeZone");
    __CFGenericValidateType(calendar, CFCalendarGetTypeID());
    return (CFTimeZoneRef)CFRetain(calendar->_tz);
}
コード例 #10
0
CFLocaleRef CFCalendarCopyLocale(CFCalendarRef calendar) {
    CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFLocaleRef, calendar, "_copyLocale");
    __CFGenericValidateType(calendar, CFCalendarGetTypeID());
    return (CFLocaleRef)CFLocaleCreate(kCFAllocatorSystemDefault, calendar->_localeID);
}
コード例 #11
0
ファイル: CFLocale.c プロジェクト: AbhinavBansal/opencflite
CFStringRef CFLocaleGetIdentifier(CFLocaleRef locale) {
    CF_OBJC_FUNCDISPATCH0(CFLocaleGetTypeID(), CFStringRef, locale, "localeIdentifier");
    return locale->_identifier;
}
コード例 #12
0
ファイル: CFSet.c プロジェクト: 0x4d52/JavaScriptCore-X
CFIndex CFSetGetCount(CFSetRef set) {
    CF_OBJC_FUNCDISPATCH0(__kCFSetTypeID, CFIndex, set, "count");
    __CFGenericValidateType(set, __kCFSetTypeID);
    return set->_count;
}
コード例 #13
0
ファイル: CFData.c プロジェクト: reporter123/corefoundation
CFIndex CFDataGetLength(CFDataRef data) {
    CF_OBJC_FUNCDISPATCH0(__kCFDataTypeID, CFIndex, data, "length");
    __CFGenericValidateType(data, __kCFDataTypeID);
    return __CFDataLength(data);
}
コード例 #14
0
ファイル: CFError.c プロジェクト: cooljeanius/opencflite-code
CFStringRef CFErrorGetDomain(CFErrorRef err) {
    CF_OBJC_FUNCDISPATCH0(__kCFErrorTypeID, CFStringRef, err, "domain");
    __CFAssertIsError(err);
    return err->domain;
}
コード例 #15
0
CFStringRef CFCalendarGetIdentifier(CFCalendarRef calendar) {
    CF_OBJC_FUNCDISPATCH0(CFCalendarGetTypeID(), CFStringRef, calendar, "calendarIdentifier");
    __CFGenericValidateType(calendar, CFCalendarGetTypeID());
    return calendar->_identifier;
}
コード例 #16
0
ファイル: CFError.c プロジェクト: cooljeanius/opencflite-code
CFIndex CFErrorGetCode(CFErrorRef err) {
    CF_OBJC_FUNCDISPATCH0(__kCFErrorTypeID, CFIndex, err, "code");
    __CFAssertIsError(err);
    return err->code;
}
コード例 #17
0
ファイル: CFArray.c プロジェクト: cooljeanius/opencflite-code
CFIndex CFArrayGetCount(CFArrayRef array) {
    CF_OBJC_FUNCDISPATCH0(__kCFArrayTypeID, CFIndex, array, "count");
    __CFGenericValidateType(array, __kCFArrayTypeID);
    CHECK_FOR_MUTATION(array);
    return __CFArrayGetCount(array);
}