summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorSven Herzberg <sven@imendio.com>2008-08-06 16:15:31 +0000
committerSven Herzberg <herzi@src.gnome.org>2008-08-06 16:15:31 +0000
commitc41e8b2b54e6e01090511c2fd8c762b2ad0399a3 (patch)
tree287b42af4991e7c94e20f31bcfb7daf8c6fd9f15 /gdk-pixbuf
parente17c69c915d9e3fa6d84c2c6dd5f04268bce55cb (diff)
downloadgdk-pixbuf-c41e8b2b54e6e01090511c2fd8c762b2ad0399a3.tar.gz
Bug 546549 : Better Type Checking reviewed by mitch
2008-08-06 Sven Herzberg <sven@imendio.com> Bug 546549 : Better Type Checking reviewed by mitch * gdk-pixbuf.c (gdk_pixbuf_copy), (gdk_pixbuf_get_colorspace), (gdk_pixbuf_get_n_channels), (gdk_pixbuf_get_has_alpha), (gdk_pixbuf_get_bits_per_sample), (gdk_pixbuf_get_pixels), (gdk_pixbuf_get_width), (gdk_pixbuf_get_height), (gdk_pixbuf_get_rowstride): use GDK_IS_PIXBUF() and not pixbuf != NULL in g_return_*() statements svn path=/trunk/; revision=21025
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index 7dd9838c1..86a54ab09 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -291,7 +291,7 @@ gdk_pixbuf_copy (const GdkPixbuf *pixbuf)
guchar *buf;
int size;
- g_return_val_if_fail (pixbuf != NULL, NULL);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
/* Calculate a semi-exact size. Here we copy with full rowstrides;
* maybe we should copy each row individually with the minimum
@@ -385,7 +385,7 @@ gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf,
GdkColorspace
gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, GDK_COLORSPACE_RGB);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), GDK_COLORSPACE_RGB);
return pixbuf->colorspace;
}
@@ -401,7 +401,7 @@ gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf)
int
gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, -1);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1);
return pixbuf->n_channels;
}
@@ -417,7 +417,7 @@ gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf)
gboolean
gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, FALSE);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), FALSE);
return pixbuf->has_alpha ? TRUE : FALSE;
}
@@ -433,7 +433,7 @@ gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf)
int
gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, -1);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1);
return pixbuf->bits_per_sample;
}
@@ -451,7 +451,7 @@ gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf)
guchar *
gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, NULL);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
return pixbuf->pixels;
}
@@ -467,7 +467,7 @@ gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf)
int
gdk_pixbuf_get_width (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, -1);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1);
return pixbuf->width;
}
@@ -483,7 +483,7 @@ gdk_pixbuf_get_width (const GdkPixbuf *pixbuf)
int
gdk_pixbuf_get_height (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, -1);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1);
return pixbuf->height;
}
@@ -500,7 +500,7 @@ gdk_pixbuf_get_height (const GdkPixbuf *pixbuf)
int
gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf)
{
- g_return_val_if_fail (pixbuf != NULL, -1);
+ g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1);
return pixbuf->rowstride;
}