[librsvg: 4/11] Fix all warnings from g-ir-scanner
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 4/11] Fix all warnings from g-ir-scanner
- Date: Fri, 11 Mar 2022 02:56:32 +0000 (UTC)
commit 9d75913d37c60dd6598dc98ee3c48e4d39a3e1f0
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 10 16:59:43 2022 -0600
Fix all warnings from g-ir-scanner
(optional) for GError is wrong, since it is not (out).
Remove empty lines between elements in RsvgHandleFlags.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/674>
Makefile.am | 2 +-
include/librsvg/rsvg-cairo.h | 10 +++++-----
include/librsvg/rsvg.h | 28 +++++++++++++---------------
3 files changed, 19 insertions(+), 21 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c9b3752e1..a2ec6f42e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -264,7 +264,7 @@ if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Rsvg-@RSVG_API_VERSION@.gir
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg
--warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
Rsvg-@RSVG_API_VERSION@.gir: librsvg-@RSVG_API_MAJOR_VERSION@.la
diff --git a/include/librsvg/rsvg-cairo.h b/include/librsvg/rsvg-cairo.h
index b3756f1e4..fe5d8d84c 100644
--- a/include/librsvg/rsvg-cairo.h
+++ b/include/librsvg/rsvg-cairo.h
@@ -157,7 +157,7 @@ gboolean rsvg_handle_render_cairo_sub (RsvgHandle *handle, cairo_t *cr, const ch
* @handle: An `RsvgHandle`
* @cr: A Cairo context
* @viewport: Viewport size at which the whole SVG would be fitted.
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Renders the whole SVG document fitted to a viewport.
*
@@ -193,7 +193,7 @@ gboolean rsvg_handle_render_document (RsvgHandle *handle,
* @viewport: Viewport size at which the whole SVG would be fitted.
* @out_ink_rect: (out)(optional): Place to store the ink rectangle of the element.
* @out_logical_rect: (out)(optional): Place to store the logical rectangle of the element.
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Computes the ink rectangle and logical rectangle of an SVG element, or the
* whole SVG, as if the whole SVG were rendered to a specific viewport.
@@ -244,7 +244,7 @@ gboolean rsvg_handle_get_geometry_for_layer (RsvgHandle *handle,
* hash character), for example, `#layer1`. This notation corresponds to a
* URL's fragment ID. Alternatively, pass `NULL` to render the whole SVG document tree.
* @viewport: Viewport size at which the whole SVG would be fitted.
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Renders a single SVG element in the same place as for a whole SVG document.
*
@@ -293,7 +293,7 @@ gboolean rsvg_handle_render_layer (RsvgHandle *handle,
* whole SVG.
* @out_ink_rect: (out)(optional): Place to store the ink rectangle of the element.
* @out_logical_rect: (out)(optional): Place to store the logical rectangle of the element.
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Computes the ink rectangle and logical rectangle of a single SVG element.
*
@@ -349,7 +349,7 @@ gboolean rsvg_handle_get_geometry_for_element (RsvgHandle *handle,
* hash character), for example, `#layer1`. This notation corresponds to a
* URL's fragment ID. Alternatively, pass `NULL` to render the whole SVG document tree.
* @element_viewport: Viewport size in which to fit the element
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Renders a single SVG element to a given viewport.
*
diff --git a/include/librsvg/rsvg.h b/include/librsvg/rsvg.h
index 8b8b07d8e..a8237402c 100644
--- a/include/librsvg/rsvg.h
+++ b/include/librsvg/rsvg.h
@@ -552,7 +552,7 @@ RsvgHandle *rsvg_handle_new (void);
* @handle: an `RsvgHandle`
* @buf: (array length=count) (element-type guchar): pointer to svg data
* @count: length of the @buf buffer in bytes
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Loads the next @count bytes of the image. You can call this function multiple
* times until the whole document is consumed; then you must call rsvg_handle_close()
@@ -582,7 +582,7 @@ gboolean rsvg_handle_write (RsvgHandle *handle,
/**
* rsvg_handle_close:
* @handle: a `RsvgHandle`
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* This is used after calling rsvg_handle_write() to indicate that there is no more data
* to consume, and to start the actual parsing of the SVG document. The only reason to
@@ -958,12 +958,10 @@ gboolean rsvg_handle_get_intrinsic_size_in_pixels (RsvgHandle *handle,
/**
* RsvgHandleFlags:
* @RSVG_HANDLE_FLAGS_NONE: No flags are set.
- *
* @RSVG_HANDLE_FLAG_UNLIMITED: Disable safety limits in the XML parser. Libxml2 has
* [several limits](https://gitlab.gnome.org/GNOME/libxml2/blob/master/include/libxml/parserInternals.h)
* designed to keep malicious XML content from consuming too much memory while parsing.
* For security reasons, this should only be used for trusted input! Since: 2.40.3
- *
* @RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA: Use this if the Cairo surface to which you are
* rendering is a PDF, PostScript, SVG, or Win32 Printing surface. This will make librsvg
* and Cairo use the original, compressed data for images in the final output, instead of
@@ -1025,7 +1023,7 @@ void rsvg_handle_set_base_gfile (RsvgHandle *handle,
* @handle: a `RsvgHandle`
* @stream: a `GInputStream`
* @cancellable: (nullable): a `GCancellable`, or `NULL`
- * @error: (optional): a location to store a `GError` or `NULL`
+ * @error: return location for a `GError`
*
* Reads @stream and writes the data from it to @handle.
*
@@ -1056,7 +1054,7 @@ gboolean rsvg_handle_read_stream_sync (RsvgHandle *handle,
* @file: a `GFile`
* @flags: flags from `RsvgHandleFlags`
* @cancellable: (nullable): a `GCancellable`, or `NULL`
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Creates a new `RsvgHandle` for @file.
*
@@ -1085,7 +1083,7 @@ RsvgHandle *rsvg_handle_new_from_gfile_sync (GFile *file,
* @base_file: (nullable): a `GFile`, or `NULL`
* @flags: flags from `RsvgHandleFlags`
* @cancellable: (nullable): a `GCancellable`, or `NULL`
- * @error: (optional): a location to store a `GError`, or `NULL`
+ * @error: return location for a `GError`
*
* Creates a new `RsvgHandle` for @stream.
*
@@ -1113,7 +1111,7 @@ RsvgHandle *rsvg_handle_new_from_stream_sync (GInputStream *input_stream,
* rsvg_handle_new_from_data:
* @data: (array length=data_len): The SVG data
* @data_len: The length of @data, in bytes
- * @error: (optional): return location for errors
+ * @error: return location for a `GError`
*
* Loads the SVG specified by @data. Note that this function creates an
* `RsvgHandle` without a base URL, and without any #RsvgHandleFlags. If you
@@ -1129,7 +1127,7 @@ RsvgHandle *rsvg_handle_new_from_data (const guint8 *data, gsize data_len, GErro
/**
* rsvg_handle_new_from_file:
* @filename: The file name to load, or a URI.
- * @error: (optional): return location for errors
+ * @error: return location for a `GError`
*
* Loads the SVG specified by @file_name. Note that this function, like
* rsvg_handle_new(), does not specify any loading flags for the resulting
@@ -1147,7 +1145,7 @@ RsvgHandle *rsvg_handle_new_from_file (const gchar *filename, GError **error);
* @handle: A `RsvgHandle`.
* @css: (array length=css_len): String with CSS data; must be valid UTF-8.
* @css_len: Length of the @css data in bytes.
- * @error: (optional): return location for errors.
+ * @error: return location for a `GError`
*
* Sets a CSS stylesheet to use for an SVG document.
*
@@ -1286,7 +1284,7 @@ void rsvg_handle_set_size_callback (RsvgHandle *handle,
/**
* rsvg_pixbuf_from_file:
* @filename: A file name
- * @error: return location for errors
+ * @error: return location for a `GError`
*
* Loads a new `GdkPixbuf` from @filename and returns it. The caller must
* assume the reference to the reurned pixbuf. If an error occurred, @error is
@@ -1304,7 +1302,7 @@ GdkPixbuf *rsvg_pixbuf_from_file (const gchar *filename,
* @filename: A file name
* @x_zoom: The horizontal zoom factor
* @y_zoom: The vertical zoom factor
- * @error: return location for errors
+ * @error: return location for a `GError`
*
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is scaled
* from the size indicated by the file by a factor of @x_zoom and @y_zoom. The
@@ -1325,7 +1323,7 @@ GdkPixbuf *rsvg_pixbuf_from_file_at_zoom (const gchar *filename,
* @filename: A file name
* @width: The new width, or -1
* @height: The new height, or -1
- * @error: return location for errors
+ * @error: return location for a `GError`
*
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is scaled
* from the size indicated to the new size indicated by @width and @height. If
@@ -1347,7 +1345,7 @@ GdkPixbuf *rsvg_pixbuf_from_file_at_size (const gchar *filename,
* @filename: A file name
* @max_width: The requested max width
* @max_height: The requested max height
- * @error: return location for errors
+ * @error: return location for a `GError`
*
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is uniformly
* scaled so that the it fits into a rectangle of size `max_width * max_height`. The
@@ -1369,7 +1367,7 @@ GdkPixbuf *rsvg_pixbuf_from_file_at_max_size (const gchar *filename,
* @y_zoom: The vertical zoom factor
* @max_width: The requested max width
* @max_height: The requested max height
- * @error: return location for errors
+ * @error: return location for a `GError`
*
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is scaled
* from the size indicated by the file by a factor of @x_zoom and @y_zoom. If the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]