Update glib + gir and regenerate

This commit is contained in:
Felix Krull authored and Colin Walters committed 2022-05-06 12:53:55 -04:00
1 parent 28407036b1
commit 241806b757
25 files changed
+337 -356

No files matched your search

+6 -7
View File
@@ -5,14 +5,14 @@ repository = "fkrull/ostree-rs"
pkg-config = "0.3.7"
[dependencies]
gio-sys = "0.9.0"
glib-sys = "0.9.0"
gobject-sys = "0.9.0"
gio-sys = "0.9.1"
glib-sys = "0.9.1"
gobject-sys = "0.9.1"
libc = "0.2"
[dev-dependencies]
shell-words = "0.1.0"
tempdir = "0.3"
tempfile = "3"
[features]
v2014_9 = []
@@ -63,6 +63,5 @@ links = "ostree-1"
name = "ostree-sys"
repository = "https://gitlab.com/fkrull/ostree-rs"
version = "0.5.2"
["package.metadata.docs.rs"]
features = ["dox", "v2019_6"]
[package.metadata.docs.rs]
features = ["dox"]
+2 -2
View File
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ c0f523f)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ d1e88f9)
from gir-files (https://github.com/gtk-rs/gir-files @ a25ce65+)
+10 -9
View File
@@ -4,13 +4,14 @@
extern crate ostree_sys;
extern crate shell_words;
extern crate tempdir;
extern crate tempfile;
use std::env;
use std::error::Error;
use std::path::Path;
use std::mem::{align_of, size_of};
use std::process::Command;
use std::str;
use tempfile::Builder;
use ostree_sys::*;
static PACKAGES: &[&str] = &["ostree-1"];
@@ -21,7 +22,7 @@ struct Compiler {
}
impl Compiler {
pub fn new() -> Result<Compiler, Box<Error>> {
pub fn new() -> Result<Compiler, Box<dyn Error>> {
let mut args = get_var("CC", "cc")?;
args.push("-Wno-deprecated-declarations".to_owned());
// For %z support in printf when using MinGW.
@@ -40,7 +41,7 @@ impl Compiler {
self.args.push(arg);
}
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
let mut cmd = self.to_command();
cmd.arg(src);
cmd.arg("-o");
@@ -60,7 +61,7 @@ impl Compiler {
}
}
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
match env::var(name) {
Ok(value) => Ok(shell_words::split(&value)?),
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
@@ -68,7 +69,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
}
}
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
if packages.is_empty() {
return Ok(Vec::new());
}
@@ -130,7 +131,7 @@ impl Results {
#[test]
fn cross_validate_constants_with_c() {
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
let tmpdir = Builder::new().prefix("abi").tempdir().expect("temporary directory");
let cc = Compiler::new().expect("configured compiler");
assert_eq!("1",
@@ -163,7 +164,7 @@ fn cross_validate_constants_with_c() {
#[test]
fn cross_validate_layout_with_c() {
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
let tmpdir = Builder::new().prefix("abi").tempdir().expect("temporary directory");
let cc = Compiler::new().expect("configured compiler");
assert_eq!(Layout {size: 1, alignment: 1},
@@ -194,7 +195,7 @@ fn cross_validate_layout_with_c() {
results.expect_total_success();
}
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
let exe = dir.join("layout");
let mut cc = cc.clone();
cc.define("ABI_TYPE_NAME", name);
@@ -214,7 +215,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
Ok(Layout {size, alignment})
}
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
let exe = dir.join("constant");
let mut cc = cc.clone();
cc.define("ABI_CONSTANT_NAME", name);