[librsvg] introspection: add many missing nullable annotations



commit bed3f143b64ad865c9cab0acbc9e8f461ac143cd
Author: Evan Nemerson <evan nemerson com>
Date:   Tue Jun 3 14:58:01 2014 -0700

    introspection: add many missing nullable annotations
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731182

 rsvg-base.c         |   15 ++++++++-------
 rsvg-cairo-render.c |    6 +++---
 rsvg-filter.c       |    8 ++++----
 rsvg-paint-server.c |    3 ++-
 rsvg-styles.c       |    4 ++--
 rsvg.c              |   10 +++++-----
 6 files changed, 24 insertions(+), 22 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index d505299..b1cc71a 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1206,7 +1206,7 @@ rsvg_drawing_ctx_free (RsvgDrawingCtx * handle)
  * Returns the SVG's metadata in UTF-8 or %NULL. You must make a copy
  * of this metadata if you wish to use it after @handle has been freed.
  *
- * Returns: The SVG's title
+ * Returns: (nullable): The SVG's title
  *
  * Since: 2.9
  *
@@ -1230,7 +1230,7 @@ rsvg_handle_get_metadata (RsvgHandle * handle)
  * Returns the SVG's title in UTF-8 or %NULL. You must make a copy
  * of this title if you wish to use it after @handle has been freed.
  *
- * Returns: The SVG's title
+ * Returns: (nullable): The SVG's title
  *
  * Since: 2.4
  *
@@ -1254,7 +1254,7 @@ rsvg_handle_get_title (RsvgHandle * handle)
  * Returns the SVG's description in UTF-8 or %NULL. You must make a copy
  * of this description if you wish to use it after @handle has been freed.
  *
- * Returns: The SVG's description
+ * Returns: (nullable): The SVG's description
  *
  * Since: 2.4
  *
