[librsvg] Remove unused function
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Remove unused function
- Date: Mon, 24 Sep 2018 23:57:01 +0000 (UTC)
commit a7c841025e4ca6bb7fa9ad4fbd7b710f63adf856
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Sep 24 17:08:59 2018 -0500
Remove unused function
librsvg/rsvg-css.h | 6 +-----
rsvg_internals/src/lib.rs | 2 --
rsvg_internals/src/parsers.rs | 35 -----------------------------------
3 files changed, 1 insertion(+), 42 deletions(-)
---
diff --git a/librsvg/rsvg-css.h b/librsvg/rsvg-css.h
index aebc543e..0827812e 100644
--- a/librsvg/rsvg-css.h
+++ b/librsvg/rsvg-css.h
@@ -58,12 +58,8 @@ RsvgCssColorSpec rsvg_css_parse_color_ (const char *str);
G_GNUC_INTERNAL
RsvgCssColorSpec rsvg_css_parse_color (const char *str);
-/* Implemented in rust/src/parsers.rs */
-G_GNUC_INTERNAL
-gboolean rsvg_css_parse_number_optional_number (const char *str, double *out_x, double *out_y);
-
#endif /* RSVG_COMPILATION */
G_END_DECLS
-#endif
+#endif
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index c7da7c78..d4ac2cd7 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -59,8 +59,6 @@ pub use tree::{
rsvg_tree_root_is_svg,
};
-pub use parsers::rsvg_css_parse_number_optional_number;
-
pub use property_bag::{
rsvg_property_bag_free,
rsvg_property_bag_iter_begin,
diff --git a/rsvg_internals/src/parsers.rs b/rsvg_internals/src/parsers.rs
index 064a6c21..5bb1f6a0 100644
--- a/rsvg_internals/src/parsers.rs
+++ b/rsvg_internals/src/parsers.rs
@@ -1,14 +1,10 @@
use cssparser::{BasicParseError, Parser, ParserInput, Token};
-use glib::translate::*;
-use glib_sys;
-use libc;
use std::f64::consts::*;
use std::str::{self, FromStr};
use attributes::Attribute;
use error::{NodeError, ValueErrorKind};
-use util::utf8_cstr;
#[derive(Debug, Clone, PartialEq)]
pub struct ParseError {
@@ -253,37 +249,6 @@ pub fn integer_optional_integer(s: &str) -> Result<(i32, i32), ValueErrorKind> {
}
}
-#[no_mangle]
-pub extern "C" fn rsvg_css_parse_number_optional_number(
- s: *const libc::c_char,
- out_x: *mut f64,
- out_y: *mut f64,
-) -> glib_sys::gboolean {
- assert!(!s.is_null());
- assert!(!out_x.is_null());
- assert!(!out_y.is_null());
-
- let string = unsafe { utf8_cstr(s) };
-
- match number_optional_number(string) {
- Ok((x, y)) => {
- unsafe {
- *out_x = x;
- *out_y = y;
- }
- true
- }
-
- Err(_) => {
- unsafe {
- *out_x = 0.0;
- *out_y = 0.0;
- }
- false
- }
- }.to_glib()
-}
-
// Parse a list-of-points as for polyline and polygon elements
// https://www.w3.org/TR/SVG/shapes.html#PointsBNF
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]