Revision: 28632
          http://sourceforge.net/p/bibdesk/svn/28632
Author:   hofman
Date:     2024-01-19 17:50:18 +0000 (Fri, 19 Jan 2024)
Log Message:
-----------
Add some more bridge calls

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAccessibilityIconElement.h
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVFullScreenContentView.h

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAccessibilityIconElement.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAccessibilityIconElement.h      
2024-01-19 16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVAccessibilityIconElement.h      
2024-01-19 17:50:18 UTC (rev 28632)
@@ -41,7 +41,7 @@
 
 @interface FVAccessibilityIconElement : NSObject {
     NSUInteger _index;
-    id _parent;
+    __weak id _parent;
 }
 - (id)initWithIndex:(NSUInteger)anIndex parent:(id)aParent;
 @property (nonatomic, readonly) NSUInteger index;

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm    2024-01-19 
16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm    2024-01-19 
17:50:18 UTC (rev 28632)
@@ -146,7 +146,7 @@
         if (-1 != _fileDescriptor) {
             fcntl(_fileDescriptor, F_NOCACHE, 1);
 
-            _path = (NSString 
*)CFStringCreateWithFileSystemRepresentation(NULL, tempName);
+            _path = [(NSString 
*)CFBridgingRelease(CFStringCreateWithFileSystemRepresentation(NULL, tempName)) 
retain];
             FVAPIAssert1(FVCanMapFileAtURL([NSURL fileURLWithPath:_path]), 
@"%@ is not safe for mmap()", _path);
 
             // Unlink the file immediately so we don't leave turds when the 
program crashes.
@@ -448,7 +448,7 @@
             NSParameterAssert(strm.total_out == location->_decompressedLength);
             
             // transfer ownership to NSData in order to avoid copying
-            data = (id)CFDataCreateWithBytesNoCopy(FVAllocatorGetDefault(), 
(const uint8_t *)bytes, location->_decompressedLength, FVAllocatorGetDefault());
+            data = 
[(id)CFBridgingRelease(CFDataCreateWithBytesNoCopy(FVAllocatorGetDefault(), 
(const uint8_t *)bytes, location->_decompressedLength, 
FVAllocatorGetDefault())) retain];
         }
         else {
             FVLog(@"Unable to malloc %ld bytes in -[FVCacheFile 
copyDataForKey:] with key %@", (unsigned long)location->_decompressedLength, 
aKey);

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m        
2024-01-19 16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVConcreteOperationQueue.m        
2024-01-19 17:50:18 UTC (rev 28632)
@@ -303,7 +303,7 @@
         [_threadLock lockWhenCondition:QUEUE_STARTUP];
         
         // pass the queue as info, but don't retain/release it since it will 
outlive the source
-        CFRunLoopSourceContext1 context = { 1, self, NULL, NULL, NULL, NULL, 
NULL, __FVGetQueuePort, __FVQueueMachPerform };
+        CFRunLoopSourceContext1 context = { 1, (__bridge void *)self, NULL, 
NULL, NULL, NULL, NULL, __FVGetQueuePort, __FVQueueMachPerform };
         _threadPort = __FVPortAllocate();
         
         // CFRunLoop dies if this happens, so do the same

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m    2024-01-19 
16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m    2024-01-19 
17:50:18 UTC (rev 28632)
@@ -66,7 +66,7 @@
     
     // rdar://problem/6028378 .savedSearch files have a dynamic UTI that does 
not conform to the UTI for a saved search
     
-    CFStringRef extension = (CFStringRef)[[aURL path] pathExtension];
+    CFStringRef extension = (__bridge CFStringRef)[[aURL path] pathExtension];
     CFStringRef UTIFromExtension = 
UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extension, 
NULL);
     BOOL isSavedSearch = NO;
     if (NULL != UTIFromExtension) {
@@ -122,7 +122,7 @@
 + (id)sharedSavedSearchIcon {
     static id savedSearchIcon = nil;
     if (nil == savedSearchIcon) {
-        NSString *type = 
[(id)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, 
FVSTR("savedSearch"), NULL) autorelease];
+        NSString *type = 
CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,
 FVSTR("savedSearch"), NULL));
         savedSearchIcon = (id)[[FVSharedFinderIcon alloc] initWithType:type 
badgeType:nil];
     }
     return savedSearchIcon;

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m  2024-01-19 16:45:49 UTC 
(rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m  2024-01-19 17:50:18 UTC 
(rev 28632)
@@ -143,7 +143,7 @@
 
 @implementation FVPlaceholderIcon
 
-- (id)retain { return self; }
+/*- (id)retain { return self; }
 
 - (id)autorelease { return self; }
 
@@ -150,6 +150,7 @@
 - (oneway void)release {}
 
 - (NSUInteger)retainCount { return NSUIntegerMax; }
+ */
 
 - (id)initWithURL:(NSURL *)representedURL;
 {

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m     2024-01-19 
16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m     2024-01-19 
17:50:18 UTC (rev 28632)
@@ -62,7 +62,7 @@
     
     static NSArray *types = nil;
     if (types == nil) {
-        types = (NSArray *)CGImageSourceCopyTypeIdentifiers();
+        types = [(NSArray 
*)CFBridgingRelease(CGImageSourceCopyTypeIdentifiers()) retain];
     }
     
     return [types containsObject:type];
@@ -135,11 +135,11 @@
 // if isFullSize is set to YES, the result can be used for _fullImage without 
resampling
 - (CGImageRef)_copySourceImageAtFullSize:(BOOL *)isFullSize {
     CGImageRef image = NULL;
-    CFDataRef imageData = (CFDataRef)[[NSData allocWithZone:FVDefaultZone()] 
initWithContentsOfURL:_fileURL options:NSUncachedRead error:NULL];
+    NSData *imageData = [[NSData allocWithZone:FVDefaultZone()] 
initWithContentsOfURL:_fileURL options:NSUncachedRead error:NULL];
 
     if (imageData) {
-        CGImageSourceRef src = CGImageSourceCreateWithData(imageData, 
_imsrcOptions);
-        CFRelease(imageData);
+        CGImageSourceRef src = CGImageSourceCreateWithData((__bridge 
CFDataRef)imageData, _imsrcOptions);
+        [imageData release];
         if (src) {
             if (CGImageSourceGetCount(src) > 0)
                 image = CGImageSourceCreateImageAtIndex(src, 0, _imsrcOptions);

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m      
2024-01-19 16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMainThreadOperationQueue.m      
2024-01-19 17:50:18 UTC (rev 28632)
@@ -71,7 +71,7 @@
         // running operations
         _activeOperations = [NSMutableSet new];     
         
-        CFRunLoopObserverContext context = { 0, self, NULL, NULL, NULL };
+        CFRunLoopObserverContext context = { 0, (__bridge void *)self, NULL, 
NULL, NULL };
         _observer = CFRunLoopObserverCreate(NULL, kCFRunLoopAllActivities, 
TRUE, 0, __FVProcessSingleEntry, &context);
         CFRunLoopAddCommonMode(CFRunLoopGetMain(), 
(CFStringRef)FVMainQueueRunLoopMode);
         CFRunLoopAddObserver(CFRunLoopGetMain(), _observer, 
(CFStringRef)FVMainQueueRunLoopMode);

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m        
2024-01-19 16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m        
2024-01-19 17:50:18 UTC (rev 28632)
@@ -141,7 +141,8 @@
 }
 #pragma clang diagnostic pop
 
-- (id)retain { return self; }
+/*
+ - (id)retain { return self; }
 
 - (id)autorelease { return self; }
 
@@ -148,5 +149,6 @@
 - (oneway void)release {}
 
 - (NSUInteger)retainCount { return NSUIntegerMax; }
+ */
 
 @end

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVFullScreenContentView.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVFullScreenContentView.h        
2024-01-19 16:45:49 UTC (rev 28631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVFullScreenContentView.h        
2024-01-19 17:50:18 UTC (rev 28632)
@@ -47,7 +47,7 @@
  not in fullscreen mode. */
 @interface _FVFullScreenContentView : NSView
 {
-    FVPreviewer *_windowDelegate;
+    __weak FVPreviewer *_windowDelegate;
 }
 
 @end

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

Reply via email to