Revision: 28634
          http://sourceforge.net/p/bibdesk/svn/28634
Author:   hofman
Date:     2024-01-20 16:03:45 +0000 (Sat, 20 Jan 2024)
Log Message:
-----------
Don't use NSZone. It will be ignored anyway.

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.h
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m 2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVBitmapContext.m 2024-01-20 
16:03:45 UTC (rev 28634)
@@ -71,7 +71,7 @@
 
 + (FVBitmapContext *)bitmapContextWithSize:(NSSize)pixelSize;
 {
-    return [[[self allocWithZone:[self zone]] initPixelsWide:pixelSize.width 
pixelsHigh:pixelSize.height] autorelease];
+    return [[[self alloc] initPixelsWide:pixelSize.width 
pixelsHigh:pixelSize.height] autorelease];
 }
 
 - (void)dealloc

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m       
2024-01-19 18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m       
2024-01-20 16:03:45 UTC (rev 28634)
@@ -68,7 +68,7 @@
              */
             _colorTableCount = CGColorSpaceGetColorTableCount(colorSpace);
             _colorTableLength = _colorTableCount * _baseColorSpaceComponents;
-            _colorTable = NSZoneCalloc([self zone], _colorTableLength, 
sizeof(unsigned char));
+            _colorTable = NSZoneCalloc(NULL, _colorTableLength, 
sizeof(unsigned char));
             CGColorSpaceGetColorTable(colorSpace, _colorTable);
         }
 #if 0
@@ -83,7 +83,7 @@
 
 - (void)dealloc
 {
-    NSZoneFree([self zone], _colorTable);
+    NSZoneFree(NULL, _colorTable);
     [super dealloc];
 }
 
@@ -175,7 +175,7 @@
             NSUInteger len;
             const void *colorTable = [aDecoder 
decodeBytesForKey:@"_colorTable" returnedLength:&len];
             NSParameterAssert(len == _colorTableLength);
-            _colorTable = NSZoneCalloc([self zone], _colorTableLength, 
sizeof(unsigned char));
+            _colorTable = NSZoneCalloc(NULL, _colorTableLength, 
sizeof(unsigned char));
             memcpy(_colorTable, colorTable, _colorTableLength * 
sizeof(unsigned char));
         }
         else {
@@ -188,7 +188,7 @@
             NSUInteger len;
             const void *colorTable = [aDecoder 
decodeBytesWithReturnedLength:&len];
             NSParameterAssert(len == _colorTableLength);
-            _colorTable = NSZoneCalloc([self zone], _colorTableLength, 
sizeof(unsigned char));
+            _colorTable = NSZoneCalloc(NULL, _colorTableLength, 
sizeof(unsigned char));
             memcpy(_colorTable, colorTable, _colorTableLength * 
sizeof(unsigned char));
         }
     }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m  2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageCache.m  2024-01-20 
16:03:45 UTC (rev 28634)
@@ -40,7 +40,6 @@
 #import "FVUtilities.h"
 #import "FVCGImageDescription.h"
 #import "FVCacheFile.h"
-#import "FVAllocator.h"
 
 #import <pthread.h>
 
@@ -184,7 +183,7 @@
         toReturn = CGImageSourceCreateImageAtIndex(imsrc, 0, NULL);
     if (imsrc) CFRelease(imsrc);
 #else
-    NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver 
allocWithZone:FVDefaultZone()] initForReadingWithData:data];
+    NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] 
initForReadingWithData:data];
     // only retained by unarchiver
     FVCGImageDescription *imageDescription = [unarchiver decodeObject];
     toReturn = [imageDescription newImage];
@@ -203,13 +202,13 @@
     if (dest) CFRelease(dest);
 #else
     CFDataRef data = nil;
-    FVCGImageDescription *imageDescription = [[FVCGImageDescription 
allocWithZone:FVDefaultZone()] initWithImage:image];
+    FVCGImageDescription *imageDescription = [[FVCGImageDescription alloc] 
initWithImage:image];
     
     // do not call setLength:, even before writing the archive!
     size_t approximateLength = CGImageGetBytesPerRow(image) * 
