diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-17 04:45:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-17 04:45:47 +0900 |
| commit | 2337aa8225b1452e2ec65c122e4b6e8b54f3ea7e (patch) | |
| tree | 53b6154f1c41249aa94365feb508209c75ca6df1 /crates/shirabe-php-shim | |
| parent | d28eefe6833e44db89a27e6afb5f15fc5d667b9b (diff) | |
| download | php-shirabe-2337aa8225b1452e2ec65c122e4b6e8b54f3ea7e.tar.gz php-shirabe-2337aa8225b1452e2ec65c122e4b6e8b54f3ea7e.tar.zst php-shirabe-2337aa8225b1452e2ec65c122e4b6e8b54f3ea7e.zip | |
refactor(pcre): drop the guards for unsupported preg flags
Preg::match5() rejected PREG_OFFSET_CAPTURE and check_set_order() rejected
PREG_SET_ORDER, mirroring the PHP where those flags would change the type
of $matches. The Rust ports of both take a typed `matches` out-param
instead, so neither flag can reach them; check_set_order() already had no
caller. The three constants are unreferenced once the guards are gone.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim')
| -rw-r--r-- | crates/shirabe-php-shim/src/preg.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crates/shirabe-php-shim/src/preg.rs b/crates/shirabe-php-shim/src/preg.rs index 6d70c717..62ad464c 100644 --- a/crates/shirabe-php-shim/src/preg.rs +++ b/crates/shirabe-php-shim/src/preg.rs @@ -1,9 +1,6 @@ use indexmap::IndexMap; use std::sync::{Arc, LazyLock, Mutex}; -pub const PREG_PATTERN_ORDER: i64 = 1; -pub const PREG_SET_ORDER: i64 = 2; -pub const PREG_OFFSET_CAPTURE: i64 = 256; pub const PREG_UNMATCHED_AS_NULL: i64 = 512; #[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] |
