[poppler] poppler/goo: GooHash.cc, 1.1.1.1, 1.2 GooList.cc, 1.1.1.1, 1.2

Brad Hards bradh at freedesktop.org
Sun Aug 28 19:31:55 EST 2005


Update of /cvs/poppler/poppler/goo
In directory gabe:/tmp/cvs-serv709/goo

Modified Files:
	GooHash.cc GooList.cc 
Log Message:
This part of my previous gmallocn merge patch was missing.


Index: GooHash.cc
===================================================================
RCS file: /cvs/poppler/poppler/goo/GooHash.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- GooHash.cc	3 Mar 2005 19:45:58 -0000	1.1.1.1
+++ GooHash.cc	28 Aug 2005 09:31:53 -0000	1.2
@@ -39,7 +39,7 @@
 
   deleteKeys = deleteKeysA;
   size = 7;
-  tab = (GooHashBucket **)gmalloc(size * sizeof(GooHashBucket *));
+  tab = (GooHashBucket **)gmallocn(size, sizeof(GooHashBucket *));
   for (h = 0; h < size; ++h) {
     tab[h] = NULL;
   }
@@ -292,7 +292,7 @@
   oldSize = size;
   oldTab = tab;
   size = 2*size + 1;
-  tab = (GooHashBucket **)gmalloc(size * sizeof(GooHashBucket *));
+  tab = (GooHashBucket **)gmallocn(size, sizeof(GooHashBucket *));
   for (h = 0; h < size; ++h) {
     tab[h] = NULL;
   }

Index: GooList.cc
===================================================================
RCS file: /cvs/poppler/poppler/goo/GooList.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- GooList.cc	3 Mar 2005 19:45:58 -0000	1.1.1.1
+++ GooList.cc	28 Aug 2005 09:31:53 -0000	1.2
@@ -22,14 +22,14 @@
 
 GooList::GooList() {
   size = 8;
-  data = (void **)gmalloc(size * sizeof(void*));
+  data = (void **)gmallocn(size, sizeof(void*));
   length = 0;
   inc = 0;
 }
 
 GooList::GooList(int sizeA) {
   size = sizeA;
-  data = (void **)gmalloc(size * sizeof(void*));
+  data = (void **)gmallocn(size, sizeof(void*));
   length = 0;
   inc = 0;
 }
@@ -83,10 +83,10 @@
 
 void GooList::expand() {
   size += (inc > 0) ? inc : size;
-  data = (void **)grealloc(data, size * sizeof(void*));
+  data = (void **)greallocn(data, size, sizeof(void*));
 }
 
 void GooList::shrink() {
   size -= (inc > 0) ? inc : size/2;
-  data = (void **)grealloc(data, size * sizeof(void*));
+  data = (void **)greallocn(data, size, sizeof(void*));
 }



More information about the poppler mailing list