CGImageGetHeight(image) + 20 * sizeof(size_t);
-    NSMutableData *mdata = [[NSMutableData allocWithZone:FVDefaultZone()] 
initWithCapacity:approximateLength];
+    NSMutableData *mdata = [[NSMutableData alloc] 
initWithCapacity:approximateLength];
     
-    NSKeyedArchiver *archiver = [[NSKeyedArchiver 
allocWithZone:FVDefaultZone()] initForWritingWithMutableData:mdata];
+    NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] 
initForWritingWithMutableData:mdata];
     [archiver encodeObject:imageDescription];
     [archiver finishEncoding];
     [imageDescription release];

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m    
2024-01-19 18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m    
2024-01-20 16:03:45 UTC (rev 28634)
@@ -64,13 +64,13 @@
         const CGFloat *decode = CGImageGetDecode(_image);
         if (NULL != decode) {
             const size_t decodeLength = _bitsPerPixel / _bitsPerComponent * 2;
-            _decode = NSZoneCalloc([self zone], decodeLength, sizeof(CGFloat));
+            _decode = NSZoneCalloc(NULL, decodeLength, sizeof(CGFloat));
             memcpy(_decode, decode, decodeLength * sizeof(CGFloat));
         }
         else {
             _decode = NULL;
         }
-        _colorSpaceDescription = [[FVCGColorSpaceDescription 
allocWithZone:[self zone]] initWithColorSpace:CGImageGetColorSpace(_image)];
+        _colorSpaceDescription = [[FVCGColorSpaceDescription alloc] 
initWithColorSpace:CGImageGetColorSpace(_image)];
         
         _bitmapPtr = __FVCGImageRetainBytePtr(_image, &_bitmapPtrSize);
         if (NULL == _bitmapPtr) {
@@ -91,7 +91,7 @@
     [_colorSpaceDescription release];
     if (_bitmapData) CFRelease(_bitmapData);
     if (_bitmapPtr) __FVCGImageReleaseBytePtr(_image);
-    NSZoneFree([self zone], _decode);
+    NSZoneFree(NULL, _decode);
     CGImageRelease(_image);
     [super dealloc];
 }
