[poppler] poppler/goo: gmem.c,1.1.1.1,1.2 gmem.h,1.1.1.1,1.2
Jeff Muizelaar
jrmuizel at freedesktop.org
Sun May 1 14:54:57 PDT 2005
Update of /cvs/poppler/poppler/goo
In directory gabe:/tmp/cvs-serv22445/goo
Modified Files:
gmem.c gmem.h
Log Message:
2005-05-01 Jeff Muizelaar <jeff at infidigm.net>
* goo/gmem.c: (gmalloc), (grealloc), (gfree):
* goo/gmem.h: make memory functions use size_t instead of int.
Patch from Takashi Iwai through Albert Astals Cid.
Index: gmem.c
===================================================================
RCS file: /cvs/poppler/poppler/goo/gmem.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- gmem.c 3 Mar 2005 19:45:58 -0000 1.1.1.1
+++ gmem.c 1 May 2005 21:54:55 -0000 1.2
@@ -53,9 +53,9 @@
#endif /* DEBUG_MEM */
-void *gmalloc(int size) {
+void *gmalloc(size_t size) {
#ifdef DEBUG_MEM
- int size1;
+ size_t size1;
char *mem;
GMemHdr *hdr;
void *data;
@@ -94,11 +94,11 @@
#endif
}
-void *grealloc(void *p, int size) {
+void *grealloc(void *p, size_t size) {
#ifdef DEBUG_MEM
GMemHdr *hdr;
void *q;
- int oldSize;
+ size_t oldSize;
if (size == 0) {
if (p)
@@ -137,7 +137,7 @@
void gfree(void *p) {
#ifdef DEBUG_MEM
- int size;
+ size_t size;
GMemHdr *hdr;
GMemHdr *prevHdr, *q;
int lst;
Index: gmem.h
===================================================================
RCS file: /cvs/poppler/poppler/goo/gmem.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- gmem.h 3 Mar 2005 19:45:58 -0000 1.1.1.1
+++ gmem.h 1 May 2005 21:54:55 -0000 1.2
@@ -19,13 +19,13 @@
* Same as malloc, but prints error message and exits if malloc()
* returns NULL.
*/
-extern void *gmalloc(int size);
+extern void *gmalloc(size_t size);
/*
* Same as realloc, but prints error message and exits if realloc()
* returns NULL. If <p> is NULL, calls malloc instead of realloc().
*/
-extern void *grealloc(void *p, int size);
+extern void *grealloc(void *p, size_t size);
/*
* Same as free, but checks for and ignores NULL pointers.
More information about the poppler
mailing list