summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-01-21 22:54:44 +0000
committerArturo Espinosa <unammx@src.gnome.org>2000-01-21 22:54:44 +0000
commitbb8a56373065c6189c5b7238f6661bbd904f5cf9 (patch)
treefed236223632b82217040d3337217a3f615533ff /gdk-pixbuf/gdk-pixbuf.c
parent2f27c99f364cd4ac170fe6050263bae19f7c401d (diff)
downloadgdk-pixbuf-bb8a56373065c6189c5b7238f6661bbd904f5cf9.tar.gz
Return the same pixbuf as the input parameter.
2000-01-21 Federico Mena Quintero <federico@helixcode.com> * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_ref): Return the same pixbuf as the input parameter. * gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_animation_ref): Return the same animation as the input parameter.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf.c')
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index fab12f2e3..792f04b74 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -41,14 +41,17 @@
*
* Adds a reference to a pixbuf. It must be released afterwards using
* gdk_pixbuf_unref().
+ *
+ * Return value: The same as the @pixbuf argument.
**/
-void
+GdkPixbuf *
gdk_pixbuf_ref (GdkPixbuf *pixbuf)
{
- g_return_if_fail (pixbuf != NULL);
- g_return_if_fail (pixbuf->ref_count > 0);
+ g_return_val_if_fail (pixbuf != NULL, NULL);
+ g_return_val_if_fail (pixbuf->ref_count > 0, NULL);
pixbuf->ref_count++;
+ return pixbuf;
}
/**