Use gboolean, not bool for field in a repr(C) struct

See - bool in Rust does not
repr(C) as any C type in particular.  I was naively assuming that it
would repr(C) as int, which is equivalent to gboolean.

This makes tests/fixtures/dimensions/bug612951.svg pass again.  We were
calling rsvg_node_svg_get_view_box() and getting a garbage value inside - the low byte actually set as expected, and the high bits
set to garbage.
parent f11fd6c5
extern crate cairo;
extern crate glib;
use std::str::FromStr;
......@@ -6,12 +7,14 @@ use error::*;
use parsers::ParseError;
use parsers;
use glib::translate::*;
/* Keep this in sync with rsvg-private.h:RsvgViewBox */
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct RsvgViewBox {
pub rect: cairo::Rectangle,
pub active: bool
pub active: glib::ffi::gboolean
impl RsvgViewBox {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment