Revision: 28604
          http://sourceforge.net/p/bibdesk/svn/28604
Author:   hofman
Date:     2024-01-14 22:21:27 +0000 (Sun, 14 Jan 2024)
Log Message:
-----------
should use realloc instead of NSZoneRealloc

Modified Paths:
--------------
    trunk/bibdesk/BDSKFileSearch.m
    trunk/bibdesk/BDSKVersionNumber.m

Modified: trunk/bibdesk/BDSKFileSearch.m
===================================================================
--- trunk/bibdesk/BDSKFileSearch.m      2024-01-14 15:56:59 UTC (rev 28603)
+++ trunk/bibdesk/BDSKFileSearch.m      2024-01-14 22:21:27 UTC (rev 28604)
@@ -278,8 +278,8 @@
 - (BOOL)changeIndexSize:(size_t)size;
 {
     if ((!ids && !scores) || indexSize < size) {
-        ids = (SKDocumentID *)NSZoneRealloc(NULL, ids, size * 
sizeof(SKDocumentID));
-        scores = (float *)NSZoneRealloc(NULL, scores, size * sizeof(float));
+        ids = (SKDocumentID *)realloc(ids, size * sizeof(SKDocumentID));
+        scores = (float *)realloc(scores, size * sizeof(float));
         indexSize = size;
     } 
     return NULL != scores && NULL != ids;
@@ -288,7 +288,7 @@
 - (BOOL)changeResultSize:(size_t)size;
 {
     if (!docs || resultSize < size) {
-        docs = (SKDocumentRef *)NSZoneRealloc(NULL, docs, size * 
sizeof(SKDocumentRef));
+        docs = (SKDocumentRef *)realloc(docs, size * sizeof(SKDocumentRef));
         resultSize = size;
     }
     return NULL != docs;

Modified: trunk/bibdesk/BDSKVersionNumber.m
===================================================================
--- trunk/bibdesk/BDSKVersionNumber.m   2024-01-14 15:56:59 UTC (rev 28603)
+++ trunk/bibdesk/BDSKVersionNumber.m   2024-01-14 22:21:27 UTC (rev 28604)
@@ -106,7 +106,7 @@
                 [mutableVersionString appendFormat:@"%@%ld", sep, 
(long)component];
                 
                 componentCount++;
-                components = (NSInteger *)NSZoneRealloc(NSDefaultMallocZone(), 
components, sizeof(NSInteger) * componentCount);
+                components = (NSInteger *)realloc(components, 
sizeof(NSInteger) * componentCount);
                 components[componentCount - 1] = component;
             
                 if ([scanner isAtEnd] == NO) {
@@ -135,7 +135,7 @@
                         if (releaseType != BDSKVersionTypeRelease) {
                             // we scanned an "a", "b", "d", "f", or "rc"
                             componentCount++;
-                            components = (NSInteger 
*)NSZoneRealloc(NSDefaultMallocZone(), components, sizeof(NSInteger) * 
componentCount);
+                            components = (NSInteger *)realloc(components, 
sizeof(NSInteger) * componentCount);
                             components[componentCount - 1] = releaseType;
                             
                             sep = EMPTY;

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