Revision: 13862
          http://sourceforge.net/p/skim-app/code/13862
Author:   hofman
Date:     2023-12-09 16:25:40 +0000 (Sat, 09 Dec 2023)
Log Message:
-----------
don't use zone

Modified Paths:
--------------
    trunk/NSAttributedString_SKExtensions.m
    trunk/NSMenu_SKExtensions.m
    trunk/NSString_SKExtensions.m
    trunk/PDFAnnotationFreeText_SKExtensions.m
    trunk/PDFAnnotationInk_SKExtensions.m
    trunk/PDFAnnotationLine_SKExtensions.m
    trunk/PDFAnnotation_SKExtensions.m
    trunk/PDFOutline_SKExtensions.m
    trunk/PDFPage_SKExtensions.m
    trunk/SKBookmark.m
    trunk/SKDownload.m
    trunk/SKMainDocument.m
    trunk/SKSecondaryPDFView.m
    trunk/SKSnapshotPDFView.m

Modified: trunk/NSAttributedString_SKExtensions.m
===================================================================
--- trunk/NSAttributedString_SKExtensions.m     2023-12-09 15:37:45 UTC (rev 
13861)
+++ trunk/NSAttributedString_SKExtensions.m     2023-12-09 16:25:40 UTC (rev 
13862)
@@ -97,7 +97,7 @@
 
 - (NSScriptObjectSpecifier *)objectSpecifier {
     NSScriptClassDescription *containerClassDescription = 
[NSScriptClassDescription classDescriptionForClass:[NSApp class]];
-    return [[[NSNameSpecifier allocWithZone:[self zone]] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:nil key:@"richTextFormat" name:[self scriptingName]] 
autorelease];
+    return [[[NSNameSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:nil key:@"richTextFormat" name:[self scriptingName]] 
autorelease];
 }
 
 - (NSScriptObjectSpecifier *)richTextSpecifier {

Modified: trunk/NSMenu_SKExtensions.m
===================================================================
--- trunk/NSMenu_SKExtensions.m 2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/NSMenu_SKExtensions.m 2023-12-09 16:25:40 UTC (rev 13862)
@@ -47,7 +47,7 @@
 }
 
 - (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector 
target:(id)aTarget atIndex:(NSInteger)anIndex {
-    NSMenuItem *item = [[NSMenuItem allocWithZone:[self zone]] 
initWithTitle:aString action:aSelector target:aTarget];
+    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:aString 
action:aSelector target:aTarget];
     [self insertItem:item atIndex:anIndex];
     [item release];
     return item;
@@ -58,7 +58,7 @@
 }
 
 - (NSMenuItem *)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector 
target:(id)aTarget tag:(NSInteger)aTag atIndex:(NSInteger)anIndex {
-    NSMenuItem *item = [[NSMenuItem allocWithZone:[self zone]] 
initWithTitle:aString action:aSelector target:aTarget tag:aTag];
+    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:aString 
action:aSelector target:aTarget tag:aTag];
     [self insertItem:item atIndex:anIndex];
     [item release];
     return item;
@@ -69,7 +69,7 @@
 }
 
 - (NSMenuItem *)insertItemWithTitle:(NSString *)aString imageNamed:(NSString 
*)anImageName action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag 
atIndex:(NSInteger)anIndex {
-    NSMenuItem *item = [[NSMenuItem allocWithZone:[self zone]] 
initWithTitle:aString imageNamed:anImageName action:aSelector target:aTarget 
tag:aTag];
+    NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:aString 
imageNamed:anImageName action:aSelector target:aTarget tag:aTag];
     [self insertItem:item atIndex:anIndex];
     [item release];
     return item;
@@ -80,7 +80,7 @@
 }
 
 - (NSMenuItem *)insertItemWithSubmenuAndTitle:(NSString *)aString 
atIndex:(NSInteger)anIndex {
-    NSMenuItem *item = [[NSMenuItem allocWithZone:[self zone]] 
initWithSubmenuAndTitle:aString];
+    NSMenuItem *item = [[NSMenuItem alloc] initWithSubmenuAndTitle:aString];
     [self insertItem:item atIndex:anIndex];
     [item release];
     return item;

Modified: trunk/NSString_SKExtensions.m
===================================================================
--- trunk/NSString_SKExtensions.m       2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/NSString_SKExtensions.m       2023-12-09 16:25:40 UTC (rev 13862)
@@ -188,7 +188,7 @@
     CFStringInitInlineBuffer(theString, &inlineBuffer, CFRangeMake(0, length));
     UniChar ch;
     
-#define DELETE_CHARACTERS(n) 
do{if((void*)self==theString){theString=(void*)[[self mutableCopyWithZone:[self 
zone]] autorelease];};CFStringDelete(theString, CFRangeMake(delIdx, n));} 
while(0)
+#define DELETE_CHARACTERS(n) 
do{if((void*)self==theString){theString=(void*)[[self mutableCopy] 
autorelease];};CFStringDelete(theString, CFRangeMake(delIdx, n));} while(0)
         
     // idx is current index into the inline buffer, and delIdx is current 
index in the mutable string
     CFIndex idx = 0, delIdx = 0;

Modified: trunk/PDFAnnotationFreeText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationFreeText_SKExtensions.m  2023-12-09 15:37:45 UTC (rev 
13861)
+++ trunk/PDFAnnotationFreeText_SKExtensions.m  2023-12-09 16:25:40 UTC (rev 
13862)
@@ -66,7 +66,7 @@
     [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKFreeTextNoteColorKey]];
     [self setFontColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKFreeTextNoteFontColorKey]];
     [self setAlignment:textAlignmentFromAlignment([[NSUserDefaults 
standardUserDefaults] integerForKey:SKFreeTextNoteAlignmentKey])];
-    PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init];
+    PDFBorder *border = [[PDFBorder alloc] init];
     [border setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKFreeTextNoteLineWidthKey]];
     [border setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKFreeTextNoteDashPatternKey]];
     [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKFreeTextNoteLineStyleKey]];

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2023-12-09 15:37:45 UTC (rev 
13861)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2023-12-09 16:25:40 UTC (rev 
13862)
@@ -65,7 +65,7 @@
 
 - (void)setDefaultSkimNoteProperties {
     [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKInkNoteColorKey]];
-    PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init];
+    PDFBorder *border = [[PDFBorder alloc] init];
     [border setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKInkNoteLineWidthKey]];
     [border setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKInkNoteDashPatternKey]];
     [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKInkNoteLineStyleKey]];

Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m      2023-12-09 15:37:45 UTC (rev 
13861)
+++ trunk/PDFAnnotationLine_SKExtensions.m      2023-12-09 16:25:40 UTC (rev 
13862)
@@ -87,7 +87,7 @@
     [self setEndLineStyle:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteEndLineStyleKey]];
     [self setStartPoint:NSMakePoint(0.0, 0.0)];
     [self setEndPoint:NSMakePoint(NSWidth(bounds), NSHeight(bounds))];
-    PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init];
+    PDFBorder *border = [[PDFBorder alloc] init];
     [border setLineWidth:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKLineNoteLineWidthKey]];
     [border setDashPattern:[[NSUserDefaults standardUserDefaults] 
arrayForKey:SKLineNoteDashPatternKey]];
     [border setStyle:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKLineNoteLineStyleKey]];

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/PDFAnnotation_SKExtensions.m  2023-12-09 16:25:40 UTC (rev 13862)
@@ -292,7 +292,7 @@
         PDFBorder *oldBorder = [self border];
         PDFBorder *border = nil;
         if (oldBorder || style)
