[librsvg] LoadOptions.locale: make this field private and add a getter



commit 6cf3135e27b8e46c38fc3267202c84165086a82d
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Apr 5 12:56:52 2019 -0600

    LoadOptions.locale: make this field private and add a getter

 rsvg_internals/src/handle.rs | 6 +++++-
 rsvg_internals/src/xml.rs    | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index c4c9a77b..7d83619c 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -41,7 +41,7 @@ pub struct LoadFlags {
 pub struct LoadOptions {
     pub flags: LoadFlags,
     pub base_url: Option<Url>,
-    pub locale: Locale,
+    locale: Locale,
 }
 
 impl LoadOptions {
@@ -60,6 +60,10 @@ impl LoadOptions {
             locale: self.locale.clone(),
         }
     }
+
+    pub fn locale(&self) -> &Locale {
+        &self.locale
+    }
 }
 
 #[derive(Copy, Clone, PartialEq)]
diff --git a/rsvg_internals/src/xml.rs b/rsvg_internals/src/xml.rs
index 55d46184..1342e291 100644
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@ -320,7 +320,7 @@ impl XmlState {
             parent.add_child(&new_node);
         }
 
-        new_node.set_atts(&new_node, pbag, &self.load_options.locale);
+        new_node.set_atts(&new_node, pbag, self.load_options.locale());
 
         // The "svg" node is special; it will parse its style attributes
         // until the end, in standard_element_end().


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