changeset 5990:5732a63f3182

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.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 28 Nov 2021 22:15:25 +0100
parents f3ed506c85ad
children 94e6691fc42f
files dist-files.mk src/of-strings-1-fixes.patch src/of-strings-2-error_state.patch
diffstat 3 files changed, 27 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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 \
--- 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 <octave/oct.h>
-+#include <octave/errwarn.h>
- #include <pcre.h>
- #include <iostream>
- #include <vector>
-@@ -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;
-     }
- 
--- /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 <markus.muetzel@gmx.de>
+# 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;