Revision: 28553
http://sourceforge.net/p/bibdesk/svn/28553
Author: hofman
Date: 2024-01-05 19:05:26 +0000 (Fri, 05 Jan 2024)
Log Message:
-----------
ignore allocator, use CFBridgingRetain
Modified Paths:
--------------
trunk/bibdesk/NSURL_BDSKExtensions.m
Modified: trunk/bibdesk/NSURL_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSURL_BDSKExtensions.m 2024-01-05 18:47:56 UTC (rev
28552)
+++ trunk/bibdesk/NSURL_BDSKExtensions.m 2024-01-05 19:05:26 UTC (rev
28553)
@@ -54,20 +54,19 @@
- (NSURL *)fileURLByResolvingAliasesStrictly:(BOOL)strict {
NSCParameterAssert([self isFileURL]);
- CFURLRef fileURL = (__bridge CFURLRef)self;
- CFAllocatorRef allocator = CFGetAllocator(self);
+ CFURLRef fileURL;
// make sure we have a file path URL, make sure we have ownership
- if (CFURLIsFileReferenceURL(fileURL))
- fileURL = CFURLCreateFilePathURL(allocator, fileURL, NULL);
+ if ([self isFileReferenceURL])
+ fileURL = CFURLCreateFilePathURL(kCFAllocatorDefault, (__bridge
CFURLRef)self, NULL);
else
- fileURL = CFRetain(fileURL);
+ fileURL = CFBridgingRetain(self);
// this happens for invalid file reference URLs
if (fileURL == NULL)
return nil;
- CFMutableArrayRef strippedComponents = CFArrayCreateMutable(allocator, 0,
&kCFTypeArrayCallBacks);
+ CFMutableArrayRef strippedComponents =
CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
CFStringRef lastPathComponent;
// use this to keep a reference to the previous "version" of the file URL,
so we can dispose of it properly
@@ -75,7 +74,7 @@
CFDictionaryRef properties = NULL;
CFStringRef keys[2] = {kCFURLIsAliasFileKey, kCFURLIsSymbolicLinkKey};
- CFArrayRef linkKeys = CFArrayCreate(allocator, (const void **)keys, 2,
&kCFTypeArrayCallBacks);
+ CFArrayRef linkKeys = CFArrayCreate(kCFAllocatorDefault, (const void
**)keys, 2, &kCFTypeArrayCallBacks);
Boolean isAlias = FALSE, isSymLink = FALSE, didResolve = FALSE;
BOOL doesNotExist = NO;
CFDataRef bookmark;
@@ -92,7 +91,7 @@
oldURL = fileURL;
NSCParameterAssert(oldURL);
- fileURL = CFURLCreateCopyDeletingLastPathComponent(allocator, fileURL);
+ fileURL =
CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault, fileURL);
CFRelease(oldURL);
}
@@ -126,9 +125,9 @@
if (fileURL == NULL) break;
} else if (isAlias) {
- bookmark = CFURLCreateBookmarkDataFromFile(allocator, fileURL,
NULL);
+ bookmark = CFURLCreateBookmarkDataFromFile(kCFAllocatorDefault,
fileURL, NULL);
CFRelease(fileURL);
- fileURL = bookmark == NULL ? NULL :
CFURLCreateByResolvingBookmarkData(allocator, bookmark, strict ?
kCFBookmarkResolutionWithoutUIMask : 0, NULL, NULL, NULL, NULL);
+ fileURL = bookmark == NULL ? NULL :
CFURLCreateByResolvingBookmarkData(kCFAllocatorDefault, bookmark, strict ?
kCFBookmarkResolutionWithoutUIMask : 0, NULL, NULL, NULL, NULL);
if (fileURL == NULL) break;
@@ -141,7 +140,7 @@
idx--;
oldURL = fileURL;
- fileURL = CFURLCreateCopyAppendingPathComponent(allocator,
fileURL, CFArrayGetValueAtIndex(strippedComponents, idx), idx > 0);
+ fileURL =
CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault, fileURL,
CFArrayGetValueAtIndex(strippedComponents, idx), idx > 0);
CFRelease(oldURL);
}
@@ -165,7 +164,7 @@
if (fileURL != NULL && CFURLIsFileReferenceURL(fileURL)) {
oldURL = fileURL;
- fileURL = CFURLCreateFilePathURL(allocator, fileURL, NULL);
+ fileURL = CFURLCreateFilePathURL(kCFAllocatorDefault, fileURL, NULL);
CFRelease(oldURL);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit