[librsvg/librsvg-2.40] rsvg_allow_load(): Rename from _rsvg_handle_allow_load(); make it public



commit f3ec294c943b4fe54134b6b636506eba0a9434e7
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, 12 insertions(+), 7 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 9b1ab05..bbdfecc 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -2397,16 +2397,16 @@ 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 (handle->priv->load_policy == RSVG_LOAD_POLICY_STRICT);
+    g_assert (error == NULL || *error == NULL);
 
     scheme = g_uri_parse_scheme (uri);
 
@@ -2521,7 +2521,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,
@@ -2548,7 +2548,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 85936d1..bbb76c7 100644
--- a/rsvg-private.h
+++ b/rsvg-private.h
@@ -421,6 +421,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]