@@ -1301,9 +1301,10 @@ rsvg_handle_get_dimensions (RsvgHandle * handle, RsvgDimensionData * dimension_d
  * rsvg_handle_get_dimensions_sub:
  * @handle: A #RsvgHandle
  * @dimension_data: (out): A place to store the SVG's size
- * @id: An element's id within the SVG, or %NULL to get the dimension of the whole SVG.
- * For example, if you have a layer called "layer1" for that you want to get the dimension, 
- * pass "#layer1" as the id.
+ * @id: (nullable): An element's id within the SVG, or %NULL to get
+ *   the dimension of the whole SVG.  For example, if you have a layer
+ *   called "layer1" for that you want to get the dimension, pass
+ *   "#layer1" as the id.
  *
  * Get the size of a subelement of the SVG file. Do not call from within the size_func callback, because an 
infinite loop will occur.
  *
@@ -1614,7 +1615,7 @@ rsvg_handle_set_dpi_x_y (RsvgHandle * handle, double dpi_x, double dpi_y)
 /**
  * rsvg_handle_set_size_callback:
  * @handle: An #RsvgHandle
- * @size_func: A sizing function, or %NULL
+ * @size_func: (nullable): A sizing function, or %NULL
  * @user_data: User data to pass to @size_func, or %NULL
  * @user_data_destroy: Destroy function for @user_data, or %NULL
  *
diff --git a/rsvg-cairo-render.c b/rsvg-cairo-render.c
index 8519345..011e805 100644
--- a/rsvg-cairo-render.c
+++ b/rsvg-cairo-render.c
@@ -181,9 +181,9 @@ rsvg_cairo_new_drawing_ctx (cairo_t * cr, RsvgHandle * handle)
  * rsvg_handle_render_cairo_sub:
  * @handle: A #RsvgHandle
  * @cr: A Cairo renderer
- * @id: An element's id within the SVG, or %NULL to render the whole SVG. For
- * example, if you have a layer called "layer1" that you wish to render, pass 
- * "##layer1" as the id.
+ * @id: (nullable): An element's id within the SVG, or %NULL to render
+ *   the whole SVG. For example, if you have a layer called "layer1"
+ *   that you wish to render, pass "##layer1" as the id.
  *
  * Draws a subset of a SVG to a Cairo surface
  *
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 39802e5..72d80ff 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -650,7 +650,7 @@ rsvg_compile_bg (RsvgDrawingCtx * ctx)
 /**
  * rsvg_filter_get_bg:
  * 
- * Returns: (transfer none): a #cairo_surface_t, or %NULL
+ * Returns: (transfer none) (nullable): a #cairo_surface_t, or %NULL
  */
 static cairo_surface_t *
 rsvg_filter_get_bg (RsvgFilterContext * ctx)
@@ -669,7 +669,7 @@ rsvg_filter_get_bg (RsvgFilterContext * ctx)
  *
  * Gets a surface for a primitive
  *
- * Returns: a pointer to the result that the name refers to, a special
+ * Returns: (nullable): a pointer to the result that the name refers to, a special
  * surface if the name is a special keyword or %NULL if nothing was found
  **/
 static RsvgFilterPrimitiveOutput
@@ -725,7 +725,7 @@ rsvg_filter_get_result (GString * name, RsvgFilterContext * ctx)
  * @name:
  * @ctx:
  * 
- * Returns: (transfer full): a new #cairo_surface_t, or %NULL
+ * Returns: (transfer full) (nullable): a new #cairo_surface_t, or %NULL
  */
 static cairo_surface_t *
 rsvg_filter_get_in (GString * name, RsvgFilterContext * ctx)
@@ -740,7 +740,7 @@ rsvg_filter_get_in (GString * name, RsvgFilterContext * ctx)
  *
  * Looks up an allready created filter.
  *
- * Returns: a pointer to the filter that the name refers to, or %NULL
+ * Returns: (nullable): a pointer to the filter that the name refers to, or %NULL
  * if none was found
  **/
 RsvgFilter *
diff --git a/rsvg-paint-server.c b/rsvg-paint-server.c
index f788607..7c5fef2 100644
--- a/rsvg-paint-server.c
+++ b/rsvg-paint-server.c
@@ -108,7 +108,8 @@ rsvg_paint_server_pattern (RsvgPattern * pattern)
  * Parses the paint specification @str, creating a new paint server
  * object.
  *
- * Return value: The newly created paint server, or %NULL on error.
+ * Return value: (nullable): The newly created paint server, or %NULL
+ *   on error.
  **/
 RsvgPaintServer *
 rsvg_paint_server_parse (gboolean * inherit, const RsvgDefs * defs, const char *str,
diff --git a/rsvg-styles.c b/rsvg-styles.c
index 89ef29a..2f2f152 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -1372,8 +1372,8 @@ rsvg_lookup_apply_css_style (RsvgHandle * ctx, const char *target, RsvgState * s
  * rsvg_parse_style_attrs:
  * @ctx: Rsvg context.
  * @state: Rsvg state
- * @tag: The SVG tag we're processing (eg: circle, ellipse), optionally %NULL
- * @klazz: The space delimited class list, optionally %NULL
+ * @tag: (nullable): The SVG tag we're processing (eg: circle, ellipse), optionally %NULL
+ * @klazz: (nullable): The space delimited class list, optionally %NULL
  * @atts: Attributes in SAX style.
  *
  * Parses style and transform attributes and modifies state at top of
diff --git a/rsvg.c b/rsvg.c
index e72a94e..31c4baf 100644
--- a/rsvg.c
+++ b/rsvg.c
@@ -47,9 +47,9 @@
 /**
  * rsvg_handle_get_pixbuf_sub:
  * @handle: An #RsvgHandle
- * @id: The id of an element inside the SVG, or %NULL to render the whole SVG. For
- * example, if you have a layer called "layer1" that you wish to render, pass 
- * "##layer1" as the id.
+ * @id: (nullable): The id of an element inside the SVG, or %NULL to
+ * render the whole SVG. For example, if you have a layer called
+ * "layer1" that you wish to render, pass "##layer1" as the id.
  *
  * Returns the pixbuf loaded by @handle.  The pixbuf returned will be reffed, so
  * the caller of this function must assume that ref.  If insufficient data has
@@ -57,7 +57,7 @@
  * will be returned.  Note that the pixbuf may not be complete until
  * @rsvg_handle_close has been called.
  *
- * Returns: (transfer full): the pixbuf loaded by @handle, or %NULL.
+ * Returns: (transfer full) (nullable): the pixbuf loaded by @handle, or %NULL.
  *
  * Since: 2.14
  **/
@@ -111,7 +111,7 @@ rsvg_handle_get_pixbuf_sub (RsvgHandle * handle, const char *id)
  * will be returned.  Note that the pixbuf may not be complete until
  * @rsvg_handle_close has been called.
  *
- * Returns: (transfer full): the pixbuf loaded by @handle, or %NULL.
+ * Returns: (transfer full) (nullable): the pixbuf loaded by @handle, or %NULL.
  **/
 GdkPixbuf *
 rsvg_handle_get_pixbuf (RsvgHandle * handle)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]