summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2009-04-11 00:31:57 +0200
committerAlbert Astals Cid <aacid@kde.org>2009-04-11 00:31:57 +0200
commit9cf2325fb22f812b31858e519411f57747d39bd8 (patch)
treea3e03ba664475b379edec748d80ec75719e54678
parentc399b2d512aa073b0d7cd8eb5413a4b43f0d6aef (diff)
More gmalloc → gmallocn
-rw-r--r--glib/poppler-page.cc2
-rw-r--r--splash/Splash.cc8
-rw-r--r--splash/SplashBitmap.cc6
-rw-r--r--splash/SplashFTFont.cc2
4 files changed, 9 insertions, 9 deletions
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index f1dd1336..225c97b2 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -316,7 +316,7 @@ poppler_page_prepare_output_dev (PopplerPage *page,
316 316
317 output_dev = page->document->output_dev; 317 output_dev = page->document->output_dev;
318 cairo_rowstride = cairo_width * 4; 318 cairo_rowstride = cairo_width * 4;
319 cairo_data = (guchar *) gmalloc (cairo_height * cairo_rowstride); 319 cairo_data = (guchar *) gmallocn (cairo_height, cairo_rowstride);
320 if (transparent) 320 if (transparent)
321 memset (cairo_data, 0x00, cairo_height * cairo_rowstride); 321 memset (cairo_data, 0x00, cairo_height * cairo_rowstride);
322 else 322 else
diff --git a/splash/Splash.cc b/splash/Splash.cc
index c93ef408..a1deb854 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -11,7 +11,7 @@
11// All changes made under the Poppler project to this file are licensed 11// All changes made under the Poppler project to this file are licensed
12// under GPL version 2 or later 12// under GPL version 2 or later
13// 13//
14// Copyright (C) 2005-2008 Albert Astals Cid <aacid@kde.org> 14// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
15// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com> 15// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
16// 16//
17// To see a description of the changes please see the Changelog file that 17// To see a description of the changes please see the Changelog file that
@@ -2001,7 +2001,7 @@ SplashError Splash::fillImageMask(SplashImageMaskSource src, void *srcData,
2001 xq = w % scaledWidth; 2001 xq = w % scaledWidth;
2002 2002
2003 // allocate pixel buffer 2003 // allocate pixel buffer
2004 pixBuf = (SplashColorPtr)gmalloc((yp + 1) * w); 2004 pixBuf = (SplashColorPtr)gmallocn((yp + 1), w);
2005 2005
2006 // initialize the pixel pipe 2006 // initialize the pixel pipe
2007 pipeInit(&pipe, 0, 0, state->fillPattern, NULL, state->fillAlpha, 2007 pipeInit(&pipe, 0, 0, state->fillPattern, NULL, state->fillAlpha,
@@ -2301,9 +2301,9 @@ SplashError Splash::drawImage(SplashImageSource src, void *srcData,
2301 xq = w % scaledWidth; 2301 xq = w % scaledWidth;
2302 2302
2303 // allocate pixel buffers 2303 // allocate pixel buffers
2304 colorBuf = (SplashColorPtr)gmalloc((yp + 1) * w * nComps); 2304 colorBuf = (SplashColorPtr)gmallocn3((yp + 1), w, nComps);
2305 if (srcAlpha) { 2305 if (srcAlpha) {
2306 alphaBuf = (Guchar *)gmalloc((yp + 1) * w); 2306 alphaBuf = (Guchar *)gmallocn((yp + 1), w);
2307 } else { 2307 } else {
2308 alphaBuf = NULL; 2308 alphaBuf = NULL;
2309 } 2309 }
diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc
index 97d622cf..6cf2aea9 100644
--- a/splash/SplashBitmap.cc
+++ b/splash/SplashBitmap.cc
@@ -11,7 +11,7 @@
11// All changes made under the Poppler project to this file are licensed 11// All changes made under the Poppler project to this file are licensed
12// under GPL version 2 or later 12// under GPL version 2 or later
13// 13//
14// Copyright (C) 2006 Albert Astals Cid <aacid@kde.org> 14// Copyright (C) 2006, 2009 Albert Astals Cid <aacid@kde.org>
15// Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com> 15// Copyright (C) 2007 Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
16// 16//
17// To see a description of the changes please see the Changelog file that 17// To see a description of the changes please see the Changelog file that
@@ -62,13 +62,13 @@ SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPad,
62 } 62 }
63 rowSize += rowPad - 1; 63 rowSize += rowPad - 1;
64 rowSize -= rowSize % rowPad; 64 rowSize -= rowSize % rowPad;
65 data = (SplashColorPtr)gmalloc(rowSize * height); 65 data = (SplashColorPtr)gmallocn(rowSize, height);
66 if (!topDown) { 66 if (!topDown) {
67 data += (height - 1) * rowSize; 67 data += (height - 1) * rowSize;
68 rowSize = -rowSize; 68 rowSize = -rowSize;
69 } 69 }
70 if (alphaA) { 70 if (alphaA) {
71 alpha = (Guchar *)gmalloc(width * height); 71 alpha = (Guchar *)gmallocn(width, height);
72 } else { 72 } else {
73 alpha = NULL; 73 alpha = NULL;
74 } 74 }
diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc
index 0039feb6..c3b298af 100644
--- a/splash/SplashFTFont.cc
+++ b/splash/SplashFTFont.cc
@@ -243,7 +243,7 @@ GBool SplashFTFont::makeGlyph(int c, int xFrac, int yFrac,
243 } else { 243 } else {
244 rowSize = (bitmap->w + 7) >> 3; 244 rowSize = (bitmap->w + 7) >> 3;
245 } 245 }
246 bitmap->data = (Guchar *)gmalloc(rowSize * bitmap->h); 246 bitmap->data = (Guchar *)gmallocn(rowSize, bitmap->h);
247 bitmap->freeData = gTrue; 247 bitmap->freeData = gTrue;
248 for (i = 0, p = bitmap->data, q = slot->bitmap.buffer; 248 for (i = 0, p = bitmap->data, q = slot->bitmap.buffer;
249 i < bitmap->h; 249 i < bitmap->h;