summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-tga.c
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2001-12-13 21:22:12 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2001-12-13 21:22:12 +0000
commitd99bd97fe86bc13dbb483e174722eb68e916781f (patch)
treedb4c4a56f167c57efd6de8da7cc119201cef2570 /gdk-pixbuf/io-tga.c
parentd3403353cbd651a18264c4c28044c6c78c49b938 (diff)
downloadgdk-pixbuf-d99bd97fe86bc13dbb483e174722eb68e916781f.tar.gz
Remove assorted G_OBJECT casts where unnecessary.
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c, io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove assorted G_OBJECT casts where unnecessary. * gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref resp. * gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c, io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c, io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and gdk_pixbuf_unref. * Makefile.am, pixops/Makefile.am: Compile everything with -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED * gdk-pixdata.c: Use g_ascii_strup() instead of g_strup(). * io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp(). * demos/testpixbuf-drawable.c, demos/testpixbuf-save.c, demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref resp.
Diffstat (limited to 'gdk-pixbuf/io-tga.c')
-rw-r--r--gdk-pixbuf/io-tga.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c
index f48f1276e..d8dd9c78d 100644
--- a/gdk-pixbuf/io-tga.c
+++ b/gdk-pixbuf/io-tga.c
@@ -752,7 +752,7 @@ static gboolean gdk_pixbuf__tga_stop_load(gpointer data, GError **err)
g_free(ctx->hdr);
if (ctx->cmap)
g_free(ctx->cmap);
- gdk_pixbuf_unref(ctx->pbuf);
+ g_object_unref(ctx->pbuf);
if (ctx->in->size)
ctx->in = io_buffer_free_segment(ctx->in, ctx->in->size, err);
if (!ctx->in) {
@@ -905,14 +905,14 @@ static GdkPixbuf *get_image_pseudocolor(FILE *f, TGAHeader *hdr,
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
@@ -927,7 +927,7 @@ static GdkPixbuf *get_image_pseudocolor(FILE *f, TGAHeader *hdr,
n += count;
for (; count; count--) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
*p++ = cmap->cols[color].r;
@@ -941,7 +941,7 @@ static GdkPixbuf *get_image_pseudocolor(FILE *f, TGAHeader *hdr,
} else {
for (n = 0; n < pbuf->width * pbuf->height; n++) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
*p++ = cmap->cols[color].r;
@@ -1001,14 +1001,14 @@ static GdkPixbuf *get_image_truecolor(FILE *f, TGAHeader *hdr,
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&pixel, pbuf->n_channels, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
@@ -1019,7 +1019,7 @@ static GdkPixbuf *get_image_truecolor(FILE *f, TGAHeader *hdr,
count = tag + 1;
n += count;
if (!fread_check(p, pbuf->n_channels * count, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p += pbuf->n_channels * count;
@@ -1027,7 +1027,7 @@ static GdkPixbuf *get_image_truecolor(FILE *f, TGAHeader *hdr,
}
} else {
if (!fread_check(p, pbuf->rowstride * pbuf->height, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
}
@@ -1067,14 +1067,14 @@ static GdkPixbuf *get_image_grayscale(FILE *f, TGAHeader *hdr,
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
@@ -1086,7 +1086,7 @@ static GdkPixbuf *get_image_grayscale(FILE *f, TGAHeader *hdr,
n += count;
for (; count; count--) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p[0] = p[1] = p[2] = color;
@@ -1097,7 +1097,7 @@ static GdkPixbuf *get_image_grayscale(FILE *f, TGAHeader *hdr,
} else {
for (n = 0; n < pbuf->width * pbuf->height; n++) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p[0] = p[1] = p[2] = color;