Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Use syntex::with_extra_stack
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 20, 2016
1 parent acc9164 commit 1355f90
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 20 deletions.
6 changes: 3 additions & 3 deletions quasi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi"
version = "0.17.0"
version = "0.18.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -13,5 +13,5 @@ unstable-testing = ["clippy"]

[dependencies]
clippy = { version = "^0.*", optional = true }
syntex_errors = { version = "^0.41.0", optional = true }
syntex_syntax = { version = "^0.41.0", optional = true }
syntex_errors = { version = "^0.42.0", optional = true }
syntex_syntax = { version = "^0.42.0", optional = true }
10 changes: 5 additions & 5 deletions quasi_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_codegen"
version = "0.17.0"
version = "0.18.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -13,8 +13,8 @@ with-syntex = ["syntex", "syntex_errors", "syntex_syntax", "aster/with-syntex"]
unstable-testing = ["clippy"]

[dependencies]
aster = { version = "^0.24.0", default-features = false }
aster = { version = "^0.25.0", default-features = false }
clippy = { version = "^0.*", optional = true }
syntex = { version = "^0.41.0", optional = true }
syntex_errors = { version = "^0.41.0", optional = true }
syntex_syntax = { version = "^0.41.0", optional = true }
syntex = { version = "^0.42.2", optional = true }
syntex_errors = { version = "^0.42.0", optional = true }
syntex_syntax = { version = "^0.42.0", optional = true }
11 changes: 8 additions & 3 deletions quasi_codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,14 @@ pub fn expand<S, D>(src: S, dst: D) -> Result<(), syntex::Error>
where S: AsRef<Path>,
D: AsRef<Path>,
{
let mut registry = syntex::Registry::new();
register(&mut registry);
registry.expand("", src.as_ref(), dst.as_ref())
let src = src.as_ref().to_owned();
let dst = dst.as_ref().to_owned();

syntex::with_extra_stack(move || {
let mut registry = syntex::Registry::new();
register(&mut registry);
registry.expand("", src, dst)
})
}

#[cfg(feature = "with-syntex")]
Expand Down
8 changes: 4 additions & 4 deletions quasi_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_macros"
version = "0.17.0"
version = "0.18.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -16,8 +16,8 @@ unstable-testing = ["clippy", "quasi/unstable-testing", "quasi_codegen/unstable-

[dependencies]
clippy = { version = "^0.*", optional = true }
quasi_codegen = { version = "^0.17.0", path = "../quasi_codegen", default-features = false }
quasi_codegen = { version = "^0.18.0", path = "../quasi_codegen", default-features = false }

[dev-dependencies]
aster = "^0.24.0"
quasi = { version = "^0.17.0", path = "../quasi" }
aster = "^0.25.0"
quasi = { version = "^0.18.0", path = "../quasi" }
10 changes: 5 additions & 5 deletions quasi_tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_tests"
version = "0.17.0"
version = "0.18.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -12,13 +12,13 @@ unstable-testing = ["clippy", "quasi/unstable-testing", "quasi_codegen/unstable-

[build-dependencies]
quasi_codegen = { path = "../quasi_codegen" }
syntex = { version = "^0.41.0" }
syntex = { version = "^0.42.2" }

[dependencies]
clippy = { version = "^0.*", optional = true }

[dev-dependencies]
aster = { version = "^0.24.0", features = ["with-syntex"] }
aster = { version = "^0.25.0", features = ["with-syntex"] }
quasi = { path = "../quasi", features = ["with-syntex"] }
syntex = { version = "^0.41.0" }
syntex_syntax = { version = "^0.41.0" }
syntex = { version = "^0.42.2" }
syntex_syntax = { version = "^0.42.0" }

0 comments on commit 1355f90

Please sign in to comment.