summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-06-02 22:46:00 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-06-02 22:46:00 +0000
commit8cbf4cec97bb3ba9c0cd082f1e5dd36989e73e7b (patch)
treec4e6e327d7dd2ffc88bf90e16b29ca32201009ef /gdk-pixbuf
parent8bc79c100dd2ccb377c8cd5e9a67bdc02f5dcb6c (diff)
downloadgdk-pixbuf-8cbf4cec97bb3ba9c0cd082f1e5dd36989e73e7b.tar.gz
Document data_length == -1, add an example. (#97290)
2003-06-03 Matthias Clasen <maclas@gmx.de> * gdk-pixdata.c (gdk_pixbuf_new_from_inline): Document data_length == -1, add an example. (#97290)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog5
-rw-r--r--gdk-pixbuf/gdk-pixdata.c18
2 files changed, 17 insertions, 6 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 8d91168bf..ef6578bcc 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-03 Matthias Clasen <maclas@gmx.de>
+
+ * gdk-pixdata.c (gdk_pixbuf_new_from_inline): Document
+ data_length == -1, add an example. (#97290)
+
2003-06-01 Matthias Clasen <maclas@gmx.de>
* gdk-pixdata.h (struct _GdkPixdata): Fix misleading documentation
diff --git a/gdk-pixbuf/gdk-pixdata.c b/gdk-pixbuf/gdk-pixdata.c
index 222d4c4d3..21660484e 100644
--- a/gdk-pixbuf/gdk-pixdata.c
+++ b/gdk-pixbuf/gdk-pixdata.c
@@ -819,7 +819,8 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
/**
* gdk_pixbuf_new_from_inline:
- * @data_length: Length in bytes of the @data argument
+ * @data_length: Length in bytes of the @data argument or -1 to
+ * disable length checks
* @data: Byte data containing a serialized #GdkPixdata structure
* @copy_pixels: Whether to copy the pixel data, or use direct pointers
* @data for the resulting pixbuf
@@ -847,13 +848,18 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
* generally a bad idea.)
*
* If you create a pixbuf from const inline data compiled into your
- * program, it's probably safe to ignore errors, since things will
- * always succeed. For non-const inline data, you could get out of
- * memory. For untrusted inline data located at runtime, you could
- * have corrupt inline data in addition.
+ * program, it's probably safe to ignore errors and disable length checks,
+ * since things will always succeed:
+ * <informalexample><programlisting>
+ * pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, NULL);
+ * </programlisting></informalexample>
+ *
+ * For non-const inline data, you could get out of memory. For untrusted
+ * inline data located at runtime, you could have corrupt inline data in
+ * addition.
*
* Return value: A newly-created #GdkPixbuf structure with a reference,
- * count of 1, or %NULL if error is set.
+ * count of 1, or %NULL if an error occurred.
**/
GdkPixbuf*
gdk_pixbuf_new_from_inline (gint data_length,