[librsvg: 2/2] Merge branch 'pborelli/librsvg-handle'
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/2] Merge branch 'pborelli/librsvg-handle'
- Date: Tue, 9 Apr 2019 23:18:43 +0000 (UTC)
commit f281d38a32d009702cd1ea07bc28b7cc38d431c7
Merge: bf088c67 127de3eb
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Apr 9 18:18:02 2019 -0500
Merge branch 'pborelli/librsvg-handle'
librsvg_crate/src/lib.rs | 13 ++++---------
rsvg_internals/src/c_api.rs | 13 +++++++++++--
rsvg_internals/src/handle.rs | 36 +++++++++++++++++++++---------------
rsvg_internals/src/lib.rs | 2 +-
rsvg_internals/src/pixbuf_utils.rs | 4 ++--
rsvg_internals/src/svg.rs | 2 +-
rsvg_internals/src/xml.rs | 2 +-
rsvg_internals/src/xml2_load.rs | 9 ++++-----
8 files changed, 45 insertions(+), 36 deletions(-)
---
diff --cc librsvg_crate/src/lib.rs
index 5896d698,f0b6cf6c..e3e4b226
--- a/librsvg_crate/src/lib.rs
+++ b/librsvg_crate/src/lib.rs
@@@ -96,8 -96,9 +96,8 @@@ use url::Url
use std::path::Path;
use gio::{Cancellable, FileExt};
-use glib::object::Cast;
- use rsvg_internals::{Dpi, Handle, LoadFlags};
+ use rsvg_internals::{Dpi, Handle};
pub use rsvg_internals::{
DefsLookupErrorKind, HrefError, Length, LengthUnit, LoadOptions, LoadingError, RenderingError,
diff --cc rsvg_internals/src/xml.rs
index a034f7dc,2588bc03..5c96a4b0
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@@ -488,12 -487,12 +488,12 @@@ impl XmlState
//
// This can be called "in the middle" of an XmlState's processing status,
// for example, when including another XML file via xi:include.
- fn parse_from_stream(
+ fn parse_from_stream<S: IsA<gio::InputStream>>(
&mut self,
- stream: gio::InputStream,
+ stream: S,
cancellable: Option<&gio::Cancellable>,
) -> Result<(), ParseFromStreamError> {
- Xml2Parser::from_stream(self, self.load_options.flags, stream, cancellable)
+ Xml2Parser::from_stream(self, self.load_options.unlimited_size, stream, cancellable)
.and_then(|parser| parser.parse())
}
diff --cc rsvg_internals/src/xml2_load.rs
index 9092a757,798c4b9b..d9bbb018
--- a/rsvg_internals/src/xml2_load.rs
+++ b/rsvg_internals/src/xml2_load.rs
@@@ -318,10 -316,10 +317,10 @@@ pub struct Xml2Parser
}
impl Xml2Parser {
- pub fn from_stream(
+ pub fn from_stream<S: IsA<gio::InputStream>>(
xml: &mut XmlState,
- load_flags: LoadFlags,
+ unlimited_size: bool,
- stream: gio::InputStream,
+ stream: S,
cancellable: Option<&gio::Cancellable>,
) -> Result<Xml2Parser, ParseFromStreamError> {
init_libxml2();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]