[librsvg] rsvg_node_set_attribute_parse_error(): Removed unused function



commit 554366bd31d3050495d7a4e2a1c1c8fea363181b
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Aug 3 12:18:53 2018 -0500

    rsvg_node_set_attribute_parse_error(): Removed unused function

 librsvg/rsvg-private.h     |  4 ----
 rsvg_internals/src/lib.rs  |  1 -
 rsvg_internals/src/node.rs | 28 +---------------------------
 3 files changed, 1 insertion(+), 32 deletions(-)
---
diff --git a/librsvg/rsvg-private.h b/librsvg/rsvg-private.h
index c33f69f1..ae29d2e2 100644
--- a/librsvg/rsvg-private.h
+++ b/librsvg/rsvg-private.h
@@ -270,10 +270,6 @@ void rsvg_node_add_child (RsvgNode *node, RsvgNode *child);
 G_GNUC_INTERNAL
 void rsvg_node_set_overridden_properties (RsvgNode *node);
 
-/* Implemented in rust/src/node.rs */
-G_GNUC_INTERNAL
-void rsvg_node_set_attribute_parse_error (RsvgNode *node, const char *attr_name, const char *description);
-
 typedef struct RsvgNodeChildrenIter *RsvgNodeChildrenIter;
 
 /* Implemented in rust/src/node.rs */
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index 3c9958b3..066c6260 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -50,7 +50,6 @@ pub use node::{
     rsvg_node_get_type,
     rsvg_node_is_same,
     rsvg_node_ref,
-    rsvg_node_set_attribute_parse_error,
     rsvg_node_unref,
     rsvg_root_node_cascade,
 };
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index bb158922..28839733 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -3,19 +3,17 @@ use downcast_rs::*;
 use glib;
 use glib::translate::*;
 use glib_sys;
-use libc;
 
 use std::cell::{Cell, Ref, RefCell};
 use std::ptr;
 use std::rc::{Rc, Weak};
-use std::str::FromStr;
 
 use attributes::Attribute;
 use cond::{RequiredExtensions, RequiredFeatures, SystemLanguage};
 use drawing_ctx::DrawingCtx;
 use error::*;
 use handle::RsvgHandle;
-use parsers::{Parse, ParseError};
+use parsers::Parse;
 use property_bag::PropertyBag;
 use state::{
     self,
@@ -27,7 +25,6 @@ use state::{
     SpecifiedValues,
     State,
 };
-use util::utf8_cstr;
 
 // A *const RsvgNode is just a pointer for the C code's benefit: it
 // points to an  Rc<Node>, which is our refcounted Rust representation
@@ -679,29 +676,6 @@ pub extern "C" fn rsvg_node_add_child(raw_node: *mut RsvgNode, raw_child: *const
     node.add_child(child);
 }
 
-#[no_mangle]
-pub extern "C" fn rsvg_node_set_attribute_parse_error(
-    raw_node: *const RsvgNode,
-    attr_name: *const libc::c_char,
-    description: *const libc::c_char,
-) {
-    assert!(!raw_node.is_null());
-    let node: &RsvgNode = unsafe { &*raw_node };
-
-    assert!(!attr_name.is_null());
-    assert!(!description.is_null());
-
-    unsafe {
-        let attr_name = utf8_cstr(attr_name);
-        let attr = Attribute::from_str(attr_name).unwrap();
-
-        node.set_error(NodeError::parse_error(
-            attr,
-            ParseError::new(&String::from_glib_none(description)),
-        ));
-    }
-}
-
 #[no_mangle]
 pub extern "C" fn rsvg_node_find_last_chars_child(
     raw_node: *const RsvgNode,


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