@@ -174,7 +174,7 @@
             NSUInteger len;
             const CGFloat *decode = (CGFloat *)[aDecoder 
decodeBytesForKey:@"_decode" returnedLength:&len];
             if (len > 0) {
-                _decode = NSZoneCalloc([self zone], len, sizeof(char));
+                _decode = NSZoneCalloc(NULL, len, sizeof(char));
                 memcpy(_decode, decode, len);
             }
             else {
@@ -196,7 +196,7 @@
             [aDecoder decodeValueOfObjCType:@encode(size_t) at:&bitmapLength];
             void *data = CFAllocatorAllocate(FVAllocatorGetDefault(), 
bitmapLength * sizeof(char), 0);
             [aDecoder decodeArrayOfObjCType:@encode(char) count:bitmapLength 
at:data];
-            _bitmapData = CFDataCreateWithBytesNoCopy(FVAllocatorGetDefault(), 
data, bitmapLength, FVAllocatorGetDefault());
+            _bitmapData = CFDataCreateWithBytesNoCopy(CFAllocatorGetDefault(), 
data, bitmapLength, FVAllocatorGetDefault());
 
             _image = NULL;
             
@@ -203,7 +203,7 @@
             NSUInteger len;
             const CGFloat *decode = (CGFloat *)[aDecoder 
decodeBytesWithReturnedLength:&len];
             if (len > 0) {
-                _decode = NSZoneCalloc([self zone], len, sizeof(char));
+                _decode = NSZoneCalloc(NULL, len, sizeof(char));
                 memcpy(_decode, decode, len);
             }
             else {

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm    2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCacheFile.mm    2024-01-20 
16:03:45 UTC (rev 28634)
@@ -244,7 +244,7 @@
 - (void)setName:(NSString *)name
 {
     [_cacheName autorelease];
-    _cacheName = [name copyWithZone:[self zone]];
+    _cacheName = [name copy];
 }
 
 - (void)_recordCacheEventWithKey:(_FVCacheKey *)key size:(double)kbytes
@@ -322,9 +322,9 @@
             
             z_stream strm;
             
-            strm.zalloc = (void *(*)(void *, uInt, uInt))NSZoneCalloc;
-            strm.zfree = (void (*)(void *, void *))NSZoneFree;
-            strm.opaque = FVDefaultZone();
+            strm.zalloc = Z_NULL;
+            strm.zfree = Z_NULL;
+            strm.opaque = Z_NULL;
             strm.total_out = 0;
             strm.next_in = (Bytef *)[data bytes];
             strm.avail_in = location->_decompressedLength;
@@ -403,9 +403,9 @@
             z_stream strm;
             strm.avail_in = ZLIB_BUFFER_SIZE;
             strm.total_out = 0;
-            strm.zalloc = (void *(*)(void *, uInt, uInt))NSZoneCalloc;
-            strm.zfree = (void (*)(void *, void *))NSZoneFree;
-            strm.opaque = FVDefaultZone();
+            strm.zalloc = Z_NULL;
+            strm.zfree = Z_NULL;
+            strm.opaque = Z_NULL;
             
             (void) inflateInit(&strm);
             
@@ -448,7 +448,7 @@
             NSParameterAssert(strm.total_out == location->_decompressedLength);
             
             // transfer ownership to NSData in order to avoid copying
-            data = 
[(id)CFBridgingRelease(CFDataCreateWithBytesNoCopy(FVAllocatorGetDefault(), 
(const uint8_t *)bytes, location->_decompressedLength, 
FVAllocatorGetDefault())) retain];
+            data = 
[(id)CFBridgingRelease(CFDataCreateWithBytesNoCopy(CFAllocatorGetDefault(), 
(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);
@@ -477,7 +477,7 @@
 
 + (id)newWithURL:(NSURL *)aURL
 {
-    return [[self allocWithZone:[self zone]] initWithURL:aURL];
+    return [[self alloc] initWithURL:aURL];
 }
 
 - (id)initWithURL:(NSURL *)aURL
@@ -536,7 +536,7 @@
 
 - (id)copyWithZone:(NSZone *)aZone
 {
-    return NSShouldRetainWithZone(self, aZone) ? [self retain] : [[[self 
class] allocWithZone:aZone] initWithURL:_URL];
+    return [self retain];
 }
 
 - (BOOL)isEqual:(_FVCacheKey *)other

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.h 2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.h 2024-01-20 
16:03:45 UTC (rev 28634)
@@ -44,7 +44,7 @@
  
  FVColorMenuView provides an NSView subclass that is a close approximation of 
the Finder label color control.  Presently it's only available directly in 
code, but is easy to set up in code:
  @code
- NSMenuItem *anItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] 
initWithTitle:@"Finder Label" 
+ NSMenuItem *anItem = [[NSMenuItem alloc] initWithTitle:@"Finder Label" 
                                                                            
action:@selector(changeFinderLabel:)
                                                                     
keyEquivalent:@""];
  FVColorMenuView *menuView = [FVColorMenuView menuView];

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m      2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVDownload.m      2024-01-20 
16:03:45 UTC (rev 28634)
@@ -66,7 +66,7 @@
     NSParameterAssert(NSNotFound != indexInView);
     self = [super init];
     if (self) {
-        _downloadURL = [aURL copyWithZone:[self zone]];
+        _downloadURL = [aURL copy];
         _indexInView = indexInView;
         _replace = replace;
         _fileURL = nil;

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2024-01-20 
16:03:45 UTC (rev 28634)
@@ -884,7 +884,7 @@
 {
     _FVURLInfo *info = [(__bridge id)_infoTable objectForKey:aURL];
     if (nil == info) {
-        info = [[_FVURLInfo allocWithZone:[self zone]] initWithURL:aURL];
+        info = [[_FVURLInfo alloc] initWithURL:aURL];
         CFDictionarySetValue(_infoTable, (__bridge CFURLRef)aURL, (__bridge 
void *)info);
         [info release];
     }
@@ -908,7 +908,7 @@
     
     // still no icon, so make a new one and cache it
     if (nil == icon) {
-        icon = [[FVIcon allocWithZone:NULL] initWithURL:aURL];
+        icon = [[FVIcon alloc] initWithURL:aURL];
         [_iconCache setObject:icon forKey:aURL];
         [icon release];
     }
@@ -4148,7 +4148,7 @@
             [anItem setView:view];
         }
         else {
-            NSMenu *submenu = [[NSMenu allocWithZone:[sharedMenu zone]] 
initWithTitle:@""];
+            NSMenu *submenu = [[NSMenu alloc] initWithTitle:@""];
             [anItem setSubmenu:submenu];
             [submenu release];
             addFinderLabelsToSubmenu(submenu);
@@ -4848,7 +4848,7 @@
             [aURL getResourceValue:&name forKey:NSURLLocalizedNameKey 
error:NULL];
             if (name == nil)
                 _name = [[aURL path] lastPathComponent];
-                _name = [name copyWithZone:[self zone]];
+                _name = [name copy];
         } else {
             NSString *name = [aURL absoluteString];
             NSRange range = [name rangeOfString:@"://"];
@@ -4855,9 +4855,9 @@
             if (range.location != NSNotFound)
                 name = [name substringFromIndex:NSMaxRange(range)];
 #if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MIN_REQUIRED >= 
MAC_OS_X_VERSION_10_9
-            _name = [[name stringByRemovingPercentEncoding] copyWithZone:[self 
zone]];
+            _name = [[name stringByRemovingPercentEncoding] copy];
 #else
-            _name = [[name 
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] 
copyWithZone:[self zone]];
+            _name = [[name 
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] copy];
 #endif
         }
         _label = [FVFinderLabel finderLabelForURL:aURL];
@@ -4946,7 +4946,7 @@
 
 + (id)newWithURL:(NSURL *)aURL
 {
-    return [[self allocWithZone:[self zone]] initWithURL:aURL];
+    return [[self alloc] initWithURL:aURL];
 }
 
 /*
@@ -4963,7 +4963,7 @@
         
         CFStringRef absolutePath = CFURLCopyFileSystemPath((CFURLRef)aURL, 
kCFURLPOSIXPathStyle);
         NSUInteger maxLen = 
CFStringGetMaximumSizeOfFileSystemRepresentation(absolutePath);
-        _filePath = NSZoneMalloc(NSDefaultMallocZone(), maxLen);
+        _filePath = NSZoneMalloc(NULL, maxLen);
         CFStringGetFileSystemRepresentation(absolutePath, _filePath, maxLen);  
      
         CFRelease(absolutePath);
 
@@ -5018,7 +5018,7 @@
 
 - (void)dealloc
 {
-    NSZoneFree(NSDefaultMallocZone(), _filePath);
+    NSZoneFree(NULL, _filePath);
     [super dealloc];
 }
 

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m  2024-01-19 18:24:32 UTC 
(rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m  2024-01-20 16:03:45 UTC 
(rev 28634)
@@ -73,7 +73,7 @@
     static dispatch_once_t onceToken = 0;
     if (FVIconClass == self) {
         dispatch_once(&onceToken, ^{
-            _placeholderIcon = [FVPlaceholderIcon allocWithZone:NULL];
+            _placeholderIcon = [FVPlaceholderIcon alloc];
         });
         return _placeholderIcon;
     } else {

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m  2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon_Private.m  2024-01-20 
16:03:45 UTC (rev 28634)
@@ -75,7 +75,7 @@
     queuedKeysByClass = CFDictionaryCreateMutable(NULL, 0, NULL, 
&kCFTypeDictionaryValueCallBacks);
     
     if (numClasses > 0) {
-        Class *classes = (Class *)NSZoneCalloc([self zone], numClasses, 
sizeof(Class));
+        Class *classes = (Class *)NSZoneCalloc(NULL, numClasses, 
sizeof(Class));
         numClasses = objc_getClassList(classes, numClasses);
         
         Class FVIconClass = [FVIcon self];
@@ -96,7 +96,7 @@
                 superClass = class_getSuperclass(superClass);
             }
         }
-        NSZoneFree([self zone], classes);
+        NSZoneFree(NULL, classes);
     }
     _queuedKeysByClass = 
CFDictionaryCreateCopy(CFGetAllocator(queuedKeysByClass), queuedKeysByClass);
     CFRelease(queuedKeysByClass);

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m   2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageBuffer.m   2024-01-20 
16:03:45 UTC (rev 28634)
@@ -66,7 +66,7 @@
 {
     self = [super init];
     if (self) {
-        buffer = NSZoneMalloc([self zone], sizeof(vImage_Buffer));
+        buffer = NSZoneMalloc(NULL, sizeof(vImage_Buffer));
         if (NULL == buffer) {
             [self release];
             self = nil;
@@ -120,7 +120,7 @@
 {
     if (_freeBufferOnDealloc) CFAllocatorDeallocate([self allocator], 
buffer->data);
     FVAtomicSub64(_allocatedBytes, _bufferSize);
-    if (buffer != NULL) NSZoneFree([self zone], buffer);
+    if (buffer != NULL) NSZoneFree(NULL, buffer);
     [super dealloc];
 }
 

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m     2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVImageIcon.m     2024-01-20 
16:03:45 UTC (rev 28634)
@@ -38,7 +38,6 @@
 
 #import "FVImageIcon.h"
 #import "FVFinderIcon.h"
-#import "FVAllocator.h"
 
 @implementation FVImageIcon
 
@@ -135,7 +134,7 @@
 // if isFullSize is set to YES, the result can be used for _fullImage without 
resampling
 - (CGImageRef)_copySourceImageAtFullSize:(BOOL *)isFullSize {
     CGImageRef image = NULL;
-    NSData *imageData = [[NSData allocWithZone:FVDefaultZone()] 
initWithContentsOfURL:_fileURL options:NSUncachedRead error:NULL];
+    NSData *imageData = [[NSData alloc] initWithContentsOfURL:_fileURL 
options:NSUncachedRead error:NULL];
 
     if (imageData) {
         CGImageSourceRef src = CGImageSourceCreateWithData((__bridge 
CFDataRef)imageData, _imsrcOptions);

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m   
2024-01-19 18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVInvocationOperation.m   
2024-01-20 16:03:45 UTC (rev 28634)
@@ -85,7 +85,7 @@
 
 - (void)dealloc
 {
-    if (_retdata) NSZoneFree([self zone], _retdata);
+    if (_retdata) NSZoneFree(NULL, _retdata);
     [_invocation release];
     [_exception release];
     [super dealloc];
@@ -145,7 +145,7 @@
             
             pthread_mutex_lock(&_lock);
             if (NULL == _retdata) {
-                _retdata = NSZoneMalloc([self zone], [sig methodReturnLength] 
* sizeof(char));
+                _retdata = NSZoneMalloc(NULL, [sig methodReturnLength] * 
sizeof(char));
                 [_invocation getReturnValue:&_retdata];
             }
             pthread_mutex_unlock(&_lock);

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m      2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVMIMEIcon.m      2024-01-20 
16:03:45 UTC (rev 28634)
@@ -57,7 +57,7 @@
     NSParameterAssert(nil != type);
     FVMIMEIcon *icon = [[_iconTable objectForKey:type] retain];
     if (nil == icon) {
-        icon = [[[self class] allocWithZone:[self zone]] initWithType:type];
+        icon = [[[self class] alloc] initWithType:type];
         if (icon)
             [_iconTable setObject:icon forKey:type];
     }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m     2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperation.m     2024-01-20 
16:03:45 UTC (rev 28634)
@@ -63,7 +63,7 @@
     self = [super init];
     if (self) {
         _queue = nil;
-        _flags = NSZoneCalloc([self zone], 1, sizeof(struct FVOpFlags));
+        _flags = NSZoneCalloc(NULL, 1, sizeof(struct FVOpFlags));
         
         // set this by default
         _flags->_concurrent = 1;
@@ -73,7 +73,7 @@
 
 - (void)dealloc
 {
-    NSZoneFree([self zone], (void *)_flags);
+    NSZoneFree(NULL, (void *)_flags);
     [_queue release];
     [super dealloc];
 }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m        
2024-01-19 18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVOperationQueue.m        
2024-01-20 16:03:45 UTC (rev 28634)
@@ -64,7 +64,7 @@
     static dispatch_once_t onceToken = 0;
     if (FVOperationQueueClass == self) {
         dispatch_once(&onceToken, ^{
-            defaultPlaceholderQueue = [FVPlaceholderOperationQueue 
allocWithZone:NULL];
+            defaultPlaceholderQueue = [FVPlaceholderOperationQueue alloc];
         });
         return defaultPlaceholderQueue;
     } else {
@@ -72,12 +72,6 @@
     }
 }
 
-// ensure that alloc always calls through to allocWithZone:
-+ (id)alloc
-{
-    return [self allocWithZone:NULL];
-}
-
 - (void)subclassResponsibility:(SEL)selector
 {
     [NSException raise:@"fabstractClassException" format:@"Abstract class %@ 
does not implement %@", [self class], NSStringFromSelector(selector)];
@@ -137,7 +131,7 @@
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wobjc-designated-initializers"
 - (id)init {
-    return (id)[[FVConcreteOperationQueue allocWithZone:[self zone]] init];
+    return (id)[[FVConcreteOperationQueue alloc] init];
 }
 #pragma clang diagnostic pop
 

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m       2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m       2024-01-20 
16:03:45 UTC (rev 28634)
@@ -88,7 +88,7 @@
     pthread_mutex_lock(&_releaseLock);
     if (_releaseableIcons == nil) {
         unsigned char split = [_FVMappedDataProvider maxProviderCount] / 2 - 1;
-        _releaseableIcons = [[_FVSplitSet allocWithZone:[self zone]] 
initWithSplit:split];
+        _releaseableIcons = [[_FVSplitSet alloc] initWithSplit:split];
     }
     [_releaseableIcons addObject:anIcon];
     NSSet *oldObjects = nil;
@@ -562,7 +562,7 @@
 - (void)_setFileURL:(NSURL *)aURL
 {
     [_fileURL autorelease];
-    _fileURL = [aURL copyWithZone:[self zone]];
+    _fileURL = [aURL copy];
 }
 
 @end

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm        
2024-01-19 18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPriorityQueue.mm        
2024-01-20 16:03:45 UTC (rev 28634)
@@ -108,7 +108,7 @@
     NSUInteger oldCount = __FVPriorityQueueCount(self);
     NSUInteger capacity = __FVPriorityQueueRoundUpCapacity(oldCount + 
numNewValues);
     __FVPriorityQueueSetCapacity(self, capacity);
-    self->_values = (id __unsafe_unretained *)NSZoneRealloc([self zone], 
self->_values, capacity * sizeof(id));
+    self->_values = (id __unsafe_unretained *)NSZoneRealloc(NULL, 
self->_values, capacity * sizeof(id));
 }
 
 static inline id __unsafe_unretained 
*__FVPriorityQueueHeapStart(FVPriorityQueue *self)
@@ -132,7 +132,7 @@
         _set = CFSetCreateMutable(CFAllocatorGetDefault(), 0, 
&kCFTypeSetCallBacks);
         
         capacity = __FVPriorityQueueRoundUpCapacity(capacity);
-        _values = (id __unsafe_unretained *)NSZoneCalloc([self zone], 
capacity, sizeof(id));
+        _values = (id __unsafe_unretained *)NSZoneCalloc(NULL, capacity, 
sizeof(id));
         __FVPriorityQueueSetCount(self, 0);
         __FVPriorityQueueSetCapacity(self, capacity);
         _madeHeap = NO;
@@ -153,7 +153,7 @@
 - (void)dealloc
 {
     if (_set) CFRelease(_set);
-    NSZoneFree([self zone], _values);
+    NSZoneFree(NULL, _values);
     [super dealloc];
 }
 
@@ -277,7 +277,7 @@
 
 - (NSEnumerator *)objectEnumerator
 {
-    return [[[FVPriorityQueueEnumerator allocWithZone:[self zone]] 
initWithQueue:self] autorelease];
+    return [[[FVPriorityQueueEnumerator alloc] initWithQueue:self] 
autorelease];
 }
 
 - (void)_sortQueueForEnumeration

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m      2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m      2024-01-20 
16:03:45 UTC (rev 28634)
@@ -53,7 +53,7 @@
      */
     if (type == nil || UTTypeEqual((__bridge CFStringRef)type, kUTTypeData)) {
         // This is mainly useful to prove that the file cannot be opened; as 
in the case of OmniGraffle files (see comment above), it returns YES.
-        NSAttributedString *attributedString = [[NSAttributedString 
allocWithZone:[self zone]] initWithURL:aURL options:@{} documentAttributes:NULL 
error:NULL];
+        NSAttributedString *attributedString = [[NSAttributedString alloc] 
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
         BOOL canInit = (nil != attributedString);
         [attributedString release];
         return canInit;
@@ -101,12 +101,12 @@
      */
     if (_isPlainText) {
         NSStringEncoding enc;
-        NSString *text = [[NSString allocWithZone:[self zone]] 
initWithContentsOfURL:_fileURL usedEncoding:&enc error:NULL];
+        NSString *text = [[NSString alloc] initWithContentsOfURL:_fileURL 
usedEncoding:&enc error:NULL];
         if (nil == text)
-            text = [[NSString allocWithZone:[self zone]] 
initWithContentsOfURL:_fileURL encoding:NSMacOSRomanStringEncoding error:NULL];
+            text = [[NSString alloc] initWithContentsOfURL:_fileURL 
encoding:NSMacOSRomanStringEncoding error:NULL];
         
         if (text) {
-            attrString = [[NSMutableAttributedString allocWithZone:[self 
zone]] initWithString:text];
+            attrString = [[NSMutableAttributedString alloc] 
initWithString:text];
             [text release];
         }
     }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m   2024-01-19 
18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m   2024-01-20 
16:03:45 UTC (rev 28634)
@@ -127,7 +127,7 @@
         self = (id)[FVFinderIcon newWithURLScheme:[aURL scheme]];
     }
     else if ((self = [super init])) {
-        _httpURL = [aURL copyWithZone:[self zone]];
+        _httpURL = [aURL copy];
         _fullImage = NULL;
         _thumbnail = NULL;
         _fallbackIcon = nil;
@@ -140,7 +140,7 @@
         FVIconLimitThumbnailSize(&_thumbnailSize);
         
         _cacheKey = [FVCGImageCache newKeyForURL:_httpURL];
-        _condLock = [[NSConditionLock allocWithZone:[self zone]] 
initWithCondition:IDLE];
+        _condLock = [[NSConditionLock alloc] initWithCondition:IDLE];
     }
     return self;
 }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m   
2024-01-19 18:24:32 UTC (rev 28633)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/_FVMappedDataProvider.m   
2024-01-20 16:03:45 UTC (rev 28634)
@@ -111,10 +111,9 @@
             NSAssert1(FVCanMapFileAtURL(aURL), @"%@ is not safe for mmap()", 
aURL);
             fcntl(fd, F_NOCACHE, 1);
 
-            NSZone *zone = [self zone];
-            FVMappedRegion *mapInfo = NSZoneMalloc(zone, 
sizeof(FVMappedRegion));
-            mapInfo->zone = zone;
-            mapInfo->path = NSZoneCalloc(zone, strlen(path) + 1, sizeof(char));
+            FVMappedRegion *mapInfo = NSZoneMalloc(NULL, 
sizeof(FVMappedRegion));
+            mapInfo->zone = NULL;
+            mapInfo->path = NSZoneCalloc(NULL, strlen(path) + 1, sizeof(char));
             strcpy(mapInfo->path, path);
             mapInfo->length = sb.st_size;   
             // map immediately instead of lazily in __FVGetMappedRegion, since 
someone might edit the file
@@ -167,9 +166,9 @@
 static void __FVReleaseMappedRegion(void *info)
 {
     FVMappedRegion *mapInfo = info;
-    NSZoneFree(mapInfo->zone, mapInfo->path);
+    NSZoneFree(NULL, mapInfo->path);
     if (mapInfo->mapregion) munmap(mapInfo->mapregion, mapInfo->length);
     FVAtomicSub(_mappedDataSizeKB, (mapInfo->length) / 1024);
-    NSZoneFree(mapInfo->zone, info);
+    NSZoneFree(NULL, info);
 }
 

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