changeset 31962:476c84c4f201

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 02 Apr 2023 12:02:12 +0200
parents 3df2579631b5 (current diff) c1fc1e821381 (diff)
children 630187b00ca2
files libinterp/corefcn/oct-stream.h libinterp/corefcn/pr-output.cc
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.h	Sat Apr 01 20:14:17 2023 -0700
+++ b/libinterp/corefcn/oct-stream.h	Sun Apr 02 12:02:12 2023 +0200
@@ -452,6 +452,12 @@
 
   std::ostream * output_stream ()
   {
+    return (m_rep ? m_rep->output_stream () : nullptr);
+  }
+
+  std::ostream * preferred_output_stream ()
+  {
+    // return output stream with encoding facet if applicable
     return (m_rep ? m_rep->preferred_output_stream () : nullptr);
   }
 
--- a/libinterp/corefcn/pr-output.cc	Sat Apr 01 20:14:17 2023 -0700
+++ b/libinterp/corefcn/pr-output.cc	Sun Apr 02 12:02:12 2023 +0200
@@ -3397,7 +3397,7 @@
 
   stream os = streams.lookup (fid, "fdisp");
 
-  std::ostream *osp = os.output_stream ();
+  std::ostream *osp = os.preferred_output_stream ();
 
   if (! osp)
     error ("fdisp: stream FID not open for writing");