# HG changeset patch # User Markus Mützel # Date 1638134125 -3600 # Node ID 5732a63f31826cc9ae187240eca64fca7fd95757 # Parent f3ed506c85add61bb76eff1ceb6087dda1a6b2cd of-strings: Fix for Octave 8 (bug #61578). * src/of-strings-2-error_state.patch: Add patch to fix compilation with Octave 8. * src/of-strings-1-fixes.patch: Remove hunk from patch that is no longer needed. * dist-files.mk: Add new file to dist. diff -r f3ed506c85ad -r 5732a63f3182 dist-files.mk --- a/dist-files.mk Sun Nov 28 21:38:58 2021 +0100 +++ b/dist-files.mk Sun Nov 28 22:15:25 2021 +0100 @@ -552,6 +552,7 @@ of-statistics.mk \ of-stk.mk \ of-strings-1-fixes.patch \ + of-strings-2-error_state.patch \ of-strings.mk \ of-struct.mk \ of-symbolic.mk \ diff -r f3ed506c85ad -r 5732a63f3182 src/of-strings-1-fixes.patch --- a/src/of-strings-1-fixes.patch Sun Nov 28 21:38:58 2021 +0100 +++ b/src/of-strings-1-fixes.patch Sun Nov 28 22:15:25 2021 +0100 @@ -14,23 +14,3 @@ pcregexp.oct: %.oct: %.cc $(MKOCTFILE) $(PCRE_SWITCHES) -o $@ $< -diff -uNr a/src/pcregexp.cc b/src/pcregexp.cc ---- a/src/pcregexp.cc 2015-06-06 17:40:45.000000000 -0400 -+++ b/src/pcregexp.cc 2018-04-09 15:01:27.359869527 -0400 -@@ -22,6 +22,7 @@ - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - #include -+#include - #include - #include - #include -@@ -49,7 +50,7 @@ - std::string pattern = args(0).string_value(); - std::string input = args(1).string_value(); - if (error_state) { -- gripe_wrong_type_arg("pcregexp", args(0)); -+ err_wrong_type_arg("pcregexp", args(0)); - return retval; - } - diff -r f3ed506c85ad -r 5732a63f3182 src/of-strings-2-error_state.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-strings-2-error_state.patch Sun Nov 28 22:15:25 2021 +0100 @@ -0,0 +1,26 @@ +# HG changeset patch +# User Markus Mützel +# Date 1638133340 -3600 +# Sun Nov 28 22:02:20 2021 +0100 +# Node ID 2f2695e1f4b779632465782368c89ef1c7df0d91 +# Parent c3d5e17f6023c14b85d405aba8b1c76a8f54d02a +Fix compilation with Octave 8 (bug #61578). + +* src/pcregexp.cc (Fpcregexp): Remove usage of `error_state`. It was +unconditionally set to 0 since about 6 years ago and will finally be removed in +Octave 8. + +diff -r c3d5e17f6023 -r 2f2695e1f4b7 src/pcregexp.cc +--- a/src/pcregexp.cc Thu Jan 09 16:50:10 2020 -0500 ++++ b/src/pcregexp.cc Sun Nov 28 22:02:20 2021 +0100 +@@ -48,10 +48,6 @@ + + std::string pattern = args(0).string_value(); + std::string input = args(1).string_value(); +- if (error_state) { +- gripe_wrong_type_arg("pcregexp", args(0)); +- return retval; +- } + + // Compile expression + pcre *re;