Commit 375a6f48 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent 17e785f4
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> 2003-06-01 Matthias Clasen <maclas@gmx.de>
* gdk-pixdata.h (struct _GdkPixdata): Fix misleading documentation * gdk-pixdata.h (struct _GdkPixdata): Fix misleading documentation
......
...@@ -819,7 +819,8 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata, ...@@ -819,7 +819,8 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
/** /**
* gdk_pixbuf_new_from_inline: * 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 * @data: Byte data containing a serialized #GdkPixdata structure
* @copy_pixels: Whether to copy the pixel data, or use direct pointers * @copy_pixels: Whether to copy the pixel data, or use direct pointers
* @data for the resulting pixbuf * @data for the resulting pixbuf
...@@ -847,13 +848,18 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata, ...@@ -847,13 +848,18 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
* generally a bad idea.) * generally a bad idea.)
* *
* If you create a pixbuf from const inline data compiled into your * If you create a pixbuf from const inline data compiled into your
* program, it's probably safe to ignore errors, since things will * program, it's probably safe to ignore errors and disable length checks,
* always succeed. For non-const inline data, you could get out of * since things will always succeed:
* memory. For untrusted inline data located at runtime, you could * <informalexample><programlisting>
* have corrupt inline data in addition. * 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, * 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* GdkPixbuf*
gdk_pixbuf_new_from_inline (gint data_length, gdk_pixbuf_new_from_inline (gint data_length,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment