changeset 32554:54be25f38029 bytecode-interpreter

maint: merge default to bytecode-interpreter
author John W. Eaton <jwe@octave.org>
date Fri, 08 Dec 2023 09:15:15 -0500
parents a7b2d35d56e4 (current diff) 5dea9272ad7f (diff)
children 888681e1dac1
files libinterp/octave-value/ov-base-mat.cc
diffstat 3 files changed, 22 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/build_ts/update_ts_files	Thu Dec 07 00:28:10 2023 -0500
+++ b/libgui/languages/build_ts/update_ts_files	Fri Dec 08 09:15:15 2023 -0500
@@ -13,7 +13,10 @@
 SEARCH_PATH_QSCI="build_ts/octave-qsci"
 
 # The directory with translations provided by Qt and QScintilla
-QT_LANG_DIR=/usr/share/qt6/translations
+# FIXME: This constant should not be hardcoded.  Probably best if
+# it could be picked up from the configuration such as HAVE_QTX in config.h.
+QT_VERSION="qt5"
+QT_LANG_DIR=/usr/share/$QT_VERSION/translations
 
 # Now update all ts files
 for file in $(ls -b1 *.ts)
@@ -30,7 +33,7 @@
   # Look for translations provided by Qt and QScintilla and extend the search
   # path if no existing translations are found. In this case we have to scan
   # the locally collected source files.
-  if [ $xx_yy != "en_US" ]; then  # No trnaslation required for en_US
+  if [ $xx_yy != "en_US" ]; then  # No translation required for en_US
     # Look for Qt translations
     if [ "`ls $QT_LANG_DIR | grep -i qt_$xx.qm | wc -l`" -eq 0 ] &&
        [ "`ls $QT_LANG_DIR | grep -i qt_$xx_yy.qm | wc -l`" -eq 0 ]; then
@@ -55,7 +58,7 @@
   ANS=${ANS:-n}
   if [ $ANS = "y" ]; then
     echo
-    lupdate -qt5 -no-obsolete -locations relative $SEARCH_PATH -ts $file
+    lupdate -$QT_VERSION -no-obsolete -locations relative $SEARCH_PATH -ts $file
   fi
 
 done
--- a/libinterp/corefcn/data.cc	Thu Dec 07 00:28:10 2023 -0500
+++ b/libinterp/corefcn/data.cc	Fri Dec 08 09:15:15 2023 -0500
@@ -3008,6 +3008,8 @@
   return ovl ((octave_value (args(0)).size ())(0));
 }
 
+DEFALIAS (height, rows);
+
 /*
 %!assert (rows (ones (2,5)), 2)
 %!assert (rows (ones (5,2)), 5)
@@ -3053,6 +3055,8 @@
   return ovl ((octave_value (args(0)).size ())(1));
 }
 
+DEFALIAS (width, columns);
+
 DEFUN (sum, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{y} =} sum (@var{x})
--- a/libinterp/octave-value/ov-base-mat.cc	Thu Dec 07 00:28:10 2023 -0500
+++ b/libinterp/octave-value/ov-base-mat.cc	Fri Dec 08 09:15:15 2023 -0500
@@ -324,8 +324,6 @@
 
   int nd = m_matrix.ndims ();
 
-  MT mrhs (dim_vector (1, 1), rhs);
-
   // If we catch an indexing error in index_vector, we flag an error in
   // index k.  Ensure it is the right value before each idx_vector call.
   // Same variable as used in the for loop in the default case.
@@ -348,7 +346,10 @@
             if (i.is_scalar () && i(0) < m_matrix.numel ())
               m_matrix(i(0)) = rhs;
             else
-              m_matrix.assign (i, mrhs);
+              {
+                MT mrhs (dim_vector (1, 1), rhs);
+                m_matrix.assign (i, mrhs);
+              }
           }
           break;
 
@@ -364,7 +365,10 @@
                 && i(0) < m_matrix.rows () && j(0) < m_matrix.columns ())
               m_matrix(i(0), j(0)) = rhs;
             else
-              m_matrix.assign (i, j, mrhs);
+              {
+                MT mrhs (dim_vector (1, 1), rhs);
+                m_matrix.assign (i, j, mrhs);
+              }
           }
           break;
 
@@ -396,7 +400,10 @@
                 m_matrix(j) = rhs;
               }
             else
-              m_matrix.assign (idx_vec, mrhs);
+              {
+                MT mrhs (dim_vector (1, 1), rhs);
+                m_matrix.assign (idx_vec, mrhs);
+              }
           }
           break;
         }