This commit is contained in:
Andrew Hyatt 2018-12-16 21:45:18 -05:00
parent 2589fd01cd
commit b0c889808f
3 changed files with 7 additions and 7 deletions

View File

@ -365,7 +365,7 @@ static CFStringRef __CFAttributedStringCopyDescription(CFTypeRef cf)
CFStringAppendFormat(out, NULL, CFSTR("%@ %@ Len %d\n\n"),
substr,
inp->_dictionary,
inp->_range.length);
(int)inp->_range.length);
CFRelease(substr);
}
else

View File

@ -459,7 +459,7 @@ static _CFBundleFileVersion _CFBundleCheckFileProductAndPlatform(CFStringRef fil
if (CFStringFindWithOptions(file, CFSTR("~"), searchRange, 0, NULL)) {
if (CFStringGetLength(product) != 1) {
// todo: really, search the same range again?
if (CFStringFindWithOptions(file, product, searchRange, kCFCompareEqualTo, NULL)) {
if (CFStringFindWithOptions(file, product, searchRange, 0, NULL)) {
foundprod = YES;
}
}
@ -469,7 +469,7 @@ static _CFBundleFileVersion _CFBundleCheckFileProductAndPlatform(CFStringRef fil
}
if (!wrong && CFStringFindWithOptions(file, CFSTR("-"), searchRange, 0, NULL)) {
if (CFStringFindWithOptions(file, platform, searchRange, kCFCompareEqualTo, NULL)) {
if (CFStringFindWithOptions(file, platform, searchRange, 0, NULL)) {
foundplat = YES;
}
if (!foundplat) {
@ -1006,17 +1006,17 @@ static CFTypeRef _CFBundleCopyURLsOfKey(CFBundleRef bundle, CFURLRef bundleURL,
// if we have subdir, we find the subdir and see if it is after the base path (bundle path + res dir)
Boolean searchForLocalization = false;
if (subDir && CFStringGetLength(subDir) > 0) {
if (CFStringFindWithOptions(pathValue, subDir, searchRange, kCFCompareEqualTo, &resultRange) && resultRange.location != searchRange.location) {
if (CFStringFindWithOptions(pathValue, subDir, searchRange, 0, &resultRange) && resultRange.location != searchRange.location) {
searchForLocalization = true;
}
} else if (!(subDir && CFStringGetLength(subDir) > 0) && searchRange.length != 0) {
if (CFStringFindWithOptions(pathValue, _CFBundleLprojExtensionWithDot, searchRange, kCFCompareEqualTo, &resultRange) && resultRange.location + 7 < pathValueLen) {
if (CFStringFindWithOptions(pathValue, _CFBundleLprojExtensionWithDot, searchRange, 0, &resultRange) && resultRange.location + 7 < pathValueLen) {
searchForLocalization = true;
}
}
if (searchForLocalization) {
if (!lpLen || !(CFStringFindWithOptions(pathValue, lproj, searchRange, kCFCompareEqualTo | kCFCompareAnchored, &resultRange) && CFStringFindWithOptions(pathValue, CFSTR("."), CFRangeMake(resultRange.location + resultRange.length, 1), kCFCompareEqualTo, &resultRange))) {
if (!lpLen || !(CFStringFindWithOptions(pathValue, lproj, searchRange, kCFCompareAnchored, &resultRange) && CFStringFindWithOptions(pathValue, CFSTR("."), CFRangeMake(resultRange.location + resultRange.length, 1), 0, &resultRange))) {
break;
}
checkLP = false;

View File

@ -473,7 +473,7 @@ CF_INLINE size_t auto_zone_size(void *zone, const void *ptr) { return 0; }
CF_INLINE void auto_register_weak_reference(void *zone, const void *referent, void **referrer, uintptr_t *counter, void **listHead, void **listElement) {}
CF_INLINE void auto_unregister_weak_reference(void *zone, const void *referent, void **referrer) {}
CF_INLINE int auto_zone_is_valid_pointer(void *zone, const void *ptr) { return 0; }
CF_INLINE BOOL objc_isAuto(id object) { return 0; }
//CF_INLINE BOOL objc_isAuto(id object) { return 0; }
CF_INLINE void* auto_read_weak_reference(void *zone, void **referrer) { void *result = *referrer; return result; }
CF_INLINE void auto_assign_weak_reference(void *zone, const void *value, const void **location, auto_weak_callback_block_t *block) { *location = (void *)value; }
CF_INLINE auto_memory_type_t auto_zone_get_layout_type(void *zone, void *ptr) { return AUTO_UNSCANNED; }