-            border = [[PDFBorder allocWithZone:[self zone]] init];
+            border = [[PDFBorder alloc] init];
         if (oldBorder) {
             [border setLineWidth:[oldBorder lineWidth]];
             [border setDashPattern:[oldBorder dashPattern]];
@@ -314,7 +314,7 @@
         PDFBorder *border = nil;
         if (width > 0.0) {
             PDFBorder *oldBorder = [self border];
-            border = [[PDFBorder allocWithZone:[self zone]] init];
+            border = [[PDFBorder alloc] init];
             if (oldBorder && [oldBorder lineWidth] > 0.0) {
                 [border setDashPattern:[oldBorder dashPattern]];
                 [border setStyle:[oldBorder style]];
@@ -324,7 +324,7 @@
         } else {
             [self setBorder:nil];
             if ([self border] != nil) {
-                border = [[PDFBorder allocWithZone:[self zone]] init];
+                border = [[PDFBorder alloc] init];
                 [border setLineWidth:0.0];
                 [self setBorder:border];
             }
@@ -342,7 +342,7 @@
         PDFBorder *oldBorder = [self border];
         PDFBorder *border = nil;
         if (oldBorder || [pattern count])
-            border = [[PDFBorder allocWithZone:[self zone]] init];
+            border = [[PDFBorder alloc] init];
         if (oldBorder) {
             [border setLineWidth:[oldBorder lineWidth]];
             [border setStyle:[oldBorder style]];
@@ -573,7 +573,8 @@
 
 - (NSScriptObjectSpecifier *)objectSpecifier {
     NSScriptObjectSpecifier *containerRef = [[self page] objectSpecifier];
-    return [[[NSUniqueIDSpecifier allocWithZone:[self zone]] 
initWithContainerClassDescription:[containerRef keyClassDescription] 
containerSpecifier:containerRef key:@"notes" uniqueID:[self uniqueID]] 
autorelease];
+    return [[[NSUniqueIDSpecifier alloc
+             ] initWithContainerClassDescription:[containerRef 
keyClassDescription] containerSpecifier:containerRef key:@"notes" 
uniqueID:[self uniqueID]] autorelease];
 }
 
 - (NSString *)uniqueID {

Modified: trunk/PDFOutline_SKExtensions.m
===================================================================
--- trunk/PDFOutline_SKExtensions.m     2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/PDFOutline_SKExtensions.m     2023-12-09 16:25:40 UTC (rev 13862)
@@ -95,7 +95,7 @@
             containerRef = [parent objectSpecifier];
         else
             containerRef = [[[self document] containingDocument] 
objectSpecifier];
-        return [[[NSIndexSpecifier allocWithZone:[self zone]] 
initWithContainerClassDescription:[containerRef keyClassDescription] 
containerSpecifier:containerRef key:@"outlines" index:idx] autorelease];
+        return [[[NSIndexSpecifier alloc] 
initWithContainerClassDescription:[containerRef keyClassDescription] 
containerSpecifier:containerRef key:@"outlines" index:idx] autorelease];
     } else {
         return nil;
     }

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/PDFPage_SKExtensions.m        2023-12-09 16:25:40 UTC (rev 13862)
@@ -549,7 +549,7 @@
     
     if (document && idx != NSNotFound) {
         NSScriptObjectSpecifier *containerRef = [document objectSpecifier];
-        return [[[NSIndexSpecifier allocWithZone:[self zone]] 
initWithContainerClassDescription:[containerRef keyClassDescription] 
containerSpecifier:containerRef key:@"pages" index:idx] autorelease];
+        return [[[NSIndexSpecifier alloc] 
initWithContainerClassDescription:[containerRef keyClassDescription] 
containerSpecifier:containerRef key:@"pages" index:idx] autorelease];
     } else {
         return nil;
     }

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/SKBookmark.m  2023-12-09 16:25:40 UTC (rev 13862)
@@ -252,7 +252,7 @@
         } else {
             containerClassDescription = [NSScriptClassDescription 
classDescriptionForClass:[NSApp class]];
         }
-        return [[[NSIndexSpecifier allocWithZone:[self zone]] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:containerRef key:@"bookmarks" index:idx] autorelease];
+        return [[[NSIndexSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:containerRef key:@"bookmarks" index:idx] autorelease];
     } else {
         return nil;
     }

Modified: trunk/SKDownload.m
===================================================================
--- trunk/SKDownload.m  2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/SKDownload.m  2023-12-09 16:25:40 UTC (rev 13862)
@@ -250,7 +250,7 @@
     NSUInteger idx = [[[SKDownloadController sharedDownloadController] 
downloads] indexOfObjectIdenticalTo:self];
     if (idx != NSNotFound) {
         NSScriptClassDescription *containerClassDescription = 
[NSScriptClassDescription classDescriptionForClass:[NSApp class]];
-        return [[[NSIndexSpecifier allocWithZone:[self zone]] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:nil key:@"downloads" index:idx] autorelease];
+        return [[[NSIndexSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:nil key:@"downloads" index:idx] autorelease];
     } else {
         return nil;
     }

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/SKMainDocument.m      2023-12-09 16:25:40 UTC (rev 13862)
@@ -1154,7 +1154,7 @@
         if (NSEqualPoints(pageOrigin, NSZeroPoint) == NO) {
             if (offsets == nil)
                 offsets = NSCreateMapTable(NSIntegerMapKeyCallBacks, 
NSOwnedPointerMapValueCallBacks, 0);
-            NSPointPointer offsetPtr = NSZoneMalloc([self zone], 
sizeof(NSPoint));
+            NSPointPointer offsetPtr = NSZoneMalloc(NSDefaultMallocZone(), 
sizeof(NSPoint));
             *offsetPtr = pageOrigin;
             NSMapInsert(offsets, (const void *)[page pageIndex], offsetPtr);
         }

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/SKSecondaryPDFView.m  2023-12-09 16:25:40 UTC (rev 13862)
@@ -167,7 +167,7 @@
     if (scalePopUpButton == nil) {
 
         // create it        
-        scalePopUpButton = [[NSPopUpButton allocWithZone:[self zone]] 
initWithFrame:NSMakeRect(0.0, 0.0, CONTROL_HEIGHT, CONTROL_HEIGHT) 
pullsDown:NO];
+        scalePopUpButton = [[NSPopUpButton alloc] 
initWithFrame:NSMakeRect(0.0, 0.0, CONTROL_HEIGHT, CONTROL_HEIGHT) 
pullsDown:NO];
         
         [[scalePopUpButton cell] setControlSize:NSControlSizeSmall];
                [scalePopUpButton setBordered:NO];
@@ -209,7 +209,7 @@
     if (pagePopUpButton == nil) {
         
         // create it        
-        pagePopUpButton = [[NSPopUpButton allocWithZone:[self zone]] 
initWithFrame:NSMakeRect(0.0, 0.0, CONTROL_HEIGHT, CONTROL_HEIGHT) 
pullsDown:NO];
+        pagePopUpButton = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(0.0, 
0.0, CONTROL_HEIGHT, CONTROL_HEIGHT) pullsDown:NO];
         
         [[pagePopUpButton cell] setControlSize:NSControlSizeSmall];
                [pagePopUpButton setBordered:NO];

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2023-12-09 15:37:45 UTC (rev 13861)
+++ trunk/SKSnapshotPDFView.m   2023-12-09 16:25:40 UTC (rev 13862)
@@ -138,7 +138,7 @@
     if (scalePopUpButton == nil) {
         
         // create it
-        scalePopUpButton = [[NSPopUpButton allocWithZone:[self zone]] 
initWithFrame:NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown:NO];
+        scalePopUpButton = [[NSPopUpButton alloc] 
initWithFrame:NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown:NO];
         
         [[scalePopUpButton cell] setControlSize:NSControlSizeSmall];
                [scalePopUpButton setBordered:NO];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to