[librsvg: 2/11] rsvg_allow_load(): Rename from _rsvg_handle_allow_load(); make it public



commit 5c55192f48b7ac094a5f4486f20af5124701694d
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Dec 4 13:11:37 2017 -0600

    rsvg_allow_load(): Rename from _rsvg_handle_allow_load(); make it public

 rsvg-base.c    |   14 ++++++++------
 rsvg-private.h |    5 +++++
 2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 5437ec6..43258ba 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -2665,15 +2665,17 @@ rsvg_return_if_fail_warning (const char *pretty_function, const char *expression
     g_set_error (error, RSVG_ERROR, 0, _("%s: assertion `%s' failed"), pretty_function, expression);
 }
 
-static gboolean
-_rsvg_handle_allow_load (GFile      *base_gfile,
-                         const char *uri,
-                         GError **error)
+gboolean
+rsvg_allow_load (GFile       *base_gfile,
+                 const char  *uri,
+                 GError     **error)
 {
     GFile *base;
     char *path, *dir;
     char *scheme = NULL, *cpath = NULL, *cdir = NULL;
 
+    g_assert (error == NULL || *error == NULL);
+
     scheme = g_uri_parse_scheme (uri);
 
     /* Not a valid URI */
@@ -2787,7 +2789,7 @@ _rsvg_handle_acquire_data (RsvgHandle *handle,
 
     uri = _rsvg_handle_resolve_uri (handle, url);
 
-    if (_rsvg_handle_allow_load (priv->base_gfile, uri, error)) {
+    if (rsvg_allow_load (priv->base_gfile, uri, error)) {
         data = _rsvg_io_acquire_data (uri,
                                       rsvg_handle_get_base_uri (handle),
                                       content_type,
@@ -2814,7 +2816,7 @@ _rsvg_handle_acquire_stream (RsvgHandle *handle,
 
     uri = _rsvg_handle_resolve_uri (handle, url);
 
-    if (_rsvg_handle_allow_load (priv->base_gfile, uri, error)) {
+    if (rsvg_allow_load (priv->base_gfile, uri, error)) {
         stream = _rsvg_io_acquire_stream (uri,
                                           rsvg_handle_get_base_uri (handle),
                                           content_type,
diff --git a/rsvg-private.h b/rsvg-private.h
index 546bf02..cbf50dc 100644
--- a/rsvg-private.h
+++ b/rsvg-private.h
@@ -562,6 +562,11 @@ void rsvg_return_if_fail_warning (const char *pretty_function,
                                   const char *expression, GError ** error);
 
 G_GNUC_INTERNAL
+gboolean rsvg_allow_load (GFile       *base_gfile,
+                          const char  *uri,
+                          GError     **error);
+
+G_GNUC_INTERNAL
 char *_rsvg_handle_acquire_data (RsvgHandle *handle,
                                  const char *uri,
                                  char **content_type,


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