Mercurial > hgrepos > Python > libs > ConfigMix
diff configmix/_speedups.c @ 708:e692216f8756
Allow also "," characters to act as a separator within a filter-chain.
The first filter is introduced by a "|", optional other ones may be introduced
by a "|" or a ",".
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Tue, 15 Aug 2023 11:14:51 +0200 |
| parents | 10fbc23b4dba |
| children | ff0de14493f1 |
line wrap: on
line diff
--- a/configmix/_speedups.c Tue Aug 15 10:41:22 2023 +0200 +++ b/configmix/_speedups.c Tue Aug 15 11:14:51 2023 +0200 @@ -684,7 +684,12 @@ } if (direction == 1) { - tmp = PyUnicode_Split(filters, sstate->FILTER_SEPARATOR, -1); + if (PySequence_Contains(filters, sstate->FILTER_SEPARATOR_2)) { + tmp = PyUnicode_Split(filters, sstate->FILTER_SEPARATOR_2, -1); + } + else { + tmp = PyUnicode_Split(filters, sstate->FILTER_SEPARATOR, -1); + } } else { tmp = PyUnicode_Split(filters, sstate->FILTER_SEPARATOR_2, -1);
