forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
361a038743
commit
bff6e61aba
@ -1,3 +1,15 @@
|
||||
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
|
||||
|
||||
2008-08-05 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.13.6 ===
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user