Skip to content

Commit

Permalink
Merge pull request #4 from aurelien-naldi/master
Browse files Browse the repository at this point in the history
Update toolchain
Thank you!
  • Loading branch information
sthiele authored Dec 18, 2018
2 parents 5761094 + 9327b9a commit 37f4880
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 29 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Clingo version 5.2.2.
provided by gcc 4.9 or libc++)

## Compile & Test
cargo +nightly build
cargo +nightly test
cargo +nightly run --example=ast 0
cargo +nightly run --example=backend 0
cargo +nightly run --example=configuration
cargo +nightly run --example=control 0
cargo +nightly run --example=model 0
cargo +nightly run --example=propagator 0
cargo +nightly run --example=solve-async 0
cargo +nightly run --example=statistics 0
cargo +nightly run --example=symbol 0
cargo +nightly run --example=symbolic-atoms 0
cargo +nightly run --example=theory-atoms 0
cargo +nightly run --example=inject-terms 0
cargo +nightly run --example=version
cargo build
cargo test
cargo run --example=ast 0
cargo run --example=backend 0
cargo run --example=configuration
cargo run --example=control 0
cargo run --example=model 0
cargo run --example=propagator 0
cargo run --example=solve-async 0
cargo run --example=statistics 0
cargo run --example=symbol 0
cargo run --example=symbolic-atoms 0
cargo run --example=theory-atoms 0
cargo run --example=inject-terms 0
cargo run --example=version

## Contribution

Expand Down
2 changes: 1 addition & 1 deletion clingo-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ path = "lib.rs"
libc = "0.2.20"

[build-dependencies]
gcc = "0.3"
cc = "1.0"
12 changes: 6 additions & 6 deletions clingo-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate gcc;
extern crate cc;

use std::path::Path;
use std::process::Command;
Expand Down Expand Up @@ -27,7 +27,7 @@ fn main() {
}

// libpotassco
gcc::Build::new()
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.flag("-O3")
Expand All @@ -49,7 +49,7 @@ fn main() {
.compile("libpotassco.a");

// libclasp
gcc::Build::new()
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.warnings(false)
Expand Down Expand Up @@ -90,7 +90,7 @@ fn main() {
.compile("libclasp.a");

// libgringo
gcc::Build::new()
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.warnings(false)
Expand Down Expand Up @@ -130,7 +130,7 @@ fn main() {
.compile("libgringo.a");

// libclingo
gcc::Build::new()
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.warnings(false)
Expand All @@ -153,7 +153,7 @@ fn main() {
.compile("libclingo.a");

// libreify
gcc::Build::new()
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.warnings(false)
Expand Down
13 changes: 6 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![feature(ptr_internals)]
#![allow(non_upper_case_globals)]
use std::ptr::Unique;
use std::ptr::NonNull;
use bitflags::bitflags;
use clingo_sys::*;
use libc::c_char;
Expand Down Expand Up @@ -1431,7 +1430,7 @@ pub trait Propagator {
/// Control object holding grounding and solving state.
#[derive(Debug)]
pub struct Control {
ctl: Unique<clingo_control_t>,
ctl: NonNull<clingo_control_t>,
}
impl Drop for Control {
fn drop(&mut self) {
Expand Down Expand Up @@ -1487,10 +1486,10 @@ impl Control {
&mut ctl_ptr,
)
} {
match Unique::new(ctl_ptr) {
match NonNull::new(ctl_ptr) {
Some(ctl) => Ok(Control { ctl: ctl }),
None => Err(WrapperError {
msg: "tried creating Unique from a null pointer.",
msg: "tried creating NonNull from a null pointer.",
})?,
}
} else {
Expand Down Expand Up @@ -1547,10 +1546,10 @@ impl Control {
&mut ctl_ptr,
)
} {
match Unique::new(ctl_ptr) {
match NonNull::new(ctl_ptr) {
Some(ctl) => Ok(Control { ctl: ctl }),
None => Err(WrapperError {
msg: "tried creating Unique from a null pointer.",
msg: "tried creating NonNull from a null pointer.",
})?,
}
} else {
Expand Down

0 comments on commit 37f4880

Please sign in to comment.