Skip to content

Commit c0427d0

Browse files
committed
feat(embed): disable embed for php 80 + phpzts
1 parent 7bda30f commit c0427d0

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ fn build_wrapper(defines: &[(&str, &str)], includes: &[PathBuf]) -> Result<()> {
162162
Ok(())
163163
}
164164

165-
#[cfg(feature = "embed")]
165+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
166166
/// Builds the embed library.
167167
fn build_embed(defines: &[(&str, &str)], includes: &[PathBuf]) -> Result<()> {
168168
let mut build = cc::Build::new();
@@ -181,7 +181,7 @@ fn build_embed(defines: &[(&str, &str)], includes: &[PathBuf]) -> Result<()> {
181181
fn generate_bindings(defines: &[(&str, &str)], includes: &[PathBuf]) -> Result<String> {
182182
let mut bindgen = bindgen::Builder::default();
183183

184-
#[cfg(feature = "embed")]
184+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
185185
{
186186
bindgen = bindgen.header("src/embed/embed.h");
187187
}

src/builders/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
mod class;
55
mod function;
66
mod module;
7-
#[cfg(feature = "embed")]
7+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
88
mod sapi;
99

1010
pub use class::ClassBuilder;
1111
pub use function::FunctionBuilder;
1212
pub use module::{ModuleBuilder, ModuleStartup};
13-
#[cfg(feature = "embed")]
13+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
1414
pub use sapi::SapiBuilder;

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub mod class;
2525
pub mod closure;
2626
pub mod constant;
2727
pub mod describe;
28-
#[cfg(feature = "embed")]
28+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
2929
pub mod embed;
3030
#[doc(hidden)]
3131
pub mod internal;

src/types/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl<'a> FromZvalMut<'a> for &'a mut ZendIterator {
183183
}
184184

185185
#[cfg(test)]
186-
#[cfg(feature = "embed")]
186+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
187187
mod tests {
188188
use crate::embed::Embed;
189189

src/types/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ impl<'a> FromZval<'a> for &'a str {
456456
}
457457

458458
#[cfg(test)]
459-
#[cfg(feature = "embed")]
459+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
460460
mod tests {
461461
use crate::embed::Embed;
462462

src/zend/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub use ini_entry_def::IniEntryDef;
3434
pub use linked_list::ZendLinkedList;
3535
pub use module::ModuleEntry;
3636
pub use streams::*;
37-
#[cfg(feature = "embed")]
37+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
3838
pub(crate) use try_catch::panic_wrapper;
3939
pub use try_catch::{bailout, try_catch, try_catch_first};
4040

src/zend/try_catch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub unsafe fn bailout() -> ! {
102102
ext_php_rs_zend_bailout();
103103
}
104104

105-
#[cfg(feature = "embed")]
105+
#[cfg(all(feature = "embed", any(php81, not(phpzts))))]
106106
#[cfg(test)]
107107
mod tests {
108108
use crate::embed::Embed;

0 commit comments

Comments
 (0)