[librsvg: 4/38] Adjust for changes in cairo::Status vs. cairo_sys::cairo_status_t



commit c3b84d71fe74da7a753cebdc0475e01195095ad9
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jan 16 18:05:14 2019 -0600

    Adjust for changes in cairo::Status vs. cairo_sys::cairo_status_t
    
    Once https://github.com/gtk-rs/cairo/issues/228 gets fixed, we can
    integrate https://gitlab.gnome.org/GNOME/librsvg/merge_requests/157
    and remove this unsafe call to cairo_surface_set_mime_data().

 rsvg_internals/src/svg.rs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/svg.rs b/rsvg_internals/src/svg.rs
index dc75d9d5..48284c0d 100644
--- a/rsvg_internals/src/svg.rs
+++ b/rsvg_internals/src/svg.rs
@@ -1,4 +1,3 @@
-use cairo::Status;
 use gdk_pixbuf::{PixbufLoader, PixbufLoaderExt};
 use gio;
 use glib::translate::*;
@@ -202,7 +201,7 @@ fn load_image(
                     length: libc::c_ulong,
                     destroy: cairo_sys::cairo_destroy_func_t,
                     closure: *mut libc::c_void,
-                ) -> Status;
+                ) -> cairo_sys::cairo_status_t;
             }
 
             let data_ptr = ToGlibContainerFromSlice::to_glib_full_from_slice(&data.data);
@@ -217,8 +216,8 @@ fn load_image(
                     data_ptr as *mut _,
                 );
 
-                if status != Status::Success {
-                    return Err(LoadingError::Cairo(status));
+                if status != cairo_sys::STATUS_SUCCESS {
+                    return Err(LoadingError::Cairo(status.into()));
                 }
             }
         }


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